From 7e152f41a7612e6fb4f9465e7e9649cc6d41ad1d Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Wed, 17 Mar 2010 23:06:38 +0200 Subject: [PATCH] jorjin specific files --- sta_dk/common/build/linux/Makefile | 135 + sta_dk/common/build/linux/Module.symvers | 0 sta_dk/common/build/linux/common.inc | 162 ++ sta_dk/common/build/linux/drv_sources.inc | 336 +++ sta_dk/common/build/linux/modules.order | 1 + sta_dk/pform/common/build/linux/Makefile | 137 + .../pform/common/build/linux/Module.symvers | 0 sta_dk/pform/common/build/linux/modules.order | 1 + .../pform/common/build/linux/os_sources.inc | 106 + sta_dk/pform/linux/LICENSE.txt | 339 +++ sta_dk/pform/linux/Makefile | 296 ++ sta_dk/pform/linux/apps/tiwlan.ini | 211 ++ sta_dk/pform/linux/build/Makefile | 245 ++ sta_dk/pform/linux/build/Module.symvers | 0 sta_dk/pform/linux/build/common.inc | 162 ++ sta_dk/pform/linux/build/modules.order | 1 + sta_dk/pform/linux/build/os_sources.inc | 106 + sta_dk/pform/linux/mkcln.sh | 2 + sta_dk/pform/linux/mkdrv.sh | 2 + sta_dk/pform/linux/src/iw_ioctl.c | 1906 +++++++++++++ .../linux/src/wlan_driver_inc/802_11Defs.h | 1297 +++++++++ .../linux/src/wlan_driver_inc/CmdQueue_api.h | 98 + .../linux/src/wlan_driver_inc/Core_Api.h | 74 + .../linux/src/wlan_driver_inc/Ethernet.h | 165 ++ .../linux/src/wlan_driver_inc/EvHandler.h | 80 + .../linux/src/wlan_driver_inc/IPCKernelApi.h | 47 + .../src/wlan_driver_inc/MacServices_api.h | 589 ++++ .../linux/src/wlan_driver_inc/TI_IPC_Api.h | 155 ++ .../linux/src/wlan_driver_inc/TI_Results.h | 62 + .../src/wlan_driver_inc/TNETW_Driver_api.h | 114 + .../src/wlan_driver_inc/TNETW_Driver_types.h | 201 ++ .../src/wlan_driver_inc/TnetwRegisters.h | 971 +++++++ .../linux/src/wlan_driver_inc/bssTypes.h | 128 + .../linux/src/wlan_driver_inc/cli_cu_common.h | 116 + .../linux/src/wlan_driver_inc/commonTypes.h | 1133 ++++++++ .../linux/src/wlan_driver_inc/configMgr.h | 167 ++ .../src/wlan_driver_inc/coreDefaultParams.h | 1266 +++++++++ sta_dk/pform/linux/src/wlan_driver_inc/fsm.h | 127 + .../linux/src/wlan_driver_inc/healthMonitor.h | 129 + .../src/wlan_driver_inc/linux_ioctl_common.h | 78 + .../src/wlan_driver_inc/measurementTypes.h | 206 ++ .../linux/src/wlan_driver_inc/memMngrEx.h | 498 ++++ .../pform/linux/src/wlan_driver_inc/mlmeApi.h | 253 ++ .../pform/linux/src/wlan_driver_inc/osApi.h | 544 ++++ .../pform/linux/src/wlan_driver_inc/osClsfr.h | 62 + .../pform/linux/src/wlan_driver_inc/osDebug.h | 138 + .../pform/linux/src/wlan_driver_inc/osDot11.h | 774 ++++++ .../linux/src/wlan_driver_inc/osRgstry.h | 136 + .../pform/linux/src/wlan_driver_inc/osUtil.h | 338 +++ .../pform/linux/src/wlan_driver_inc/paramIn.h | 152 ++ .../linux/src/wlan_driver_inc/paramMng.h | 431 +++ .../linux/src/wlan_driver_inc/paramOut.h | 1405 ++++++++++ .../src/wlan_driver_inc/public_commands.h | 1693 ++++++++++++ .../src/wlan_driver_inc/public_descriptors.h | 384 +++ .../src/wlan_driver_inc/public_event_mbox.h | 239 ++ .../src/wlan_driver_inc/public_host_int.h | 105 + .../src/wlan_driver_inc/public_infoele.h | 2392 +++++++++++++++++ .../linux/src/wlan_driver_inc/public_radio.h | 173 ++ .../linux/src/wlan_driver_inc/public_types.h | 320 +++ .../linux/src/wlan_driver_inc/ratesTypes.h | 138 + .../pform/linux/src/wlan_driver_inc/report.h | 185 ++ .../src/wlan_driver_inc/roamingMngrTypes.h | 103 + .../linux/src/wlan_driver_inc/rxXfer_api.h | 86 + .../linux/src/wlan_driver_inc/scanMngrTypes.h | 209 ++ .../linux/src/wlan_driver_inc/scanTypes.h | 180 ++ .../pform/linux/src/wlan_driver_inc/srcApi.h | 149 + .../src/wlan_driver_inc/systemGeneralParam.h | 48 + .../linux/src/wlan_driver_inc/tiQosTypes.h | 272 ++ .../linux/src/wlan_driver_inc/ti_types.h | 125 + .../pform/linux/src/wlan_driver_inc/tiioctl.h | 1331 +++++++++ .../pform/linux/src/wlan_driver_inc/tiwlnif.h | 421 +++ .../linux/src/wlan_driver_inc/tnetwCommon.h | 430 +++ .../pform/linux/src/wlan_driver_inc/utils.h | 290 ++ .../linux/src/wlan_driver_inc/whalBus_Api.h | 192 ++ .../linux/src/wlan_driver_inc/whalBus_Defs.h | 207 ++ .../linux/src/wlan_driver_inc/whalCommon.h | 97 + .../linux/src/wlan_driver_inc/whalCtrl.h | 120 + .../linux/src/wlan_driver_inc/whalCtrl_api.h | 900 +++++++ .../linux/src/wlan_driver_inc/whalCtrl_prm.h | 52 + .../src/wlan_driver_inc/whalDefaultParams.h | 353 +++ .../linux/src/wlan_driver_inc/whalHwCtrl.h | 329 +++ .../linux/src/wlan_driver_inc/whalHwDefs.h | 85 + .../linux/src/wlan_driver_inc/whalHwMboxCmd.h | 103 + .../src/wlan_driver_inc/whalHwMboxCmdBit.h | 116 + .../src/wlan_driver_inc/whalHwMboxConfig.h | 177 ++ .../linux/src/wlan_driver_inc/whalHwRegs.h | 57 + .../linux/src/wlan_driver_inc/whalParams.h | 522 ++++ .../pform/linux/src/wlan_driver_inc/wspVer.h | 59 + 88 files changed, 28724 insertions(+) create mode 100644 sta_dk/common/build/linux/Makefile create mode 100644 sta_dk/common/build/linux/Module.symvers create mode 100644 sta_dk/common/build/linux/common.inc create mode 100644 sta_dk/common/build/linux/drv_sources.inc create mode 100644 sta_dk/common/build/linux/modules.order create mode 100644 sta_dk/pform/common/build/linux/Makefile create mode 100644 sta_dk/pform/common/build/linux/Module.symvers create mode 100644 sta_dk/pform/common/build/linux/modules.order create mode 100644 sta_dk/pform/common/build/linux/os_sources.inc create mode 100644 sta_dk/pform/linux/LICENSE.txt create mode 100644 sta_dk/pform/linux/Makefile create mode 100644 sta_dk/pform/linux/apps/tiwlan.ini create mode 100644 sta_dk/pform/linux/build/Makefile create mode 100644 sta_dk/pform/linux/build/Module.symvers create mode 100644 sta_dk/pform/linux/build/common.inc create mode 100644 sta_dk/pform/linux/build/modules.order create mode 100644 sta_dk/pform/linux/build/os_sources.inc create mode 100644 sta_dk/pform/linux/mkcln.sh create mode 100644 sta_dk/pform/linux/mkdrv.sh create mode 100644 sta_dk/pform/linux/src/iw_ioctl.c create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/802_11Defs.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/CmdQueue_api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/Core_Api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/Ethernet.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/EvHandler.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/IPCKernelApi.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/MacServices_api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/TI_IPC_Api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/TI_Results.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_types.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/TnetwRegisters.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/bssTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/cli_cu_common.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/commonTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/configMgr.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/coreDefaultParams.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/fsm.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/healthMonitor.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/linux_ioctl_common.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/measurementTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/memMngrEx.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/mlmeApi.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osApi.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osClsfr.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osDebug.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osDot11.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osRgstry.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/osUtil.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/paramIn.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/paramMng.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/paramOut.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_commands.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_descriptors.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_event_mbox.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_host_int.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_infoele.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_radio.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/public_types.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/ratesTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/report.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/roamingMngrTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/rxXfer_api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/scanMngrTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/scanTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/srcApi.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/systemGeneralParam.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/tiQosTypes.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/ti_types.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/tiioctl.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/tiwlnif.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/tnetwCommon.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/utils.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Defs.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalCommon.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_api.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_prm.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalDefaultParams.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwCtrl.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwDefs.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwMboxCmd.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwMboxCmdBit.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwMboxConfig.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalHwRegs.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/whalParams.h create mode 100644 sta_dk/pform/linux/src/wlan_driver_inc/wspVer.h diff --git a/sta_dk/common/build/linux/Makefile b/sta_dk/common/build/linux/Makefile new file mode 100644 index 0000000..da605dc --- /dev/null +++ b/sta_dk/common/build/linux/Makefile @@ -0,0 +1,135 @@ + +## +## +## 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)/pform/linux/inc $(DK_ROOT)/pform/common/inc +OS_INCS += $(DK_ROOT)/common/src/core/EvHandler $(DK_ROOT)/Test + +# +# Location and filename of the driver .lib file created by this makefile. +# +OUTPUT_DIR = $(DK_ROOT)/common/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 = linux.o + + # + # List of object files the kernel makefile needs to compile. + # + linux-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 ?= /project/omap2430/encore/linux-2.6.21_mobilinux500/ + + +# +# Build the driver lib file +# +.PHONY: all +all: .depend $(OUTPUT_FILE) + + +# +# Prints variables +# +.PHONY: help +help: + @echo Default Compilation: BOARD=$(BOARD) PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) EXC=$(EXC) 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 *~ *.~* 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/sta_dk/common/build/linux/Module.symvers b/sta_dk/common/build/linux/Module.symvers new file mode 100644 index 0000000..e69de29 diff --git a/sta_dk/common/build/linux/common.inc b/sta_dk/common/build/linux/common.inc new file mode 100644 index 0000000..91e840b --- /dev/null +++ b/sta_dk/common/build/linux/common.inc @@ -0,0 +1,162 @@ + + +## +## +## Directory Locations +## +## + +HAL_ROOT := $(DK_ROOT) +COMMON := $(DK_ROOT)/common +COMSRC := $(COMMON)/src +#TESTSRC := $(DK_ROOT)/Test +HALSRCR := $(HAL_ROOT)/common +HALSRC := $(HALSRCR)/src +#DBG_MDL := $(DK_ROOT)/pform/linux/debug_module +G_TSTR := $(COMSRC)/gwsi_tester +DRV_BYPASS := $(COMSRC)/driver_bypass +LINUX_PFORM := $(DK_ROOT)/pform/linux +PFORM := $(DK_ROOT)/pform + + + +## +## +## Make Flags +## +## + +# +# Choose an interface (CRTWIPP) +# +BOARD ?= CRTWIPP + +# +# Choose the TNET type (1251) +# +PLATFORM ?= 1251 + +# +# Compile with EXC support or not +# +EXC ?= n + +# +# Choose the bus type (n for SDIO, y for WSPI) +# +WSPI ?= n + +# +# Use periodic interrupt +# +INTR ?= y + +# +# Enable or disable debugging +# +DEBUG ?= y + +# +# Enable or disable OS and init messages +# +INFO ?= n + +# +# Archtecture Type +# +ARCH ?= arm + +# +# Cross Compiler Prefix +# +CROSS_COMPILE ?= arm-linux- + +# +# Enable driver profiling +# +DRIVER_PROFILING ?= n + + + + +## +## +## Driver Compilation Directives +## +## + +ifeq ($(EXC),y) + DK_DEFINES += -D EXC_MODULE_INCLUDED +endif + +ifeq ($(INTR),n) + DK_DEFINES += -D PRIODIC_INTERRUPT +endif + +ifeq ($(DEBUG),y) + DK_DEFINES += -D TI_DBG + DK_DEFINES += -D REPORT_LOG +else + DK_DEFINES += -U REPORT_LOG +endif + +DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN +DK_DEFINES += -D CONFIGURE_BSS_TYPE_STA +DK_DEFINES += -D PERIODIC_WAKEUP + +ifeq ($(DRIVER_PROFILING),y) + DK_DEFINES += -D DRIVER_PROFILING +endif + + +## +## +## Platform Compilation Directives +## +## + +ifeq ($(BOARD),CRTWIPP) + TIWLAN_OMAP1610_CRTWIPP ?= y + PFORM_DEFINES += -D TIWLAN_OMAP1610_CRTWIPP +endif + +ifeq ($(PLATFORM),1251) + PFORM_DEFINES += -D TNETW1150=1 + PFORM_DEFINES += -D TNETW1251=1 +endif + +ifeq ($(WSPI),y) + PFORM_DEFINES += -D HW_ACCESS_WSPI +else + PFORM_DEFINES += -D HW_ACCESS_SDIO + PFORM_DEFINES += -D USE_SYNC_API + PFORM_DEFINES += -D USE_RECOVERY +endif + +ifeq ($(INFO),y) + PFORM_DEFINES += -D OS_INFO_MESSAGES + PFORM_DEFINES += -D INIT_MESSAGES +endif + +PFORM_DEFINES += -D TIWLAN_OMAP1610 +PFORM_DEFINES += -D HOST_COMPILE +PFORM_DEFINES += -D FW_RUNNING_AS_STA +PFORM_DEFINES += -D NOT_SUPPORT_08_BIT_ACCESS_COMMAND +PFORM_DEFINES += -D FOUR_ALIGNMENT +PFORM_DEFINES += -D USE_INIT_FILE + + + +## +## +## Miscellaneous Compilation Directivcs +## +## + +EXTRA_CFLAGS += -fsigned-char +EXTRA_CFLAGS += -D __int64="long long" +EXTRA_CFLAGS += -D __LINUX__ +EXTRA_CFLAGS += -D TIWLN_MAJOR_VERSION=5 +EXTRA_CFLAGS += -D TIWLN_MINOR_VERSION=1 +EXTRA_CFLAGS += $(DK_DEFINES) +EXTRA_CFLAGS += $(PFORM_DEFINES) diff --git a/sta_dk/common/build/linux/drv_sources.inc b/sta_dk/common/build/linux/drv_sources.inc new file mode 100644 index 0000000..b6fc468 --- /dev/null +++ b/sta_dk/common/build/linux/drv_sources.inc @@ -0,0 +1,336 @@ + + +#start of TNETW_INCS# do not remove or change this comment +TNETW_INCS = \ + $(COMMON)/inc \ + $(COMSRC)/inc \ + $(COMSRC)/utils \ + $(HALSRC)/hal/inc \ + $(HALSRC)/hal/TnetwServices \ + $(COMSRC)/TNETW_Driver/Export_Inc \ + $(COMSRC)/TNETW_Driver/Data_Srv/inc \ + $(COMSRC)/TNETW_Driver/FW_Transfer/inc \ + $(COMSRC)/TNETW_Driver/Ctrl/Export_Inc \ + $(COMSRC)/TNETW_Driver/MacServices/inc \ + $(COMSRC)/TNETW_Driver \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc \ + $(COMSRC)/TNETW_Driver/MacServices/src/ScanServer \ + $(COMSRC)/TNETW_Driver/MacServices/src/PowerSaveServer \ + $(COMSRC)/TNETW_Driver/MacServices/src/MeasurementSRV \ + $(COMSRC)/TNETW_Driver/TNETWIF/Export_Inc \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_Ctrl_Blk \ + $(COMSRC)/TNETW_Driver/TNETWIF/Inc + +ifeq ($(PLATFORM),1251) + TNETW_INCS += \ + $(HALSRC)/hal/TnetwServices/TNETW1251 +else + ifeq ($(PLATFORM),1150) + TNETW_INCS += \ + $(HALSRC)/hal/TnetwServices/TNETW1150 + else + TNETW_INCS += \ + $(HALSRC)/hal/TnetwServices/TNETW1130 + endif +endif + +TNETW_INCS += \ + $(HALSRC)/hal/hl_data \ + $(HALSRC)/hal/hl_ctrl \ + $(HALSRC)/hal/hw_ctrl \ + $(HALSRC)/hal/security \ + $(HALSRC)/hal/Export_Inc \ + $(HALSRC)/hal/FirmwareApi \ + $(HALSRC)/BusAccess/Shm_Common \ + $(HALSRC)/BusAccess/Export_Inc + +ifeq ($(EXC),y) +#end of TNETW_INCS_EXC# do not remove or change this comment +endif + +#end of TNETW_INCS# do not remove or change this comment + + + + + +#end of GWSI_INCS# do not remove or change this comment + + + + + +#start of CORE_INCS# do not remove or change this comment +CORE_INCS = \ + $(COMSRC)/core/inc \ + $(COMSRC)/core/ExpInc \ + $(COMSRC)/core/data_ctrl/Tx \ + $(COMSRC)/core/data_ctrl/Ctrl \ + $(COMSRC)/core/data_ctrl/Ctrl/TrafficMonitor \ + $(COMSRC)/core/data_ctrl/Ctrl/4X \ + $(COMSRC)/core/data_ctrl/Rx \ + $(COMSRC)/core/Core_Adapt/Export_Inc \ + $(COMSRC)/core/EvHandler \ + $(COMSRC)/core/sme/Inc \ + $(COMSRC)/core/sme/smeSm/ \ + $(COMSRC)/core/sme/siteMgr \ + $(COMSRC)/core/sme/configMgr \ + $(COMSRC)/core/sme/conn \ + $(COMSRC)/core/sme/HealthMonitor \ + $(COMSRC)/core/srv/inc \ + $(COMSRC)/core/srv/scanSrv \ + $(COMSRC)/core/srv/scr \ + $(COMSRC)/core/rsn \ + $(COMSRC)/core/rsn/inc \ + $(COMSRC)/core/mlme \ + $(COMSRC)/core/mlme/Assoc \ + $(COMSRC)/core/mlme/Auth/open \ + $(COMSRC)/core/mlme/Auth/shared \ + $(COMSRC)/Management/QOS/Inc/ \ + $(COMSRC)/Management/Roaming/Inc \ + $(COMSRC)/core/NetworkCtrl/inc \ + $(COMSRC)/Management/AirLink/Measurement \ + $(COMSRC)/Management/AirLink/Measurement/dot11h \ + $(COMSRC)/Management/AirLink/inc \ + $(COMSRC)/Management/scan/inc \ + $(COMSRC)/Management/SoftGemini/inc \ + $(COMSRC)/Management/scan/scanCncn \ + $(COMSRC)/Management/SoftGemini/src \ + $(COMSRC)/core/NetworkCtrl/RegulatoryDomain \ + $(COMSRC)/Management/PowerMgr/ \ + $(COMSRC)/Management/RecoveryMgr/ \ + $(COMSRC)/core/NetworkCtrl/QOS \ + $(COMSRC)/Application/inc \ + $(COMSRC)/Application/ExpInc \ + $(COMSRC)/Application/ScanMngr \ + $(COMSRC)/Management/apConn \ + $(COMSRC)/core/currBss \ + $(COMSRC)/Management/scan/inc \ + +#end of CORE_INCS_EXC# 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 = \ + $(COMSRC)/utils/fsm.c \ + $(COMSRC)/utils/nrfsm.c \ + $(COMSRC)/utils/report.c \ + $(COMSRC)/utils/utils.c \ + $(COMSRC)/utils/bufferPool.c \ + $(COMSRC)/utils/memMngrEx.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 = \ + $(COMSRC)/TNETW_Driver/MacServices/src/MacServices.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/ScanServer/ScanSrv.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/ScanServer/ScanSrvSM.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/PowerSaveServer/PowerSrv.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/PowerSaveServer/PowerSrvSM.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/MeasurementSRV/MeasurementSrv.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/MeasurementSRV/MeasurementSrvSM.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/MeasurementSRV/measurementSrvDbgPrint.c \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_Ctrl_Blk/TNETW_Driver.c \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_Ctrl_Blk/TNETW_Driver_Tx.c \ + $(COMSRC)/TNETW_Driver/Ctrl/Cmd_Queue/CmdQueue.c \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_HW_Queue/txHwQueue.c \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_HW_Queue/txHwQueueCalc.c \ + $(COMSRC)/TNETW_Driver/Data_Srv/Tx_Ctrl_Blk/txCtrlBlk.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/Cmd_MBox/CmdMBox.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/Tx_Result/txResult.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/Tx_Xfer/Slave_Dbl_Buf/txXfer.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/FwEvent/FwEvent.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/Rx_Xfer/RxXfer.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/EventMbox/eventMbox.c \ + $(COMSRC)/TNETW_Driver/MacServices/src/PowerAuthorization/PowerAuthorization.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/TNETWIF.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/ELP_Controller/ElpCtrl.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/BusTxn/whalHwAccess.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/TNETWArbiter/TNETWArb.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/TNETWArbiter/TNETWArbSM.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/TNETWArbiter/TNETWArb_buffer.c \ + $(HALSRC)/hal/hl_ctrl/whalCtrl.c \ + $(HALSRC)/hal/hl_ctrl/whalParams.c \ + $(HALSRC)/hal/hl_data/whalDefrag.c \ + $(HALSRC)/hal/hl_data/whalEndpntEnt.c \ + $(HALSRC)/BusAccess/Shm_Common/shmBus.c \ + $(HALSRC)/BusAccess/Shm_Common/shmFwCtrl.c \ + $(HALSRC)/BusAccess/Shm_Common/shmDebug.c \ + $(HALSRC)/BusAccess/Shm_Common/shmUtils.c \ + $(HALSRC)/hal/hw_ctrl/whalHwCtrl.c \ + $(HALSRC)/BusAccess/Shm_Common/whalHwEeprom.c \ + $(HALSRC)/hal/hw_ctrl/whalHwMboxConfig.c \ + $(HALSRC)/hal/hw_ctrl/whalHwMboxCmd.c \ + $(HALSRC)/hal/hw_ctrl/whalHwMboxCmdBit.c \ + $(HALSRC)/hal/hl_ctrl/whalRecovery.c \ + $(HALSRC)/hal/hl_ctrl/whalRadio.c \ + $(HALSRC)/hal/hl_ctrl/whalDebug.c \ + $(HALSRC)/hal/security/whalSecurity.c \ + $(HALSRC)/hal/security/whalWep.c \ + $(HALSRC)/hal/security/whalWpa.c + +ifndef GWSI_SA + TNETW_SRCS += \ + $(COMSRC)/TNETW_Driver/FW_Transfer/HwInit/HwInit.c \ + $(COMSRC)/TNETW_Driver/Ctrl/RecoverCtrl/recoveryCtrl.c +endif + +ifeq ($(WSPI),y) + TNETW_SRCS += \ + $(COMSRC)/TNETW_Driver/TNETWIF/BusTxn/wspi.c \ + $(COMSRC)/TNETW_Driver/TNETWIF/BusTxn/tiwlanspi.c +endif + +ifeq ($(DEBUG),y) + TNETW_SRCS += \ + $(HALSRC)/BusAccess/Shm_Common/whalTrace.c \ + $(COMSRC)/TNETW_Driver/FW_Transfer/DebugTrace_Xfer/DebugTraceXfer.c +endif + +#end of TNETW_SRCS_EXC# do not remove or change this comment + +#end of TNETW_SRCS# do not remove or change this comment + + + + + +#end of GWSI_SRCS# do not remove or change this comment + + + + + +#start of CORE_SRCS# do not remove or change this comment +CORE_SRCS = \ + $(COMSRC)/core/data_ctrl/Tx/MsduList.c \ + $(COMSRC)/core/data_ctrl/Tx/tx.c \ + $(COMSRC)/core/data_ctrl/Ctrl/Ctrl.c \ + $(COMSRC)/core/data_ctrl/Ctrl/Clsfr.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/Concatenator.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/DeConcatenator.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/ackEmulDb.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/ackEmulUtil.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/fourX.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/fourXManager.c \ + $(COMSRC)/Management/PowerMgr/PowerMgr.c \ + $(COMSRC)/Management/PowerMgr/PowerMgrDbgPrint.c \ + $(COMSRC)/Management/RecoveryMgr/recoveryMgr.c \ + $(COMSRC)/core/data_ctrl/Ctrl/RateAdaptation.c \ + $(COMSRC)/core/data_ctrl/Ctrl/TrafficMonitor/GeneralUtil.c \ + $(COMSRC)/core/data_ctrl/Ctrl/TrafficMonitor/TrafficMonitor.c \ + $(COMSRC)/core/data_ctrl/Rx/rx.c \ + $(COMSRC)/core/sme/conn/conn.c \ + $(COMSRC)/core/sme/conn/connIbss.c \ + $(COMSRC)/core/sme/conn/connInfra.c \ + $(COMSRC)/core/sme/configMgr/configMgr.c \ + $(COMSRC)/core/sme/smeSm/smeSmApi.c \ + $(COMSRC)/core/sme/smeSm/smeSm.c \ + $(COMSRC)/core/sme/HealthMonitor/healthMonitor.c \ + $(COMSRC)/core/sme/siteMgr/siteMgr.c \ + $(COMSRC)/core/sme/siteMgr/siteHash.c \ + $(COMSRC)/core/sme/siteMgr/select.c \ + $(COMSRC)/core/sme/siteMgr/templates.c \ + $(COMSRC)/core/mlme/mlmeBuilder.c \ + $(COMSRC)/core/mlme/mlmeParser.c \ + $(COMSRC)/core/mlme/mlmeSm.c \ + $(COMSRC)/core/mlme/Assoc/assocSM.c \ + $(COMSRC)/core/mlme/Auth/authSm.c \ + $(COMSRC)/core/mlme/Auth/open/openAuthSm.c \ + $(COMSRC)/core/mlme/Auth/shared/sharedKeyAuthSm.c \ + $(COMSRC)/core/rsn/rsn.c \ + $(COMSRC)/core/rsn/mainSecSm.c \ + $(COMSRC)/core/rsn/mainSecNull.c \ + $(COMSRC)/core/rsn/mainSecKeysOnly.c \ + $(COMSRC)/core/rsn/admCtrl.c \ + $(COMSRC)/core/rsn/admCtrlWep.c \ + $(COMSRC)/core/rsn/admCtrlNone.c \ + $(COMSRC)/core/rsn/admCtrlWpa.c \ + $(COMSRC)/core/rsn/admCtrlWpa2.c \ + $(COMSRC)/core/srv/scr/scr.c \ + $(COMSRC)/core/EvHandler/EvHandler.c \ + $(COMSRC)/Management/AirLink/SwitchChannel/SwitchChannel.c \ + $(COMSRC)/Management/AirLink/Measurement/measurementMgr.c \ + $(COMSRC)/Management/AirLink/Measurement/measurementMgrSM.c \ + $(COMSRC)/Management/AirLink/Measurement/dot11h/spectrumMngmntMgr.c \ + $(COMSRC)/Management/AirLink/Measurement/requestHandler.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncn.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnAppSM.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnDrvSM.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnOidSM.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnRoamingContSM.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnRoamingImmedSM.c \ + $(COMSRC)/Management/scan/scanCncn/ScanCncnAppApi.c \ + $(COMSRC)/Management/apConn/apConn.c \ + $(COMSRC)/Management/SoftGemini/src/SoftGemini.c \ + $(COMSRC)/core/NetworkCtrl/RegulatoryDomain/regulatoryDomain.c \ + $(COMSRC)/core/rsn/keyDerive.c \ + $(COMSRC)/core/rsn/keyDeriveWep.c \ + $(COMSRC)/core/rsn/keyDeriveTkip.c \ + $(COMSRC)/core/rsn/keyDeriveAes.c \ + $(COMSRC)/core/rsn/keyParser.c \ + $(COMSRC)/core/rsn/broadcastKeySM.c \ + $(COMSRC)/core/rsn/unicastKeySM.c \ + $(COMSRC)/core/rsn/broadcastKey802_1x.c \ + $(COMSRC)/core/rsn/unicastKey802_1x.c \ + $(COMSRC)/core/rsn/broadcastKeyNone.c \ + $(COMSRC)/core/rsn/unicastKeyNone.c \ + $(COMSRC)/core/rsn/keyParserExternal.c \ + $(COMSRC)/core/rsn/keyParserWep.c \ + $(COMSRC)/core/rsn/mainKeysSm.c \ + $(COMSRC)/core/currBss/currBss.c \ + $(COMSRC)/Application/ScanMngr/scanMngr.c \ + $(COMSRC)/Application/Roaming/roamingMngr.c \ + $(COMSRC)/core/Core_Adapt/Core_AdaptTx.c \ + $(COMSRC)/Management/QOS/qosMngr.c \ + $(COMSRC)/Management/QOS/trafficAdmControl.c + +ifeq ($(SUPPORT_4X),y) + CORE_SRCS += \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/Concatenator.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/DeConcatenator.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/ackEmulDb.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/ackEmulUtil.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/fourX.c \ + $(COMSRC)/core/data_ctrl/Ctrl/4X/fourXManager.c +endif + +#end of CORE_SRCS_EXC# do not remove or change this comment + +#end of CORE_SRCS# do not remove or change this comment + + +ifdef GWSI_SA + DK_INCS = \ + $(TNETW_INCS) \ + $(GWSI_INCS) + + DK_SRCS = \ + $(GWSI_SRCS) \ + $(TNETW_SRCS) \ + $(UTIL_SRCS) + +else + DK_INCS = \ + $(TNETW_INCS) \ + $(CORE_INCS) + + DK_SRCS = \ + $(CORE_SRCS) \ + $(TNETW_SRCS) +endif + + + + +DK_OBJS = $(patsubst %.c, %.o, $(DK_SRCS) $(UTIL_SRCS)) + diff --git a/sta_dk/common/build/linux/modules.order b/sta_dk/common/build/linux/modules.order new file mode 100644 index 0000000..6cc2088 --- /dev/null +++ b/sta_dk/common/build/linux/modules.order @@ -0,0 +1 @@ +kernel//project1/omap3530/ti/wl404_sp3/sta_dk/common/build/linux/linux.ko diff --git a/sta_dk/pform/common/build/linux/Makefile b/sta_dk/pform/common/build/linux/Makefile new file mode 100644 index 0000000..71fb1b9 --- /dev/null +++ b/sta_dk/pform/common/build/linux/Makefile @@ -0,0 +1,137 @@ + +## +## +## 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)/common/build/linux/common.inc + include $(M)/$(DK_ROOT)/pform/common/build/linux/os_sources.inc +else + include $(DK_ROOT)/common/build/linux/common.inc + include $(DK_ROOT)/pform/common/build/linux/os_sources.inc +endif + + +# +# List of platform independent OS files needed to be compiled +# +OS_SRCS = \ + $(DK_ROOT)/pform/common/src/osCmd.c \ + $(DK_ROOT)/pform/common/src/osUtil.c \ + $(DK_ROOT)/pform/common/src/osClsfr.c \ + $(DK_ROOT)/pform/common/src/osRgstry.c + +OS_OBJS = $(patsubst %.c, %.o, $(OS_SRCS)) + +# +# OS include paths required for compilation. +# +OS_INCS = $(DK_ROOT)/pform/linux/inc $(DK_ROOT)/pform/linux/src $(DK_ROOT)/pform/common/inc $(DK_ROOT)/pform/linux/src/wlan_driver_inc + +# +# Location and filename of the OS .lib file created by this makefile. +# +OUTPUT_DIR = $(DK_ROOT)/pform/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 = linux.o + + # + # List of object files the kernel makefile needs to compile. + # + linux-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 ?= /vobs/wlan_linux2.6/kernel-2.6/ + + +# +# Build the OS lib file +# +.PHONY: all +all: .depend $(OUTPUT_FILE) + + +# +# Prints variables +# +.PHONY: help +help: + @echo Default Compilation: BOARD=$(BOARD) PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) EXC=$(EXC) 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 *~ *.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/sta_dk/pform/common/build/linux/Module.symvers b/sta_dk/pform/common/build/linux/Module.symvers new file mode 100644 index 0000000..e69de29 diff --git a/sta_dk/pform/common/build/linux/modules.order b/sta_dk/pform/common/build/linux/modules.order new file mode 100644 index 0000000..29a7ee3 --- /dev/null +++ b/sta_dk/pform/common/build/linux/modules.order @@ -0,0 +1 @@ +kernel//project1/omap3530/ti/wl404_sp3/sta_dk/pform/common/build/linux/linux.ko diff --git a/sta_dk/pform/common/build/linux/os_sources.inc b/sta_dk/pform/common/build/linux/os_sources.inc new file mode 100644 index 0000000..44851f7 --- /dev/null +++ b/sta_dk/pform/common/build/linux/os_sources.inc @@ -0,0 +1,106 @@ + +#start of OS_DK_INCS_FILES# do not remove or change this comment +OS_DK_INCS_FILES = \ + $(COMSRC)/inc/802_11Defs.h \ + $(COMSRC)/inc/Ethernet.h \ + $(COMSRC)/inc/paramIn.h \ + $(COMMON)/inc/srcApi.h \ + $(COMMON)/inc/TI_IPC_Api.h \ + $(COMMON)/inc/memMngrEx.h \ + $(COMMON)/inc/paramOut.h \ + $(COMMON)/inc/osDot11.h \ + $(COMMON)/inc/tiwlnif.h \ + $(COMMON)/inc/ratesTypes.h \ + $(COMMON)/inc/scanTypes.h \ + $(COMMON)/inc/bssTypes.h \ + $(COMMON)/inc/roamingMngrTypes.h \ + $(COMMON)/inc/paramMng.h \ + $(COMMON)/inc/commonTypes.h \ + $(COMMON)/inc/coreDefaultParams.h \ + $(COMMON)/inc/tiQosTypes.h \ + $(COMMON)/inc/whalDefaultParams.h \ + $(COMMON)/inc/TI_Results.h \ + $(COMMON)/inc/tiioctl.h \ + $(COMMON)/inc/wspVer.h \ + $(COMSRC)/core/inc/mlmeApi.h \ + $(COMSRC)/core/sme/configMgr/configMgr.h \ + $(COMSRC)/core/sme/HealthMonitor/healthMonitor.h \ + $(COMSRC)/utils/fsm.h \ + $(COMSRC)/utils/report.h \ + $(COMSRC)/utils/utils.h \ + $(COMSRC)/driver_bypass/driver_bypass.h \ + $(COMSRC)/TNETW_Driver/Export_Inc/TNETW_Driver_types.h \ + $(COMSRC)/TNETW_Driver/Export_Inc/TNETW_Driver_api.h \ + $(COMSRC)/TNETW_Driver/Ctrl/Export_Inc/CmdQueue_api.h \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc/MacServices_api.h \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc/measurementTypes.h \ + $(COMSRC)/TNETW_Driver/FW_Transfer/inc/rxXfer_api.h \ + $(COMSRC)/BusAccess/Export_Inc/whalBus_Defs.h \ + $(COMSRC)/BusAccess/Export_Inc/whalBus_Api.h \ + $(COMSRC)/hal/inc/whalCommon.h \ + $(COMSRC)/hal/FirmwareApi/public_descriptors.h \ + $(COMSRC)/hal/FirmwareApi/public_infoele.h \ + $(COMSRC)/hal/FirmwareApi/public_types.h \ + $(COMSRC)/hal/FirmwareApi/public_host_int.h \ + $(COMSRC)/hal/FirmwareApi/public_radio.h \ + $(COMSRC)/hal/FirmwareApi/public_commands.h \ + $(COMSRC)/hal/FirmwareApi/public_event_mbox.h \ + $(COMSRC)/hal/FirmwareApi/whalHwDefs.h \ + $(COMSRC)/hal/TnetwServices/tnetwCommon.h \ + $(COMSRC)/hal/TnetwServices/TNETW1251/whalHwRegs.h \ + $(COMSRC)/hal/TnetwServices/TNETW1251/TnetwRegisters.h \ + $(COMSRC)/hal/Export_Inc/whalCtrl_api.h \ + $(COMSRC)/hal/Export_Inc/whalCtrl_prm.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxCmdBit.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxCmd.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxConfig.h \ + $(COMSRC)/hal/hw_ctrl/whalHwCtrl.h \ + $(COMSRC)/hal/hl_ctrl/whalCtrl.h \ + $(COMSRC)/hal/hl_ctrl/whalParams.h \ + $(TESTSRC)/debug.h + +#start of OS_DK_INCS_FILES_EXC# do not remove or change this comment +ifeq ($(EXC),y) + OS_DK_INCS_FILES_EXC = \ + $(COMMON)/inc/EXC/paramOutExc.h \ + $(COMMON)/inc/EXC/osDot11Exc.h + + OS_DK_INCS_FILES += $(OS_DK_INCS_FILES_EXC) +endif +#end of OS_DK_INCS_FILES_EXC# 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)/inc \ + $(COMSRC)/inc \ + $(COMSRC)/core/inc \ + $(COMSRC)/core/sme/configMgr \ + $(COMSRC)/core/sme/HealthMonitor \ + $(COMSRC)/utils \ + $(COMSRC)/driver_bypass \ + $(COMSRC)/TNETW_Driver/Export_Inc \ + $(COMSRC)/TNETW_Driver/Ctrl/Export_Inc \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc \ + $(COMSRC)/TNETW_Driver/FW_Transfer/inc \ + $(COMSRC)/BusAccess/Export_Inc \ + $(COMSRC)/hal/inc \ + $(COMSRC)/hal/FirmwareApi \ + $(COMSRC)/hal/TnetwServices \ + $(COMSRC)/hal/TnetwServices/TNETW1251 \ + $(COMSRC)/hal/Export_Inc \ + $(COMSRC)/hal/hw_ctrl \ + $(COMSRC)/hal/hl_ctrl \ + +#start of OS_DK_INCS_EXC# do not remove or change this comment +ifeq ($(EXC),y) + OS_DK_INCS_EXC = \ + $(COMMON)/inc/EXC + + OS_DK_INCS += $(OS_DK_INCS_EXC) +endif +#end of OS_DK_INCS_EXC# do not remove or change this comment + +#start of OS_DK_INCS# do not remove or change this comment diff --git a/sta_dk/pform/linux/LICENSE.txt b/sta_dk/pform/linux/LICENSE.txt new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/sta_dk/pform/linux/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/sta_dk/pform/linux/Makefile b/sta_dk/pform/linux/Makefile new file mode 100644 index 0000000..5a9cf29 --- /dev/null +++ b/sta_dk/pform/linux/Makefile @@ -0,0 +1,296 @@ + + +## +## +## Application Make Flags +## +## + +# +# Statically link the CU +# +STATIC_LIB ?= y + +# +# Rebuild the supplicant +# +BUILD_SUPPL ?= n + + + + + +## +## +## File lists and locations +## +## + +# +# DK_ROOT must be set prior to including common.inc +# +DK_ROOT = ../.. + +# +# Includes common definitions and source file list +# + include $(DK_ROOT)/common/build/linux/common.inc + +# +# Location and filename of the driver .lib file. +# +DRIVER_LIB_DIR = $(DK_ROOT)/common/build/linux +DRIVER_LIB = $(DRIVER_LIB_DIR)/libestadrv.a + +# +# Location and filename of the OS .lib file. +# +OS_COMMON_DIR = $(DK_ROOT)/pform/common/build/linux +OS_COMMON = $(OS_COMMON_DIR)/libuadrv.a + +# +# Location and filename of the linux OS object file. +# +OS_LINUX_DIR = $(DK_ROOT)/pform/linux/build +OS_LINUX = $(OS_LINUX_DIR)/tiwlan_drv_stub.o + +OS_AUXILIARY_LIBS = ../$(DRIVER_LIB)\ ../$(OS_COMMON) + +# +# Location and filename of the wlan configuraion utility CLI program. +# +WLAN_CU_CLI_DIR = $(DK_ROOT)/CUDK/CLI +WLAN_CU_CLI = $(WLAN_CU_CLI_DIR)/wlan_cu + +# +# The Utility Adapter lib file in case it is should be dynamically linked. +# +ifeq ($(STATIC_LIB),n) + UTIL_ADAPTER_LIB = $(DK_ROOT)/CUDK/Output/libtiOsLib.so +endif + +# +# The location of the supplicant depending on whether or not we rebuild it. +# +ifeq ($(BUILD_SUPPL),y) + FUNC_SUPPL = $(WLAN_CU_CLI_DIR)/wlan_suppl +else + FUNC_SUPPL = $(DK_ROOT)/pform/linux/images/wlan_suppl +endif + +# +# The combined linux driver module file. +# +DRIVER_MODULE_DIR = $(DK_ROOT)/pform/linux/apps +DRIVER_MODULE = $(DRIVER_MODULE_DIR)/tiwlan_drv.o + +# +# Bus Driver +# +ifeq ($(WSPI),y) + BUS_DRV = wspi + BUS_DRV_REMOVE = sdio +else + BUS_DRV = sdio + BUS_DRV_REMOVE = wspi +endif + +# +# Firmware +# +export FIRMWARE_DYNAMIC_LOAD ?= y + +FW_IMAGE ?= $(DK_ROOT)/fw/Latest/Fw1251r1c.bin +FW_IMAGE_DEST_FILE ?= $(DRIVER_MODULE_DIR)/firmware.bin + + + + + +## +## +## Build process +## +## + +# +# The location of the kernel makefile +# +KERNEL_DIR ?= /vobs/wlan_linux2.6/kernel-2.6/ + +# +# 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. +# +TARGET = apps.img voice.img suppl.img + +.PHONY: all +all: verifypackages .depend $(TARGET) + + +# +# Prints variables +# +help: + @echo Default Compilation: BOARD=$(BOARD) PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) EXC=$(EXC) EXTRA CFLAGS: $(EXTRA_CFLAGS) + + +# +# Create the images +# +.PHONY: suppl.img voice.img apps.img $(BUS_DRV) + +apps.img: $(DRIVER_MODULE) $(BUS_DRV) $(WLAN_CU_CLI) $(UTIL_ADAPTER_LIB) + rm -f $(DRIVER_MODULE_DIR)/$(BUS_DRV_REMOVE).ko $(DRIVER_MODULE_DIR)/$(BUS_DRV_REMOVE)_test +ifeq ($(FIRMWARE_DYNAMIC_LOAD),y) + cp -f $(FW_IMAGE) $(FW_IMAGE_DEST_FILE) +endif +ifeq ($(STATIC_LIB),n) + cp -f $(UTIL_ADAPTER_LIB) voice/ +endif + cp -f $(WLAN_CU_CLI) apps/ +# mkcramfs apps apps.cram +# mkimgti -t data -o apps.img apps.cram + +voice.img: +# $(MAKEJFFS2) -l -r voice -e 0x10000 -o voice.jffs2 +# mkimgti -t data -o voice.img voice.jffs2 + +# No supplicant is available in the No EXC package. +suppl.img: $(FUNC_SUPPL) +ifeq ($(EXC),y) +ifeq ($(BUILD_SUPPL),y) + cp -f $(WLAN_CU_CLI_DIR)/wlan_suppl images/ + cp -f $(WLAN_CU_CLI_DIR)/wlan_suppl suppl/ +else + cp -f $^ suppl/ +endif +# mkcramfs suppl suppl.cram +# mkimgti -t data -o suppl.img suppl.cram +endif + + +# +# Recursively cleans the driver, OS, bus and CLI files +# +.PHONY: clean +clean: + $(MAKE) -C $(DRIVER_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) clean + $(MAKE) -C $(OS_COMMON_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) clean + $(MAKE) -C $(OS_LINUX_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) clean +# $(MAKE) -C sdio ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) OUTPUT_DIR=$(shell pwd)/$(DRIVER_MODULE_DIR) clean +# $(MAKE) -C wspi ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) OUTPUT_DIR=$(shell pwd)/$(DRIVER_MODULE_DIR) clean +# $(MAKE) -C $(DBG_MDL) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) clean + $(MAKE) -C $(WLAN_CU_CLI_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(EXC) EXC=$(EXC) cleanall + @rm -f suppl.* apps.* voice.* + @rm -f $(WLAN_CU_CLI) $(UTIL_ADAPTER_LIB) + @rm -f $(DRIVER_MODULE_DIR)/wlan_suppl suppl/wlan_suppl $(FW_IMAGE_DEST_FILE) + @rm -f $(DRIVER_MODULE) $(DRIVER_MODULE_DIR)/gwsi_drv.o $(DRIVER_MODULE_DIR)/firmware.bin $(DRIVER_MODULE_DIR)/debug_tools.o + @rm -f *.o *.a *~ *.~* core .depend dep + + +# +# 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 $(BUS_DRV) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) OUTPUT_DIR=$(shell pwd)/$(DRIVER_MODULE_DIR) all + + +# +# Causes the driver and the configuration utility object files to get rebuilt +# +.depend: + rm -f $(DRIVER_MODULE) $(DRIVER_LIB) $(OS_COMMON) $(OS_LINUX) $(WLAN_CU_CLI) + + +# +# Build the configuration utility; optionally rebuilds the supplicant +# +$(UTIL_ADAPTER_LIB): $(WLAN_CU_CLI) + +$(FUNC_SUPPL): $(WLAN_CU_CLI) + +$(WLAN_CU_CLI): + $(MAKE) -C $(WLAN_CU_CLI_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) SG=$(SG) DRIVER_PROFILING=$(DRIVER_PROFILING) + + +# +# Recursively builds the driver lib file +# +$(DRIVER_LIB): + $(MAKE) -C $(DRIVER_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) + + +# +# Recursively builds the OS lib file +# +$(OS_COMMON): + $(MAKE) -C $(OS_COMMON_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) 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) BOARD=$(BOARD) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) WSPI=$(WSPI) INTR=$(INTR) EXC=$(EXC) STATIC_LIB=$(STATIC_LIB) OS_AUXILIARY_LIBS+=../$(DRIVER_LIB) OS_AUXILIARY_LIBS+=../$(OS_COMMON) + + +# +# Recursively builds the driver object file +# +$(DRIVER_MODULE): $(DRIVER_LIB) $(OS_COMMON) $(OS_LINUX) + mv $(OS_LINUX) $(DRIVER_MODULE) + + +# +# 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 $(DRIVER_MODULE_DIR)/debug_tools.o + + +# +# Not in use? +# +TAGS: $(SRCS) + { find ${DK_ROOT}/common -name '*.h' -print ; \ + find ${DK_ROOT}/Test -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/sta_dk/pform/linux/apps/tiwlan.ini b/sta_dk/pform/linux/apps/tiwlan.ini new file mode 100644 index 0000000..b4f1452 --- /dev/null +++ b/sta_dk/pform/linux/apps/tiwlan.ini @@ -0,0 +1,211 @@ +EEPROMlessModeSupported=0 #0=disable epromless support / 1=Enable +WME_Enable=1 #0=diable WME support / 1=Enable +dot11NetworkType=3 #2 - A only mode, 3 - B/G mode, 4 - A/G Dual mode +RecoveryEnable = 0 #0 -Disabled 1- Enabled +TriggerFcs = 0 # 0 - Disabled 1 - Enabled +dot11FragmentationThreshold = 4096 +dot11RTSThreshold = 4096 +WPAMixedMode= 1 +RSNPreAuthentication = 1 + +CalibrationChannel24 = 1 +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 = FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000FF000000FF000000FF000000FF00000000000000000000000000000000000000 + + + +SpectrumManagement = 0 # 0 - Disable 802.11h, 1 - Enable + +RxBroadcastInPs = 1 + +FirstConnScanEnabled = 1 # 0 - Disable , 1 - Enable + +#arp ip filter +ArpIp_Addr = c0 a8 00 5e +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 = 15 +Beacon_IE_Table_Size = 35 +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 85 01 dd 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 +RatePolicyUserRetriesPerRateCck = 1,1,1,1,1,1,1,1,1,1,1,1,1 +RatePolicyUserRetriesPerRatePbcc = 1,1,1,1,1,1,1,1,1,1,1,1,1 +RatePolicyUserRetriesPerRateOfdm = 0,0,0,1,0,0,0,1,0,0,1,1,1 +RatePolicyUserRetriesPerRateOfdmA = 0,0,0,1,0,0,1,0,0,1,0,0,0 + +RatePolicySGRetriesPerRateCck = 1,1,1,1,1,1,1,5,1,1,1,1,1 +RatePolicySGRetriesPerRatePbcc = 1,1,1,1,1,1,1,5,1,1,1,1,1 +RatePolicySGRetriesPerRateOfdm = 1,1,1,1,1,1,1,5,1,1,1,1,1 +RatePolicySGRetriesPerRateOfdmA = 1,1,1,1,1,1,1,5,1,1,1,1,1 + +# +# Power Manager +# +BeaconListenInterval = 1 # the number of N-Beacon or N-DTim +DtimListenInterval = 1 # + +dot11PowerMode = 1 #0 - Auto + #1 - Active + #2 - Short Doze + #3 - Long Doze + +PowerMgmtHangOverPeriod = 5 #in mSec units + +AutoPowerModeDozeMode = 2 #2 - Short Doze + #3 - Long Doze + +AutoPowerModeActiveTh = 15 #packets per second + +AutoPowerModeDozeTh = 8 #packets per seconds - threshold for entering ELP in Auto mode + + + +defaultPowerLevel = 2 #0 - ELP + #1 - PD + #2 - AWAKE + +PowerSavePowerLevel = 2 #0 - ELP + #1 - PD + #2 - AWAKE + + +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 +# Byte #7: Debug RX +# Byte #8: Debug TX +# Byte #9: Debug Control +# Byte #10: Debug GWSI Recording +############################################################# + +ReportSeverityTable = "00011010000" +#ReportSeverityTable = "01111011100" + + +BeaconReceiveTime = 50 + +# +# Default Driver Scan Parameters for BG band +# +FirstConnScanBandB_ChannelList = 1,2,3,4,5,6,7,8,9,10,11,12,13,14 # channel list to scan seperated with comma +FirstConnScanBandB_MinDwellTime = 30000 # Min dwell time in micro seconds +FirstConnScanBandB_MaxDwellTime = 60000 # Max dwell time in micro seconds +FirstConnScanBandB_NumOfProbReqs = 3 # Number of prob request +FirstConnScanBandB_ProbReqRate = 2 # Prob request rate +FirstConnScanBandB_TxPowerLevel = 255 # Tx power for every prob request - Dbm/10 units + +# Default Driver Scan Parameters for A band +FirstConnScanBandA_ChannelList = 36,40,44,48,52,56,60,64,100,104,108,112,149,153,157,161 # channel list to scan seperated with comma +FirstConnScanBandA_MinDwellTime = 30000 # Min dwell time in micro seconds +FirstConnScanBandA_MaxDwellTime = 60000 # Max dwell time in micro seconds +FirstConnScanBandA_NumOfProbReqs = 3 # Number of prob request +FirstConnScanBandA_ProbReqRate = 32 # Prob request rate +FirstConnScanBandA_TxPowerLevel = 255 # Tx power for every prob request - Dbm/10 units + +# +# QOS UPSD +# + +desiredPsMode = 1 # Global Power save delivery protocol (1 - UPSD, 0 - Legacy) +QOS_wmePsModeBE = 0 # Power save delivery protocol for BE AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeBK = 0 # Power save delivery protocol for BK AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeVI = 0 # Power save delivery protocol for VI AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeVO = 0 # Power save delivery protocol for VO AC (1 - UPSD, 0 - Legacy) + +# +# QOS Classifier +# +Clsfr_Type = 1 # 1 - DSCP, 2 - Port, 3 - IP+port + +NumOfDstIPPortClassifiers = 3 # number of classifier entries + +IPPortClassifier00_IPAddress = 0a 03 89 02 # IP address 10.3.137.2 +IPPortClassifier00_Port = 5001 # Port 5001 +IPPortClassifier00_DTag = 1 # User priority 1 + +IPPortClassifier01_IPAddress = 0a 03 89 02 # IP address 10.3.137.2 +IPPortClassifier01_Port = 5002 # Port 5002 +IPPortClassifier01_DTag = 4 # User priority 4 + +IPPortClassifier02_IPAddress = 0a 03 89 02 # IP address 10.3.137.2 +IPPortClassifier02_Port = 5003 # Port 5003 +IPPortClassifier02_DTag = 6 # User priority 6 + + +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 = 7 + +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 + + + diff --git a/sta_dk/pform/linux/build/Makefile b/sta_dk/pform/linux/build/Makefile new file mode 100644 index 0000000..9395e42 --- /dev/null +++ b/sta_dk/pform/linux/build/Makefile @@ -0,0 +1,245 @@ + + +## +## +## Make Flags +## +## + +NO_ARCH_STRCMP ?= y +NO_USERMODE_WORKAROUND ?= n +MEM_ALLOC_TRACE ?= n +TIWLAN_INIT_FILE_SUPPORT ?= 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)/pform/linux/build/common.inc + include $(M)/$(DK_ROOT)/pform/linux/build/os_sources.inc +else + include $(DK_ROOT)/pform/linux/build/common.inc + include $(DK_ROOT)/pform/linux/build/os_sources.inc +endif + + +# +# List of linux OS files needed to be compiled +# +# $(DK_ROOT)/pform/linux/src/iw_ioctl.c +OS_SRCS = \ + $(DK_ROOT)/pform/linux/src/esta_drv.c \ + $(DK_ROOT)/pform/linux/src/osapi.c \ + $(DK_ROOT)/pform/linux/src/osmemapi.c \ + $(DK_ROOT)/pform/linux/src/env_tst.c \ + $(DK_ROOT)/pform/linux/src/ioctl_list.c \ + $(DK_ROOT)/pform/linux/src/ioctl_utils.c \ + $(DK_ROOT)/pform/linux/src/osRgstry_parser.c \ + $(DK_ROOT)/pform/linux/src/ipc_k.c \ + $(DK_ROOT)/pform/linux/src/proc_stat.c + +ifeq ($(DRIVER_PROFILING),y) + OS_SRCS += $(DK_ROOT)/pform/linux/src/tiwlan_profile.c +endif + +ifeq ($(STACK_PROFILING_ON),y) + OS_SRCS += $(DK_ROOT)/pform/linux/src/stack_profile.c + EXTRA_CFLAGS += -D STACK_PROFILE +endif + +ifeq ($(NO_ARCH_STRCMP),y) + OS_SRCS += $(DK_ROOT)/pform/linux/src/string.c +endif + +OS_OBJS = $(patsubst %.c, %.o, $(OS_SRCS)) + +# +# OS include paths required for compilation. +# +OS_INCS = $(DK_ROOT)/pform/linux/inc $(DK_ROOT)/pform/linux/src $(DK_ROOT)/pform/linux/src/wlan_driver_inc $(DK_ROOT)/pform/common/inc +OS_INCS += $(DK_ROOT)/common/src/core/EvHandler + +ifeq ($(EXC),y) + OS_INCS += $(DK_ROOT)/pform/linux/src/wlan_driver_inc/exc +endif + + +# +# Firmware +# +export FIRMWARE_DYNAMIC_LOAD ?= y + +FW_SRCS = ./firmware.c ./radio.c +FW_OBJS = $(patsubst %.c, %.o, $(FW_SRCS)) +FW_IMAGE = $(DK_ROOT)/fw/Latest/Fw1251r1c.bin + +ifeq ($(FIRMWARE_DYNAMIC_LOAD),y) + EXTRA_CFLAGS += -D FIRMWARE_DYNAMIC_LOAD + RAD_IMAGE = $(DK_ROOT)/fw/Latest/nvs_map.bin +else + OS_OBJS += $(FW_OBJS) + BIN2C = $(DK_ROOT)/pform/linux/tools/bin2c + RAD_IMAGE = dummy.bin +endif + + +# +# Location and filename of the linux OS stub object file created by this makefile. +# +OUTPUT_DIR = $(DK_ROOT)/pform/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 ($(TIWLAN_INIT_FILE_SUPPORT),y) + EXTRA_CFLAGS += -D USE_INIT_FILE +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_INCS)) + + # + # 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 = $(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 ?= /project/omap2430/encore/linux-2.6.21_mobilinux500/ + + +# +# Build the linux OS stub object file +# +.PHONY: all +all: .depend $(OUTPUT_DIR) $(OUTPUT_FILE) + + +# +# Prints variables +# +.PHONY: help +help: + @echo Default Compilation: BOARD=$(BOARD) PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) EXC=$(EXC) 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 *~ *.~* 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 linux.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/sta_dk/pform/linux/build/Module.symvers b/sta_dk/pform/linux/build/Module.symvers new file mode 100644 index 0000000..e69de29 diff --git a/sta_dk/pform/linux/build/common.inc b/sta_dk/pform/linux/build/common.inc new file mode 100644 index 0000000..91e840b --- /dev/null +++ b/sta_dk/pform/linux/build/common.inc @@ -0,0 +1,162 @@ + + +## +## +## Directory Locations +## +## + +HAL_ROOT := $(DK_ROOT) +COMMON := $(DK_ROOT)/common +COMSRC := $(COMMON)/src +#TESTSRC := $(DK_ROOT)/Test +HALSRCR := $(HAL_ROOT)/common +HALSRC := $(HALSRCR)/src +#DBG_MDL := $(DK_ROOT)/pform/linux/debug_module +G_TSTR := $(COMSRC)/gwsi_tester +DRV_BYPASS := $(COMSRC)/driver_bypass +LINUX_PFORM := $(DK_ROOT)/pform/linux +PFORM := $(DK_ROOT)/pform + + + +## +## +## Make Flags +## +## + +# +# Choose an interface (CRTWIPP) +# +BOARD ?= CRTWIPP + +# +# Choose the TNET type (1251) +# +PLATFORM ?= 1251 + +# +# Compile with EXC support or not +# +EXC ?= n + +# +# Choose the bus type (n for SDIO, y for WSPI) +# +WSPI ?= n + +# +# Use periodic interrupt +# +INTR ?= y + +# +# Enable or disable debugging +# +DEBUG ?= y + +# +# Enable or disable OS and init messages +# +INFO ?= n + +# +# Archtecture Type +# +ARCH ?= arm + +# +# Cross Compiler Prefix +# +CROSS_COMPILE ?= arm-linux- + +# +# Enable driver profiling +# +DRIVER_PROFILING ?= n + + + + +## +## +## Driver Compilation Directives +## +## + +ifeq ($(EXC),y) + DK_DEFINES += -D EXC_MODULE_INCLUDED +endif + +ifeq ($(INTR),n) + DK_DEFINES += -D PRIODIC_INTERRUPT +endif + +ifeq ($(DEBUG),y) + DK_DEFINES += -D TI_DBG + DK_DEFINES += -D REPORT_LOG +else + DK_DEFINES += -U REPORT_LOG +endif + +DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN +DK_DEFINES += -D CONFIGURE_BSS_TYPE_STA +DK_DEFINES += -D PERIODIC_WAKEUP + +ifeq ($(DRIVER_PROFILING),y) + DK_DEFINES += -D DRIVER_PROFILING +endif + + +## +## +## Platform Compilation Directives +## +## + +ifeq ($(BOARD),CRTWIPP) + TIWLAN_OMAP1610_CRTWIPP ?= y + PFORM_DEFINES += -D TIWLAN_OMAP1610_CRTWIPP +endif + +ifeq ($(PLATFORM),1251) + PFORM_DEFINES += -D TNETW1150=1 + PFORM_DEFINES += -D TNETW1251=1 +endif + +ifeq ($(WSPI),y) + PFORM_DEFINES += -D HW_ACCESS_WSPI +else + PFORM_DEFINES += -D HW_ACCESS_SDIO + PFORM_DEFINES += -D USE_SYNC_API + PFORM_DEFINES += -D USE_RECOVERY +endif + +ifeq ($(INFO),y) + PFORM_DEFINES += -D OS_INFO_MESSAGES + PFORM_DEFINES += -D INIT_MESSAGES +endif + +PFORM_DEFINES += -D TIWLAN_OMAP1610 +PFORM_DEFINES += -D HOST_COMPILE +PFORM_DEFINES += -D FW_RUNNING_AS_STA +PFORM_DEFINES += -D NOT_SUPPORT_08_BIT_ACCESS_COMMAND +PFORM_DEFINES += -D FOUR_ALIGNMENT +PFORM_DEFINES += -D USE_INIT_FILE + + + +## +## +## Miscellaneous Compilation Directivcs +## +## + +EXTRA_CFLAGS += -fsigned-char +EXTRA_CFLAGS += -D __int64="long long" +EXTRA_CFLAGS += -D __LINUX__ +EXTRA_CFLAGS += -D TIWLN_MAJOR_VERSION=5 +EXTRA_CFLAGS += -D TIWLN_MINOR_VERSION=1 +EXTRA_CFLAGS += $(DK_DEFINES) +EXTRA_CFLAGS += $(PFORM_DEFINES) diff --git a/sta_dk/pform/linux/build/modules.order b/sta_dk/pform/linux/build/modules.order new file mode 100644 index 0000000..a524268 --- /dev/null +++ b/sta_dk/pform/linux/build/modules.order @@ -0,0 +1 @@ +kernel//project1/omap3530/ti/wl404_sp3/sta_dk/pform/linux/build/linux.ko diff --git a/sta_dk/pform/linux/build/os_sources.inc b/sta_dk/pform/linux/build/os_sources.inc new file mode 100644 index 0000000..44851f7 --- /dev/null +++ b/sta_dk/pform/linux/build/os_sources.inc @@ -0,0 +1,106 @@ + +#start of OS_DK_INCS_FILES# do not remove or change this comment +OS_DK_INCS_FILES = \ + $(COMSRC)/inc/802_11Defs.h \ + $(COMSRC)/inc/Ethernet.h \ + $(COMSRC)/inc/paramIn.h \ + $(COMMON)/inc/srcApi.h \ + $(COMMON)/inc/TI_IPC_Api.h \ + $(COMMON)/inc/memMngrEx.h \ + $(COMMON)/inc/paramOut.h \ + $(COMMON)/inc/osDot11.h \ + $(COMMON)/inc/tiwlnif.h \ + $(COMMON)/inc/ratesTypes.h \ + $(COMMON)/inc/scanTypes.h \ + $(COMMON)/inc/bssTypes.h \ + $(COMMON)/inc/roamingMngrTypes.h \ + $(COMMON)/inc/paramMng.h \ + $(COMMON)/inc/commonTypes.h \ + $(COMMON)/inc/coreDefaultParams.h \ + $(COMMON)/inc/tiQosTypes.h \ + $(COMMON)/inc/whalDefaultParams.h \ + $(COMMON)/inc/TI_Results.h \ + $(COMMON)/inc/tiioctl.h \ + $(COMMON)/inc/wspVer.h \ + $(COMSRC)/core/inc/mlmeApi.h \ + $(COMSRC)/core/sme/configMgr/configMgr.h \ + $(COMSRC)/core/sme/HealthMonitor/healthMonitor.h \ + $(COMSRC)/utils/fsm.h \ + $(COMSRC)/utils/report.h \ + $(COMSRC)/utils/utils.h \ + $(COMSRC)/driver_bypass/driver_bypass.h \ + $(COMSRC)/TNETW_Driver/Export_Inc/TNETW_Driver_types.h \ + $(COMSRC)/TNETW_Driver/Export_Inc/TNETW_Driver_api.h \ + $(COMSRC)/TNETW_Driver/Ctrl/Export_Inc/CmdQueue_api.h \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc/MacServices_api.h \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc/measurementTypes.h \ + $(COMSRC)/TNETW_Driver/FW_Transfer/inc/rxXfer_api.h \ + $(COMSRC)/BusAccess/Export_Inc/whalBus_Defs.h \ + $(COMSRC)/BusAccess/Export_Inc/whalBus_Api.h \ + $(COMSRC)/hal/inc/whalCommon.h \ + $(COMSRC)/hal/FirmwareApi/public_descriptors.h \ + $(COMSRC)/hal/FirmwareApi/public_infoele.h \ + $(COMSRC)/hal/FirmwareApi/public_types.h \ + $(COMSRC)/hal/FirmwareApi/public_host_int.h \ + $(COMSRC)/hal/FirmwareApi/public_radio.h \ + $(COMSRC)/hal/FirmwareApi/public_commands.h \ + $(COMSRC)/hal/FirmwareApi/public_event_mbox.h \ + $(COMSRC)/hal/FirmwareApi/whalHwDefs.h \ + $(COMSRC)/hal/TnetwServices/tnetwCommon.h \ + $(COMSRC)/hal/TnetwServices/TNETW1251/whalHwRegs.h \ + $(COMSRC)/hal/TnetwServices/TNETW1251/TnetwRegisters.h \ + $(COMSRC)/hal/Export_Inc/whalCtrl_api.h \ + $(COMSRC)/hal/Export_Inc/whalCtrl_prm.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxCmdBit.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxCmd.h \ + $(COMSRC)/hal/hw_ctrl/whalHwMboxConfig.h \ + $(COMSRC)/hal/hw_ctrl/whalHwCtrl.h \ + $(COMSRC)/hal/hl_ctrl/whalCtrl.h \ + $(COMSRC)/hal/hl_ctrl/whalParams.h \ + $(TESTSRC)/debug.h + +#start of OS_DK_INCS_FILES_EXC# do not remove or change this comment +ifeq ($(EXC),y) + OS_DK_INCS_FILES_EXC = \ + $(COMMON)/inc/EXC/paramOutExc.h \ + $(COMMON)/inc/EXC/osDot11Exc.h + + OS_DK_INCS_FILES += $(OS_DK_INCS_FILES_EXC) +endif +#end of OS_DK_INCS_FILES_EXC# 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)/inc \ + $(COMSRC)/inc \ + $(COMSRC)/core/inc \ + $(COMSRC)/core/sme/configMgr \ + $(COMSRC)/core/sme/HealthMonitor \ + $(COMSRC)/utils \ + $(COMSRC)/driver_bypass \ + $(COMSRC)/TNETW_Driver/Export_Inc \ + $(COMSRC)/TNETW_Driver/Ctrl/Export_Inc \ + $(COMSRC)/TNETW_Driver/MacServices/Export_Inc \ + $(COMSRC)/TNETW_Driver/FW_Transfer/inc \ + $(COMSRC)/BusAccess/Export_Inc \ + $(COMSRC)/hal/inc \ + $(COMSRC)/hal/FirmwareApi \ + $(COMSRC)/hal/TnetwServices \ + $(COMSRC)/hal/TnetwServices/TNETW1251 \ + $(COMSRC)/hal/Export_Inc \ + $(COMSRC)/hal/hw_ctrl \ + $(COMSRC)/hal/hl_ctrl \ + +#start of OS_DK_INCS_EXC# do not remove or change this comment +ifeq ($(EXC),y) + OS_DK_INCS_EXC = \ + $(COMMON)/inc/EXC + + OS_DK_INCS += $(OS_DK_INCS_EXC) +endif +#end of OS_DK_INCS_EXC# do not remove or change this comment + +#start of OS_DK_INCS# do not remove or change this comment diff --git a/sta_dk/pform/linux/mkcln.sh b/sta_dk/pform/linux/mkcln.sh new file mode 100644 index 0000000..215ba28 --- /dev/null +++ b/sta_dk/pform/linux/mkcln.sh @@ -0,0 +1,2 @@ +export PATH=/opt/arm-2008q1/bin:$PATH +make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- DV_KERNEL_BASELINE_IS=baseline2 KERNEL_DIR=/project1/omap3530/ti/2.6_kernel clean diff --git a/sta_dk/pform/linux/mkdrv.sh b/sta_dk/pform/linux/mkdrv.sh new file mode 100644 index 0000000..88ce29c --- /dev/null +++ b/sta_dk/pform/linux/mkdrv.sh @@ -0,0 +1,2 @@ +export PATH=/opt/arm-2008q1/bin:$PATH +make WSPI=n ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- DV_KERNEL_BASELINE_IS=baseline2 KERNEL_DIR=/project1/omap3530/ti/OMAP35x-PSP-SDK_02.01.01.08/OMAP35x-PSP-SDK-02.01.01.08/linux-02.01.01.08 diff --git a/sta_dk/pform/linux/src/iw_ioctl.c b/sta_dk/pform/linux/src/iw_ioctl.c new file mode 100644 index 0000000..5200a2b --- /dev/null +++ b/sta_dk/pform/linux/src/iw_ioctl.c @@ -0,0 +1,1906 @@ +/* ioctl() (mostly Linux Wireless Extensions) routines for TI 1251 driver */ + +#include +#include +#include +#include +#include "osAdapter.h" +#include "tiioctl.h" +#include "paramOut.h" +#include "osUtil.h" +#include "srcApi.h" +#include "configMgr.h" +#include "esta_drv.h" +#include "osUtil.h" +#include "scanMngrTypes.h" +#include "scanMngrTypes.h" + +#define IOCTL_DBG 0 + +static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, + 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; +#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0])) +#define MAX_SSID_LEN 32 +#define MAX_NAME_LEN 32 /* this is assumed to be equal to MAX_SSID_LEN */ +#define VAL_DEFAULT_KEY_ID 110 +#define WEP_KEYS 4 +//#define MEGA 1e6 + +scan_Params_t iw_appScanParams; +scan_Policy_t iw_scanPolicy; + +void init_scan_params(void) +{ + int i,j; + + /* init application scan default params */ + iw_appScanParams.desiredSsid.len = 0; + iw_appScanParams.scanType = SCAN_TYPE_NORMAL_ACTIVE; + iw_appScanParams.band = RADIO_BAND_2_4_GHZ; + iw_appScanParams.probeReqNumber = 3; + iw_appScanParams.probeRequestRate = DRV_RATE_MASK_2_BARKER; + iw_appScanParams.numOfChannels = 11; + for ( i = 0; i < 11; i++ ) + { + for ( j = 0; j < 6; j++ ) + { + iw_appScanParams.channelEntry[ i ].normalChannelEntry.bssId.addr[ j ] = 0xff; + } + iw_appScanParams.channelEntry[ i ].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE; + iw_appScanParams.channelEntry[ i ].normalChannelEntry.ETMaxNumOfAPframes = 0; + iw_appScanParams.channelEntry[ i ].normalChannelEntry.maxChannelDwellTime = 60000; + iw_appScanParams.channelEntry[ i ].normalChannelEntry.minChannelDwellTime = 30000; + iw_appScanParams.channelEntry[ i ].normalChannelEntry.txPowerDbm = MAX_POWER_LEVEL; + iw_appScanParams.channelEntry[ i ].normalChannelEntry.channel = i + 1; + } + + /* init default scan policy */ + iw_scanPolicy.normalScanInterval = 10000; + iw_scanPolicy.deterioratingScanInterval = 5000; + iw_scanPolicy.maxTrackFailures = 3; + iw_scanPolicy.BSSListSize = 4; + iw_scanPolicy.BSSNumberToStartDiscovery = 1; + iw_scanPolicy.numOfBands = 1; + iw_scanPolicy.bandScanPolicy[ 0 ].band = RADIO_BAND_2_4_GHZ; + iw_scanPolicy.bandScanPolicy[ 0 ].rxRSSIThreshold = -80; + iw_scanPolicy.bandScanPolicy[ 0 ].numOfChannles = 11; + iw_scanPolicy.bandScanPolicy[ 0 ].numOfChannlesForDiscovery = 3; + for ( i = 0; i < 11; i++ ) + { + iw_scanPolicy.bandScanPolicy[ 0 ].channelList[ i ] = i + 1; + } + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.maxChannelDwellTime = 30000; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.minChannelDwellTime = 15000; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.bitrate = DRV_RATE_MASK_1_BARKER; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3; + iw_scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = 1; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.maxChannelDwellTime = 30000; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.minChannelDwellTime = 15000; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.bitrate = DRV_RATE_MASK_2_BARKER; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3; + iw_scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = 1; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = 30000; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.minChannelDwellTime = 15000; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = DRV_RATE_MASK_5_5_CCK; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3; + iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = 1; +} + +static int iw_get_name(struct net_device *dev, + struct iw_request_info *info, + char *name, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif +/* + u8 rates[10]; + int len, i, over2 = 0; + + len = iw_get_datarates(dev, rates); + + for (i = 0; i < len; i++) { + if (rates[i] == 0x0b || rates[i] == 0x16) { + over2 = 1; + break; + } + } +*/ + strcpy(name, "IEEE 802.11g"); + + return 0; +} + +static int iw_ioctl_siwencode(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, char *keybuf) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + cipherSuite_e cipher; + int i; + ULONG len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + i = erq->flags & IW_ENCODE_INDEX; + if (i < 1 || i > 4) + { + UINT32 ID = VAL_DEFAULT_KEY_ID; + ULONG ID_size = 4; + UtilInfoCodeQueryInformation(pAdapter, (UINT8 *)&ID, &ID_size); + i = *((UINT8 *)&ID); + } + else + i--; + if (i < 0 || i >= WEP_KEYS) + return -EINVAL; + + UtilWepStatusGet(pAdapter, (UINT8 *)&cipher, &len); + + if (erq->flags & IW_ENCODE_DISABLED) { + cipherSuite_e val=RSN_CIPHER_NONE; + UtilWepStatusSet(pAdapter, (UINT8 *)&val, sizeof(val)); + goto done; + } + else + { + if (erq->length > 0) { + OS_802_11_WEP wep; + int len = erq->length <= 5 ? 5 : 13; + + cipherSuite_e val=RSN_CIPHER_WEP; + UtilWepStatusSet(pAdapter, (UINT8 *)&val, sizeof(val)); + + if (len > erq->length) + memset(keybuf + erq->length, 0, len - erq->length); + memcpy(wep.KeyMaterial, keybuf, len); + wep.Length = sizeof(wep); + wep.KeyIndex = i; + wep.KeyLength = len; + UtilAddWep(pAdapter, (UINT8 *)&wep, wep.Length, true); + } else { + /* No key data - just set the default TX key index */ + securityKeys_t key; + UINT8 data[5]; + + memset(&key, 0, sizeof(securityKeys_t)); + key.keyIndex = i; + if (!UtilWepKeyGet(pAdapter, (UINT8 *)&key, sizeof(securityKeys_t))) + { + if (key.encLen > 0) + { + *(UINT32 *)data = VAL_DEFAULT_KEY_ID; + data[4] = i; + UtilInfoCodeSetInformation(pAdapter, data, 5); + if (cipher == RSN_CIPHER_NONE) + { + cipherSuite_e val=RSN_CIPHER_WEP; + UtilWepStatusSet(pAdapter, (UINT8 *)&val, sizeof(val)); + } + } + else + return -EINVAL; + } + else + return -EINVAL; + } + } +done: + if (erq->flags & IW_ENCODE_OPEN) + { + UINT8 MixedMode = true; + UtilSetMixedMode(pAdapter, &MixedMode, 1); + } + else + { + UINT8 MixedMode = false; + UtilSetMixedMode(pAdapter, &MixedMode, 1); + } + return 0; +} + + +static int iw_ioctl_giwencode(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, char *key) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + cipherSuite_e cipher; + ULONG len, i; + UINT8 MixedMode; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + i = erq->flags & IW_ENCODE_INDEX; + if (i < 1 || i > 4) + { + UINT32 ID = VAL_DEFAULT_KEY_ID; + ULONG ID_size = 4; + UtilInfoCodeQueryInformation(pAdapter, (UINT8 *)&ID, &ID_size); + i = *((UINT8 *)&ID); + } + else + i--; + if (i < 0 || i >= WEP_KEYS) + return -EINVAL; + + UtilWepStatusGet(pAdapter, (UINT8 *)&cipher, &len); + erq->flags = i + 1; + +#if IOCTL_DBG + printk("%s Call cipher=%d\n", __FUNCTION__, cipher); +#endif + + if (cipher == RSN_CIPHER_NONE) { + erq->length = 0; + erq->flags |= IW_ENCODE_DISABLED; + } + else + { + securityKeys_t wkey; + /* only WEP is supported with wireless extensions, so just + * report that encryption is used */ + memset(&wkey, 0, sizeof(securityKeys_t)); + wkey.keyIndex = i; + if (!UtilWepKeyGet(pAdapter, (PUCHAR)&wkey, sizeof(securityKeys_t))) + { + printk("iw_ioctl_giwencode KeyIndex %x , keyLength=%d\n", + wkey.keyIndex, wkey.encLen); + if (wkey.encLen > 0) + { + int j; + erq->length = wkey.encLen; + memcpy(key, wkey.encKey, erq->length); + printk("key = "); + for (j=0;jlength;j++) + printk("%02x ", *(key+j)); + printk("\n"); + erq->flags |= IW_ENCODE_ENABLED; + } + else + { + erq->length = 0; + erq->flags |= IW_ENCODE_DISABLED; + } + } + else + { + erq->length = 0; + erq->flags |= IW_ENCODE_DISABLED; + } + } + + UtilGetMixedMode(pAdapter, RSN_MIXED_MODE, &MixedMode, &len); + if (MixedMode) + erq->flags |= IW_ENCODE_OPEN; + else + erq->flags |= IW_ENCODE_RESTRICTED; + + + return 0; +} + +static int iw_ioctl_siwrate(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (!rrq->fixed) + val = 0; + else + val = (rrq->value*2/1000000); + + return UtilDesiredRatesSet(pAdapter, (UINT8 *)&val, 4); +} + + +static int iw_ioctl_giwrate(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG val=0, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (UtilCurrentRatesGet(pAdapter, (UINT8 *)&val, &len)) + return -EINVAL; + + if (val > 0) + { + rrq->fixed = 1; + rrq->value = (val*1000000/2); + } + else + { + rrq->fixed = 1; + rrq->value = 54*1000000; + } + + return 0; +} + +static UINT8 list_buf[10000]; +/* Deprecated in new wireless extension API */ +static int iw_ioctl_giwaplist(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ + +#if 1 + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + struct sockaddr addr[IW_MAX_AP]; + struct iw_quality qual[IW_MAX_AP]; + UINT32 number_items; + ULONG len=10000; + OS_802_11_BSSID_EX *bssid; + OS_802_11_BSSID_LIST_EX *list; + int i; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + printk("iw_ioctl_giwaplist\n"); + memset(list_buf, 0, 10000); + UtilBssidListGet(pAdapter, list_buf, &len, TRUE, FALSE); + + list = (OS_802_11_BSSID_LIST_EX *) list_buf; + bssid = &list->Bssid[0]; + printk("bssid 0x%x\n",bssid); + number_items = list->NumberOfItems; + printk("number_items 0x%x\n",number_items); + + data->length = number_items; + + for (i=0;iMacAddress, 6); + //memset((UINT8 *)qual[i], 0, size(struct iw_quality)); + qual[i].qual = bssid->Rssi; + qual[i].level = 0; + qual[i].noise = 0; + qual[i].updated = 7; + bssid = (OS_802_11_BSSID_EX *) (((char *) bssid) + bssid->Length); + } + + memcpy(extra, &addr, sizeof(addr[0]) * data->length); + data->flags = 1; /* has quality information */ + memcpy(extra + sizeof(addr[0]) * data->length, &qual, + sizeof(qual[0]) * data->length); + + return 0; +#endif +} + + +static int iw_ioctl_siwrts(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rts, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (rts->disabled) + val = 2347; + else if (rts->value < 0 || rts->value > 2347) + return -EINVAL; + else + val = rts->value; + + UtilRtsThresholdSet(pAdapter, (UINT8 *)&val, 4); + + return 0; +} + +static int iw_ioctl_giwrts(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rts, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (UtilRtsThresholdGet(pAdapter, (UINT8 *)&val, &len)) + return -EINVAL; + if (val >= 2347) val = 2347; + rts->value = val; + rts->disabled = (rts->value == 2347); + rts->fixed = 1; + + return 0; +} + + +static int iw_ioctl_siwfrag(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rts, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (rts->disabled) + val = 2346; + else if (rts->value < 256 || rts->value > 2346) + return -EINVAL; + else + val = rts->value & ~0x1; /* even numbers only */ + + if (UtilFragmentationThresholdSet(pAdapter, (UINT8 *)&val, 4)) + return -EINVAL; + + return 0; +} + +static int iw_ioctl_giwfrag(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rts, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (UtilFragmentationThresholdGet(pAdapter, (UINT8 *)&val, &len)) + return -EINVAL; + + if (val >= 2346) val = 2346; + rts->value = val; + rts->disabled = (rts->value == 2346); + rts->fixed = 1; + + return 0; +} + + +static int iw_ioctl_siwap(struct net_device *dev, + struct iw_request_info *info, + struct sockaddr *ap_addr, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + return UtilSetBSSID(pAdapter, (UINT8 *)&ap_addr->sa_data, ETH_ALEN); +} + +static int iw_ioctl_giwap(struct net_device *dev, + struct iw_request_info *info, + struct sockaddr *ap_addr, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + ap_addr->sa_family = ARPHRD_ETHER; + return UtilGetBSSID(pAdapter, (UINT8 *)&ap_addr->sa_data, &len); +} + +static int iw_ioctl_giwnickn(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *nickname) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + data->length = 7; + memcpy(nickname, "ti 1250", 7); + + return 0; +} + + +static int iw_ioctl_siwfreq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *freq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (freq->m == -1) + return -EOPNOTSUPP; + + /* freq => chan. */ + if (freq->e == 1 && + freq->m / 100000 >= freq_list[0] && + freq->m / 100000 <= freq_list[FREQ_COUNT - 1]) { + int ch; + int fr = freq->m / 100000; + for (ch = 0; ch < FREQ_COUNT; ch++) { + if (fr == freq_list[ch]) { + freq->e = 0; + freq->m = ch + 1; + break; + } + } + } + + if (freq->e != 0 || freq->m < 1 || freq->m > FREQ_COUNT) + return -EINVAL; + + UtilDesiredChannelSet(pAdapter, (UINT8 *)&freq->m, 1); + + return 0; +} + +static int iw_ioctl_giwfreq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *freq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + UtilDesiredChannelGet(pAdapter, (UINT8 *)&val, &len); + if (val < 1 || val > FREQ_COUNT) + return -EINVAL; + + freq->m = freq_list[val - 1] * 100000; + freq->e = 1; + + return 0; +} + + +static int iw_ioctl_siwessid(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *ssid) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + OS_802_11_SSID essid; + OS_802_11_MAC_ADDRESS bssid = { 0xff,0xff,0xff,0xff,0xff,0xff }; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + + UtilSetBSSID(pAdapter, (UINT8 *)&bssid, sizeof(OS_802_11_MAC_ADDRESS)); + + memset(&essid, 0, sizeof(OS_802_11_SSID)); + memcpy(essid.Ssid, ssid, data->length); + essid.SsidLength = data->length; + + if (UtilSetSSID(pAdapter, (UINT8 *)&essid, sizeof(OS_802_11_SSID))){ + return -EINVAL; + } + + return 0; +} + +static int iw_ioctl_giwessid(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *essid) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG len=36; + OS_802_11_SSID ssid; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + memset(&ssid, 0, sizeof(OS_802_11_SSID)); + data->flags = 1; /* active */ + UtilGetSSID(pAdapter, (UINT8 *)&ssid, &len); + data->length = ssid.SsidLength; + memcpy(essid, ssid.Ssid, ssid.SsidLength); + + return 0; +} + +static int iw_ioctl_siwmode(struct net_device *dev, + struct iw_request_info *info, + __u32 *mode, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (*mode > IW_MODE_INFRA) + return -EOPNOTSUPP; + + switch (*mode) + { + case IW_MODE_AUTO: + val = 2; + break; + case IW_MODE_ADHOC: + val = 0; + break; + case IW_MODE_INFRA: + val = 1; + break; + default: + val = 1; + } + + UtilInfrastructureModeSet(pAdapter, (UINT8 *)&val, 4); + + return 0; +} + + +static int iw_ioctl_giwmode(struct net_device *dev, + struct iw_request_info *info, + __u32 *mode, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + ULONG val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + UtilInfrastructureModeGet(pAdapter, (UINT8 *)&val, &len); + switch (val) { + case 0: + *mode = IW_MODE_ADHOC; + break; + case 1: + *mode = IW_MODE_INFRA; + break; + case 2: + *mode = IW_MODE_AUTO; + break; + default: + *mode = IW_MODE_INFRA; + break; + } + return 0; +} + +int +iw_ioctl_siwsens(struct ieee80211com *ic, + struct iw_request_info *info, + struct iw_param *sens, char *extra) +{ + return 0; +} + +int +iw_ioctl_giwsens(struct ieee80211com *ic, + struct iw_request_info *info, + struct iw_param *sens, char *extra) +{ + sens->value = 3; + sens->fixed = 1; + + return 0; +} + +int +iw_ioctl_giwrange(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + struct iw_range *range = (struct iw_range *) extra; + ULONG val, len, i; + rates_t rateSet; + + data->length = sizeof(struct iw_range); + memset(range, 0, sizeof(struct iw_range)); + + /* TODO: could fill num_txpower and txpower array with + * something; however, there are 128 different values.. */ + + range->txpower_capa = IW_TXPOW_DBM; + + UtilInfrastructureModeGet(pAdapter, (UINT8 *)&val, &len); + range->min_pmp = 1 * 1024; + range->max_pmp = 65535 * 1024; + range->min_pmt = 1 * 1024; + range->max_pmt = 1000 * 1024; + range->pmp_flags = IW_POWER_PERIOD; + range->pmt_flags = IW_POWER_TIMEOUT; + range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | + IW_POWER_UNICAST_R | IW_POWER_ALL_R; + + range->we_version_compiled = WIRELESS_EXT; + range->we_version_source = 18; + + range->retry_capa = IW_RETRY_LIMIT; + range->retry_flags = IW_RETRY_LIMIT; + range->min_retry = 0; + range->max_retry = 255; + + range->num_channels = FREQ_COUNT; /* XXX */ + + val = 0; + for (i = 0; i < FREQ_COUNT; i++) { + range->freq[val].i = i + 1; + range->freq[val].m = freq_list[i] * 100000; + range->freq[val].e = 1; + val++; + if (val == IW_MAX_FREQUENCIES) + break; + } + range->num_frequency = val; + + /* Max quality is max field value minus noise floor */ + range->max_qual.qual = 0xff - 161; + + /* + * In order to use dBm measurements, 'level' must be lower + * than any possible measurement (see iw_print_stats() in + * wireless tools). It's unclear how this is meant to be + * done, but setting zero in these values forces dBm and + * the actual numbers are not used. + */ + range->max_qual.level = 0; + range->max_qual.noise = 0; + + range->sensitivity = 3; + + range->max_encoding_tokens = WEP_KEYS; + /* XXX query driver to find out supported key sizes */ + range->num_encoding_sizes = 2; + range->encoding_size[0] = 5; /* 40-bit */ + range->encoding_size[1] = 13; /* 104-bit */ + + /* XXX this only works for station mode */ + UtilGetParam(pAdapter, SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM, (PUCHAR)&rateSet, sizeof(rates_t)); + range->num_bitrates = 0; + for (i = 0; i < rateSet.len; i++) { + if (range->num_bitrates < IW_MAX_BITRATES) { + range->bitrate[range->num_bitrates] = + rateSet.ratesString[i] * 2 / 1000000; + range->num_bitrates++; + } + } + + /* estimated maximum TCP throughput values (bps) */ + range->throughput = 5500000; + + range->min_rts = 0; + range->max_rts = 2347; + range->min_frag = 256; + range->max_frag = 2346; + +#if WIRELESS_EXT > 16 + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | + IW_EVENT_CAPA_MASK(SIOCGIWAP) | + IW_EVENT_CAPA_MASK(SIOCGIWSCAN)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + range->event_capa[4] = (IW_EVENT_CAPA_MASK(IWEVTXDROP) | + IW_EVENT_CAPA_MASK(IWEVCUSTOM) | + IW_EVENT_CAPA_MASK(IWEVREGISTERED) | + IW_EVENT_CAPA_MASK(IWEVEXPIRED)); +#endif /* WIRELESS_EXT > 16 */ + +#if WIRELESS_EXT > 17 + range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | + IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP; +#endif /* WIRELESS_EXT > 17 */ + + return 0;} + +static int iw_ioctl_siwpower(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *wrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + UINT32 val=POWER_MODE_ACTIVE; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + + if (wrq->disabled) + { + UtilPowerModeSet(pAdapter, (UINT8 *)&val, sizeof(PowerMgr_PowerMode_e)); + return 0; + } + + switch (wrq->flags & IW_POWER_MODE) { + case IW_POWER_UNICAST_R: + case IW_POWER_ALL_R: + case IW_POWER_ON: + val = POWER_MODE_AUTO; + UtilPowerModeSet(pAdapter, &val, sizeof(PowerMgr_PowerMode_e)); + break; + default: + return -EINVAL; + } + + if (wrq->flags & IW_POWER_TIMEOUT) { + return -EOPNOTSUPP; + } + if (wrq->flags & IW_POWER_PERIOD) { + return -EOPNOTSUPP; + } + + return 0; +} + + +static int iw_ioctl_giwpower(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + UINT32 val=POWER_MODE_ACTIVE, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + UtilPowerModeGet(pAdapter, (UINT8 *)&val, &len); + + if (val==POWER_MODE_ACTIVE) { + rrq->disabled = 1; + return 0; + } + + rrq->disabled = 0; + + return 0; +} + + +static int iw_ioctl_siwretry(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (rrq->disabled) + return -EINVAL; + + if (rrq->flags & IW_RETRY_LIMIT) { + if (rrq->flags & IW_RETRY_MAX) + UtilLongRetrySet(pAdapter, (UINT8 *)&(rrq->value), sizeof(rrq->value)); + else if (rrq->flags & IW_RETRY_MIN) + UtilShortRetrySet(pAdapter, (UINT8 *)&(rrq->value), sizeof(rrq->value)); + else { + UtilLongRetrySet(pAdapter, (UINT8 *)&(rrq->value), sizeof(rrq->value)); + UtilShortRetrySet(pAdapter, (UINT8 *)&(rrq->value), sizeof(rrq->value)); + } + return 0; + } + + return -EOPNOTSUPP; +} + +static int iw_ioctl_giwretry(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u16 shortretry, longretry; + ULONG len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + if (UtilShortRetryGet(pAdapter, (UINT8 *)&shortretry, &len)!=0 || + UtilLongRetryGet(pAdapter, (UINT8 *)&longretry, &len)!=0) + return -EINVAL; + + rrq->disabled = 0; + + if ((rrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) { + return -EOPNOTSUPP; + } else { + if ((rrq->flags & IW_RETRY_MAX)) { + rrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; + rrq->value = longretry; + } else { + rrq->flags = IW_RETRY_LIMIT; + rrq->value = shortretry; + if (shortretry != longretry) + rrq->flags |= IW_RETRY_MIN; + } + } + return 0; +} + + +static int iw_ioctl_siwtxpow(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + return -EOPNOTSUPP; +} + +static int iw_ioctl_giwtxpow(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + INT8 val; + ULONG len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + + UtilTxPowerLevelDbmGet(pAdapter, &val, &len); + rrq->flags = IW_TXPOW_DBM; + rrq->value = val; + rrq->disabled = 0; + rrq->fixed = 0; + + return 0; +} + +u32 scan_TimeStamp; + +static int iw_ioctl_siwscan(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + int ret; + + scan_TimeStamp = jiffies; + init_scan_params(); + + ret = UtilStartAppScanSet(pAdapter, (PCHAR)&iw_appScanParams, sizeof(iw_appScanParams)); + + return ret; +} + +static inline int iw_scan_list(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + UINT32 number_items; + ULONG len=10000; + OS_802_11_BSSID_EX *bssid; + OS_802_11_BSSID_LIST_EX *list; + int i, j; + struct iw_event iwe; + char *current_ev = extra; + char *end_buf = extra + data->length; + u16 capabilities; + char *current_val; + char buf[64 * 2 + 30]; + OS_802_11_VARIABLE_IEs *pVarIes; + int IELen; + int chan; + u8 *pos; + spinlock_t lock; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + memset(list_buf, 0, 10000); + UtilBssidListGet(pAdapter, list_buf, &len, TRUE, FALSE); + + list = (OS_802_11_BSSID_LIST_EX *) list_buf; + bssid = &list->Bssid[0]; + number_items = list->NumberOfItems; + + spin_lock_bh(&lock); + for (i=0;iMacAddress, ETH_ALEN); + iwe.len = IW_EV_ADDR_LEN; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, + IW_EV_ADDR_LEN); + + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = SIOCGIWESSID; + iwe.u.data.length = bssid->Ssid.SsidLength; + iwe.u.data.flags = 1; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; +// printk("essid=%s len=%d\n", bssid->Ssid.Ssid, bssid->Ssid.SsidLength); + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, (char *)bssid->Ssid.Ssid); + + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = SIOCGIWMODE; + capabilities = bssid->Union.Capabilities; + if (capabilities & (WLAN_CAPABILITY_ESS | + WLAN_CAPABILITY_IBSS)) { + if (capabilities & WLAN_CAPABILITY_ESS) + iwe.u.mode = IW_MODE_MASTER; + else + iwe.u.mode = IW_MODE_ADHOC; + iwe.len = IW_EV_UINT_LEN; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, + IW_EV_UINT_LEN); + } + + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = SIOCGIWFREQ; + chan = bssid->Configuration.Union.channel; + if (chan > 0) { + iwe.u.freq.m = chan; + iwe.u.freq.e = 1; + iwe.len = IW_EV_FREQ_LEN; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, + IW_EV_FREQ_LEN); + } + + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVQUAL; + iwe.u.qual.qual = bssid->Rssi; + iwe.u.qual.level = 0; + iwe.u.qual.noise = 0; + iwe.u.qual.updated = IW_QUAL_LEVEL_UPDATED + | IW_QUAL_NOISE_UPDATED + | IW_QUAL_QUAL_INVALID; + iwe.len = IW_EV_QUAL_LEN; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, + IW_EV_QUAL_LEN); + + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = SIOCGIWENCODE; + if (capabilities & WLAN_CAPABILITY_PRIVACY) + iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY; + else + iwe.u.data.flags = IW_ENCODE_DISABLED; + iwe.u.data.length = 0; + iwe.len = IW_EV_POINT_LEN + iwe.u.data.length; + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); + + /* TODO: add SuppRates into BSS table */ + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = SIOCGIWRATE; + current_val = current_ev + IW_EV_LCP_LEN; + pos = bssid->SupportedRates; + for (j = 0; j < sizeof(bssid->SupportedRates); j++) { + if (pos[j] == 0) + break; + /* Bit rate given in 500 kb/s units (+ 0x80) */ + iwe.u.bitrate.value = ((pos[j] & 0x7f) * 500000); + current_val = iwe_stream_add_value( + current_ev, current_val, end_buf, &iwe, + IW_EV_PARAM_LEN); + } + /* Check if we added any event */ + if ((current_val - current_ev) > IW_EV_LCP_LEN) + current_ev = current_val; + + /* TODO: add BeaconInt,resp_rate,atim into BSS table */ + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVCUSTOM; + sprintf(buf, "bcn_int=%d", + bssid->Configuration.BeaconPeriod); + iwe.u.data.length = strlen(buf); + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, + buf); + + if (capabilities & WLAN_CAPABILITY_IBSS) { + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVCUSTOM; + sprintf(buf, "atim=%d", bssid->Configuration.ATIMWindow); + iwe.u.data.length = strlen(buf); + current_ev = iwe_stream_add_point(current_ev, end_buf, + &iwe, buf); + } + +#if 1 + IELen = 0; + IELen += sizeof(OS_802_11_FIXED_IEs); + pVarIes = (OS_802_11_VARIABLE_IEs*)&bssid->IEs[IELen]; + while (IELen < bssid->IELength) + { +// printk("IELen=%d pVarIes->ElementID=%d\n", IELen, pVarIes->ElementID); + if (pVarIes->ElementID == MFIE_TYPE_RSN || pVarIes->ElementID == MFIE_TYPE_GENERIC) { + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVGENIE; + iwe.u.data.length = pVarIes->Length; + current_ev = iwe_stream_add_point( + current_ev, end_buf, &iwe, (char *)pVarIes); + } + + IELen += (pVarIes->Length + 2); + pVarIes = (OS_802_11_VARIABLE_IEs*)&bssid->IEs[IELen]; + } +#endif + if ((end_buf - current_ev) <= IW_EV_ADDR_LEN) { + /* Ask user space to try again with a bigger buffer */ + spin_unlock_bh(&lock); + return -E2BIG; + } +// printk("current_ev=%x\n", current_ev); + bssid = (OS_802_11_BSSID_EX *) (((char *) bssid) + bssid->Length); + } + + spin_unlock_bh(&lock); + return current_ev - extra; +} + +static int iw_ioctl_giwscan(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val, len; + int res; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif +#if 0 + if (scan_TimeStamp && + time_before(jiffies, scan_TimeStamp + 30 * HZ)) { + printk("iw_ioctl_giwscan time: 0x%x 0x%x\n",scan_TimeStamp,time_before(jiffies, scan_TimeStamp + 30 * HZ)); + return -EAGAIN; + } +#endif + if((jiffies - scan_TimeStamp) <= 4 * HZ){ + return -EAGAIN; + } + + res = iw_scan_list(dev, info, data, extra); +// printk("iw_ioctl_giwscan end res=%d\n", res); + if (res >= 0) { + data->length = res; + return 0; + } else { + data->length = 0; + return res; + } +} + +#if 0 +static const struct iw_priv_args prism2_priv[] = { + { iw_ioctl_MONITOR, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "monitor" }, + { iw_ioctl_READMIF, + IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, + IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, "readmif" }, + { iw_ioctl_WRITEMIF, + IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 2, 0, "writemif" }, + { iw_ioctl_RESET, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "reset" }, + { iw_ioctl_INQUIRE, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "inquire" }, + { iw_ioctl_SET_RID_WORD, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "set_rid_word" }, + { iw_ioctl_MACCMD, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maccmd" }, +#ifdef PRISM2_USE_WE_TYPE_ADDR + { iw_ioctl_WDS_ADD, + IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "wds_add" }, + { iw_ioctl_WDS_DEL, + IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "wds_del" }, + { iw_ioctl_ADDMAC, + IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "addmac" }, + { iw_ioctl_DELMAC, + IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "delmac" }, + { iw_ioctl_KICKMAC, + IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "kickmac" }, +#else /* PRISM2_USE_WE_TYPE_ADDR */ + { iw_ioctl_WDS_ADD, + IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 18, 0, "wds_add" }, + { iw_ioctl_WDS_DEL, + IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 18, 0, "wds_del" }, + { iw_ioctl_ADDMAC, + IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 18, 0, "addmac" }, + { iw_ioctl_DELMAC, + IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 18, 0, "delmac" }, + { iw_ioctl_KICKMAC, + IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | 18, 0, "kickmac" }, +#endif /* PRISM2_USE_WE_TYPE_ADDR */ + /* --- raw access to sub-ioctls --- */ + { iw_ioctl_PRISM2_PARAM, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "prism2_param" }, + { iw_ioctl_GET_PRISM2_PARAM, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getprism2_param" }, +#ifdef PRISM2_USE_WE_SUB_IOCTLS + /* --- sub-ioctls handlers --- */ + { iw_ioctl_PRISM2_PARAM, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "" }, + { iw_ioctl_GET_PRISM2_PARAM, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "" }, + /* --- sub-ioctls definitions --- */ + { PRISM2_PARAM_TXRATECTRL, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "txratectrl" }, + { PRISM2_PARAM_TXRATECTRL, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gettxratectrl" }, + { PRISM2_PARAM_BEACON_INT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "beacon_int" }, + { PRISM2_PARAM_BEACON_INT, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbeacon_int" }, +#ifndef PRISM2_NO_STATION_MODES + { PRISM2_PARAM_PSEUDO_IBSS, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "pseudo_ibss" }, + { PRISM2_PARAM_PSEUDO_IBSS, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getpseudo_ibss" }, +#endif /* PRISM2_NO_STATION_MODES */ + { PRISM2_PARAM_ALC, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "alc" }, + { PRISM2_PARAM_ALC, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getalc" }, + { PRISM2_PARAM_DUMP, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dump" }, + { PRISM2_PARAM_DUMP, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdump" }, + { PRISM2_PARAM_OTHER_AP_POLICY, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "other_ap_policy" }, + { PRISM2_PARAM_OTHER_AP_POLICY, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getother_ap_pol" }, + { PRISM2_PARAM_AP_MAX_INACTIVITY, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "max_inactivity" }, + { PRISM2_PARAM_AP_MAX_INACTIVITY, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getmax_inactivi" }, + { PRISM2_PARAM_AP_BRIDGE_PACKETS, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "bridge_packets" }, + { PRISM2_PARAM_AP_BRIDGE_PACKETS, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbridge_packe" }, + { PRISM2_PARAM_DTIM_PERIOD, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dtim_period" }, + { PRISM2_PARAM_DTIM_PERIOD, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdtim_period" }, + { PRISM2_PARAM_AP_NULLFUNC_ACK, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "nullfunc_ack" }, + { PRISM2_PARAM_AP_NULLFUNC_ACK, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getnullfunc_ack" }, + { PRISM2_PARAM_MAX_WDS, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "max_wds" }, + { PRISM2_PARAM_MAX_WDS, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getmax_wds" }, + { PRISM2_PARAM_AP_AUTOM_AP_WDS, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "autom_ap_wds" }, + { PRISM2_PARAM_AP_AUTOM_AP_WDS, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getautom_ap_wds" }, + { PRISM2_PARAM_AP_AUTH_ALGS, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "ap_auth_algs" }, + { PRISM2_PARAM_AP_AUTH_ALGS, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getap_auth_algs" }, + { PRISM2_PARAM_MONITOR_ALLOW_FCSERR, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "allow_fcserr" }, + { PRISM2_PARAM_MONITOR_ALLOW_FCSERR, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getallow_fcserr" }, + { PRISM2_PARAM_HOST_ENCRYPT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "host_encrypt" }, + { PRISM2_PARAM_HOST_ENCRYPT, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethost_encrypt" }, + { PRISM2_PARAM_HOST_DECRYPT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "host_decrypt" }, + { PRISM2_PARAM_HOST_DECRYPT, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethost_decrypt" }, + { PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "busmaster_rx" }, + { PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbusmaster_rx" }, + { PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "busmaster_tx" }, + { PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbusmaster_tx" }, +#ifndef PRISM2_NO_STATION_MODES + { PRISM2_PARAM_HOST_ROAMING, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "host_roaming" }, + { PRISM2_PARAM_HOST_ROAMING, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethost_roaming" }, +#endif /* PRISM2_NO_STATION_MODES */ + { PRISM2_PARAM_BCRX_STA_KEY, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "bcrx_sta_key" }, + { PRISM2_PARAM_BCRX_STA_KEY, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbcrx_sta_key" }, + { PRISM2_PARAM_IEEE_802_1X, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "ieee_802_1x" }, + { PRISM2_PARAM_IEEE_802_1X, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getieee_802_1x" }, + { PRISM2_PARAM_ANTSEL_TX, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "antsel_tx" }, + { PRISM2_PARAM_ANTSEL_TX, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getantsel_tx" }, + { PRISM2_PARAM_ANTSEL_RX, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "antsel_rx" }, + { PRISM2_PARAM_ANTSEL_RX, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getantsel_rx" }, + { PRISM2_PARAM_MONITOR_TYPE, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "monitor_type" }, + { PRISM2_PARAM_MONITOR_TYPE, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getmonitor_type" }, + { PRISM2_PARAM_WDS_TYPE, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wds_type" }, + { PRISM2_PARAM_WDS_TYPE, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwds_type" }, + { PRISM2_PARAM_HOSTSCAN, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "hostscan" }, + { PRISM2_PARAM_HOSTSCAN, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethostscan" }, + { PRISM2_PARAM_AP_SCAN, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "ap_scan" }, + { PRISM2_PARAM_AP_SCAN, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getap_scan" }, + { PRISM2_PARAM_ENH_SEC, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "enh_sec" }, + { PRISM2_PARAM_ENH_SEC, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getenh_sec" }, +#ifdef PRISM2_IO_DEBUG + { PRISM2_PARAM_IO_DEBUG, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "io_debug" }, + { PRISM2_PARAM_IO_DEBUG, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getio_debug" }, +#endif /* PRISM2_IO_DEBUG */ + { PRISM2_PARAM_BASIC_RATES, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "basic_rates" }, + { PRISM2_PARAM_BASIC_RATES, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbasic_rates" }, + { PRISM2_PARAM_OPER_RATES, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "oper_rates" }, + { PRISM2_PARAM_OPER_RATES, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getoper_rates" }, + { PRISM2_PARAM_HOSTAPD, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "hostapd" }, + { PRISM2_PARAM_HOSTAPD, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethostapd" }, + { PRISM2_PARAM_HOSTAPD_STA, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "hostapd_sta" }, + { PRISM2_PARAM_HOSTAPD_STA, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethostapd_sta" }, + { PRISM2_PARAM_WPA, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wpa" }, + { PRISM2_PARAM_WPA, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwpa" }, + { PRISM2_PARAM_PRIVACY_INVOKED, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "privacy_invoked" }, + { PRISM2_PARAM_PRIVACY_INVOKED, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getprivacy_invo" }, + { PRISM2_PARAM_TKIP_COUNTERMEASURES, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "tkip_countermea" }, + { PRISM2_PARAM_TKIP_COUNTERMEASURES, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gettkip_counter" }, + { PRISM2_PARAM_DROP_UNENCRYPTED, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "drop_unencrypte" }, + { PRISM2_PARAM_DROP_UNENCRYPTED, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdrop_unencry" }, + { PRISM2_PARAM_SCAN_CHANNEL_MASK, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "scan_channels" }, + { PRISM2_PARAM_SCAN_CHANNEL_MASK, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getscan_channel" }, +#endif /* PRISM2_USE_WE_SUB_IOCTLS */ +}; +#endif + +#if WIRELESS_EXT > 17 +static int iw_ioctl_siwauth(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *data, char *extra) +{ +#if 0 + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + switch (data->flags & IW_AUTH_INDEX) { + case IW_AUTH_WPA_VERSION: + case IW_AUTH_CIPHER_PAIRWISE: + case IW_AUTH_CIPHER_GROUP: + case IW_AUTH_KEY_MGMT: + /* Host AP driver does not use these parameters and allows + * wpa_supplicant to control them internally. */ + break; + case IW_AUTH_TKIP_COUNTERMEASURES: + local->tkip_countermeasures = data->value; + break; + case IW_AUTH_DROP_UNENCRYPTED: + local->drop_unencrypted = data->value; + break; + case IW_AUTH_80211_AUTH_ALG: + local->auth_algs = data->value; + break; + case IW_AUTH_WPA_ENABLED: + if (data->value == 0) { + local->wpa = 0; + if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) + break; + prism2_set_genericelement(dev, "", 0); + local->host_roaming = 0; + local->privacy_invoked = 0; + if (hostap_set_word(dev, HFA384X_RID_SSNHANDLINGMODE, + 0) || + hostap_set_roaming(local) || + hostap_set_encryption(local) || + local->func->reset_port(dev)) + return -EINVAL; + break; + } + if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) + return -EOPNOTSUPP; + local->host_roaming = 2; + local->privacy_invoked = 1; + local->wpa = 1; + if (hostap_set_word(dev, HFA384X_RID_SSNHANDLINGMODE, 1) || + hostap_set_roaming(local) || + hostap_set_encryption(local) || + local->func->reset_port(dev)) + return -EINVAL; + break; + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + local->ieee_802_1x = data->value; + break; + case IW_AUTH_PRIVACY_INVOKED: + local->privacy_invoked = data->value; + break; + default: + return -EOPNOTSUPP; + } + return 0; +#endif + return -EOPNOTSUPP; +} + + +static int iw_ioctl_giwauth(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *data, char *extra) +{ +#if 0 + PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter); + u32 val, len; + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + switch (data->flags & IW_AUTH_INDEX) { + case IW_AUTH_WPA_VERSION: + case IW_AUTH_CIPHER_PAIRWISE: + case IW_AUTH_CIPHER_GROUP: + case IW_AUTH_KEY_MGMT: + /* Host AP driver does not use these parameters and allows + * wpa_supplicant to control them internally. */ + return -EOPNOTSUPP; + case IW_AUTH_TKIP_COUNTERMEASURES: + data->value = local->tkip_countermeasures; + break; + case IW_AUTH_DROP_UNENCRYPTED: + data->value = local->drop_unencrypted; + break; + case IW_AUTH_80211_AUTH_ALG: + data->value = local->auth_algs; + break; + case IW_AUTH_WPA_ENABLED: + data->value = local->wpa; + break; + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + data->value = local->ieee_802_1x; + break; + default: + return -EOPNOTSUPP; + } + return 0; +#endif + return -EOPNOTSUPP; +} + + +static int iw_ioctl_siwencodeext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, char *extra) +{ + +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif +#if 0 + struct hostap_interface *iface = dev->priv; + local_info_t *local = iface->local; + struct iw_encode_ext *ext = (struct iw_encode_ext *) extra; + int i, ret = 0; + struct hostap_crypto_ops *ops; + struct prism2_crypt_data **crypt; + void *sta_ptr; + u8 *addr; + const char *alg, *module; + + i = erq->flags & IW_ENCODE_INDEX; + if (i > WEP_KEYS) + return -EINVAL; + if (i < 1 || i > WEP_KEYS) + i = local->tx_keyidx; + else + i--; + if (i < 0 || i >= WEP_KEYS) + return -EINVAL; + + addr = ext->addr.sa_data; + if (addr[0] == 0xff && addr[1] == 0xff && addr[2] == 0xff && + addr[3] == 0xff && addr[4] == 0xff && addr[5] == 0xff) { + sta_ptr = NULL; + crypt = &local->crypt[i]; + } else { + if (i != 0) + return -EINVAL; + sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); + if (sta_ptr == NULL) { + if (local->iw_mode == IW_MODE_INFRA) { + /* TODO: add STA entry for the current AP so + * that unicast key can be used. For now, this + * is emulated by using default key idx 0. */ + i = 0; + crypt = &local->crypt[i]; + } else + return -EINVAL; + } + } + + if ((erq->flags & IW_ENCODE_DISABLED) || + ext->alg == IW_ENCODE_ALG_NONE) { + if (*crypt) + prism2_crypt_delayed_deinit(local, crypt); + goto done; + } + + switch (ext->alg) { + case IW_ENCODE_ALG_WEP: + alg = "WEP"; + module = "hostap_crypt_wep"; + break; + case IW_ENCODE_ALG_TKIP: + alg = "TKIP"; + module = "hostap_crypt_tkip"; + break; + case IW_ENCODE_ALG_CCMP: + alg = "CCMP"; + module = "hostap_crypt_ccmp"; + break; + default: + printk(KERN_DEBUG "%s: unsupported algorithm %d\n", + local->dev->name, ext->alg); + ret = -EOPNOTSUPP; + goto done; + } + + ops = hostap_get_crypto_ops(alg); + if (ops == NULL) { + request_module(module); + ops = hostap_get_crypto_ops(alg); + } + if (ops == NULL) { + printk(KERN_DEBUG "%s: unknown crypto alg '%s'\n", + local->dev->name, alg); + ret = -EOPNOTSUPP; + goto done; + } + + if (sta_ptr || ext->alg != IW_ENCODE_ALG_WEP) { + /* station based encryption and other than WEP algorithms + * require host-based encryption, so force them on + * automatically */ + local->host_decrypt = local->host_encrypt = 1; + } + + if (*crypt == NULL || (*crypt)->ops != ops) { + struct prism2_crypt_data *new_crypt; + + prism2_crypt_delayed_deinit(local, crypt); + + new_crypt = (struct prism2_crypt_data *) + kmalloc(sizeof(struct prism2_crypt_data), GFP_KERNEL); + if (new_crypt == NULL) { + ret = -ENOMEM; + goto done; + } + memset(new_crypt, 0, sizeof(struct prism2_crypt_data)); + new_crypt->ops = ops; + new_crypt->priv = new_crypt->ops->init(i); + if (new_crypt->priv == NULL) { + kfree(new_crypt); + ret = -EINVAL; + goto done; + } + + *crypt = new_crypt; + } + + /* TODO: if ext_flags does not have IW_ENCODE_EXT_RX_SEQ_VALID, the + * existing seq# should not be changed. */ + /* TODO: if ext_flags has IW_ENCODE_EXT_TX_SEQ_VALID, next TX seq# + * should be changed to something else than zero. */ + if ((!(ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) || ext->key_len > 0) + && (*crypt)->ops->set_key && + (*crypt)->ops->set_key(ext->key, ext->key_len, ext->rx_seq, + (*crypt)->priv) < 0) { + printk(KERN_DEBUG "%s: key setting failed\n", + local->dev->name); + ret = -EINVAL; + goto done; + } + + if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { + if (!sta_ptr) + local->tx_keyidx = i; + else if (i) { + ret = -EINVAL; + goto done; + } + } + + + if (sta_ptr == NULL && ext->key_len > 0) { + int first = 1, j; + for (j = 0; j < WEP_KEYS; j++) { + if (j != i && local->crypt[j]) { + first = 0; + break; + } + } + if (first) + local->tx_keyidx = i; + } + + done: + if (sta_ptr) + hostap_handle_sta_release(sta_ptr); + + local->open_wep = erq->flags & IW_ENCODE_OPEN; + + /* Do not reset port0 if card is in Managed mode since resetting will + * generate new IEEE 802.11 authentication which may end up in looping + * with IEEE 802.1X. Prism2 documentation seem to require port reset + * after WEP configuration. However, keys are apparently changed at + * least in Managed mode. */ + if (ret == 0 && + (hostap_set_encryption(local) || + (local->iw_mode != IW_MODE_INFRA && + local->func->reset_port(local->dev)))) + ret = -EINVAL; + + return ret; +#endif + return -EOPNOTSUPP; +} + + +static int iw_ioctl_giwencodeext(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif +#if 0 + struct hostap_interface *iface = dev->priv; + local_info_t *local = iface->local; + struct prism2_crypt_data **crypt; + void *sta_ptr; + int max_key_len, i; + struct iw_encode_ext *ext = (struct iw_encode_ext *) extra; + u8 *addr; + + max_key_len = erq->length - sizeof(*ext); + if (max_key_len < 0) + return -EINVAL; + + i = erq->flags & IW_ENCODE_INDEX; + if (i < 1 || i > WEP_KEYS) + i = local->tx_keyidx; + else + i--; + + addr = ext->addr.sa_data; + if (addr[0] == 0xff && addr[1] == 0xff && addr[2] == 0xff && + addr[3] == 0xff && addr[4] == 0xff && addr[5] == 0xff) { + sta_ptr = NULL; + crypt = &local->crypt[i]; + } else { + i = 0; + sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); + if (sta_ptr == NULL) + return -EINVAL; + } + erq->flags = i + 1; + memset(ext, 0, sizeof(*ext)); + + if (*crypt == NULL || (*crypt)->ops == NULL) { + ext->alg = IW_ENCODE_ALG_NONE; + ext->key_len = 0; + erq->flags |= IW_ENCODE_DISABLED; + } else { + if (strcmp((*crypt)->ops->name, "WEP") == 0) + ext->alg = IW_ENCODE_ALG_WEP; + else if (strcmp((*crypt)->ops->name, "TKIP") == 0) + ext->alg = IW_ENCODE_ALG_TKIP; + else if (strcmp((*crypt)->ops->name, "CCMP") == 0) + ext->alg = IW_ENCODE_ALG_CCMP; + else + return -EINVAL; + + if ((*crypt)->ops->get_key) { + ext->key_len = + (*crypt)->ops->get_key(ext->key, + max_key_len, + ext->tx_seq, + (*crypt)->priv); + if (ext->key_len && + (ext->alg == IW_ENCODE_ALG_TKIP || + ext->alg == IW_ENCODE_ALG_CCMP)) + ext->ext_flags |= IW_ENCODE_EXT_TX_SEQ_VALID; + } + } + + if (sta_ptr) + hostap_handle_sta_release(sta_ptr); + + return 0; +#endif + return -EOPNOTSUPP; +} +#endif /* WIRELESS_EXT > 17 */ + + +#if WIRELESS_EXT > 17 +static int iw_ioctl_siwgenie(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + return -EOPNOTSUPP; +} +#endif + +static int iw_ioctl_giwgenie(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + return -EOPNOTSUPP; +} + + +#if WIRELESS_EXT > 17 +static int iw_ioctl_siwmlme(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) +{ +#if IOCTL_DBG + printk("%s Call\n", __FUNCTION__); +#endif + return -EOPNOTSUPP; +} +#endif + +/* Structures to export the Wireless Handlers */ + +static const iw_handler ti_handler[] = +{ + (iw_handler) NULL, /* SIOCSIWCOMMIT */ + (iw_handler) iw_get_name, /* SIOCGIWNAME */ + (iw_handler) NULL, /* SIOCSIWNWID */ + (iw_handler) NULL, /* SIOCGIWNWID */ + (iw_handler) iw_ioctl_siwfreq, /* SIOCSIWFREQ */ + (iw_handler) iw_ioctl_giwfreq, /* SIOCGIWFREQ */ + (iw_handler) iw_ioctl_siwmode, /* SIOCSIWMODE */ + (iw_handler) iw_ioctl_giwmode, /* SIOCGIWMODE */ + (iw_handler) iw_ioctl_siwsens, /* SIOCSIWSENS */ + (iw_handler) iw_ioctl_giwsens, /* SIOCGIWSENS */ + (iw_handler) NULL /* not used */, /* SIOCSIWRANGE */ + (iw_handler) iw_ioctl_giwrange, /* SIOCGIWRANGE */ + (iw_handler) NULL /* not used */, /* SIOCSIWPRIV */ + (iw_handler) NULL /* kernel code */, /* SIOCGIWPRIV */ + (iw_handler) NULL /* not used */, /* SIOCSIWSTATS */ + (iw_handler) NULL /* kernel code */, /* SIOCGIWSTATS */ +#if WIRELESS_EXT > 15 + (iw_handler) NULL, /* SIOCSIWSPY */ + (iw_handler) NULL, /* SIOCGIWSPY */ + (iw_handler) NULL, /* SIOCSIWTHRSPY */ + (iw_handler) NULL, /* SIOCGIWTHRSPY */ +#else /* WIRELESS_EXT > 15 */ + (iw_handler) NULL, /* SIOCSIWSPY */ + (iw_handler) NULL, /* SIOCGIWSPY */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ +#endif /* WIRELESS_EXT > 15 */ + (iw_handler) iw_ioctl_siwap, /* SIOCSIWAP */ + (iw_handler) iw_ioctl_giwap, /* SIOCGIWAP */ +#if WIRELESS_EXT > 17 + (iw_handler) iw_ioctl_siwmlme, /* SIOCSIWMLME */ +#else /* WIRELESS_EXT > 17 */ + (iw_handler) NULL, /* -- hole -- */ +#endif /* WIRELESS_EXT > 17 */ + (iw_handler) iw_ioctl_giwaplist, /* SIOCGIWAPLIST */ + (iw_handler) iw_ioctl_siwscan, /* SIOCSIWSCAN */ + (iw_handler) iw_ioctl_giwscan, /* SIOCGIWSCAN */ + (iw_handler) iw_ioctl_siwessid, /* SIOCSIWESSID */ + (iw_handler) iw_ioctl_giwessid, /* SIOCGIWESSID */ + (iw_handler) NULL, /* SIOCSIWNICKN */ + (iw_handler) iw_ioctl_giwnickn, /* SIOCGIWNICKN */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) iw_ioctl_siwrate, /* SIOCSIWRATE */ + (iw_handler) iw_ioctl_giwrate, /* SIOCGIWRATE */ + (iw_handler) iw_ioctl_siwrts, /* SIOCSIWRTS */ + (iw_handler) iw_ioctl_giwrts, /* SIOCGIWRTS */ + (iw_handler) iw_ioctl_siwfrag, /* SIOCSIWFRAG */ + (iw_handler) iw_ioctl_giwfrag, /* SIOCGIWFRAG */ + (iw_handler) iw_ioctl_siwtxpow, /* SIOCSIWTXPOW */ + (iw_handler) iw_ioctl_giwtxpow, /* SIOCGIWTXPOW */ + (iw_handler) iw_ioctl_siwretry, /* SIOCSIWRETRY */ + (iw_handler) iw_ioctl_giwretry, /* SIOCGIWRETRY */ + (iw_handler) iw_ioctl_siwencode, /* SIOCSIWENCODE */ + (iw_handler) iw_ioctl_giwencode, /* SIOCGIWENCODE */ + (iw_handler) iw_ioctl_siwpower, /* SIOCSIWPOWER */ + (iw_handler) iw_ioctl_giwpower, /* SIOCGIWPOWER */ +#if WIRELESS_EXT > 17 + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) iw_ioctl_siwgenie, /* SIOCSIWGENIE */ + (iw_handler) iw_ioctl_giwgenie, /* SIOCGIWGENIE */ + (iw_handler) iw_ioctl_siwauth, /* SIOCSIWAUTH */ + (iw_handler) iw_ioctl_giwauth, /* SIOCGIWAUTH */ + (iw_handler) iw_ioctl_siwencodeext, /* SIOCSIWENCODEEXT */ + (iw_handler) iw_ioctl_giwencodeext, /* SIOCGIWENCODEEXT */ + (iw_handler) NULL, /* SIOCSIWPMKSA */ + (iw_handler) NULL, /* -- hole -- */ +#endif /* WIRELESS_EXT > 17 */ +}; + +#if 0 +static const iw_handler ti_private_handler[] = +{ /* SIOCIWFIRSTPRIV + */ + (iw_handler) iw_ioctl_priv_prism2_param, /* 0 */ + (iw_handler) iw_ioctl_priv_get_prism2_param, /* 1 */ + (iw_handler) iw_ioctl_priv_writemif, /* 2 */ + (iw_handler) iw_ioctl_priv_readmif, /* 3 */ +}; +#endif + +static const struct iw_handler_def ti_iw_handler_def = +{ + .num_standard = sizeof(ti_handler) / sizeof(iw_handler), +// .num_private = sizeof(ti_private_handler) / sizeof(iw_handler), +// .num_private_args = sizeof(ti_priv) / sizeof(struct iw_priv_args), + .standard = (iw_handler *) ti_handler, +// .private = (iw_handler *) ti_private_handler, +// .private_args = (struct iw_priv_args *) ti_priv, +#if WIRELESS_EXT == 16 +// .spy_offset = offsetof(struct hostap_interface, spy_data), +#endif /* WIRELESS_EXT == 16 */ +#if WIRELESS_EXT > 16 +// .get_wireless_stats = ti_get_wireless_stats, +#endif /* WIRELESS_EXT > 16 */ +}; + +void tiwlan_iwhandler_init(struct net_device *dev) +{ + dev->wireless_handlers = (struct iw_handler_def *) &ti_iw_handler_def; +} diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/802_11Defs.h b/sta_dk/pform/linux/src/wlan_driver_inc/802_11Defs.h new file mode 100644 index 0000000..c5123a0 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/802_11Defs.h @@ -0,0 +1,1297 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" +#include "commonTypes.h" +#include "paramIn.h" + +/* 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_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) ((TRUE << DOT11_FC_WEP_SHIFT) & (fc)) +#define IS_DATA(fc) (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_DATA) +#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 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; + +#define DOT11_QOS_CONTROL_ACK 0x0000 +#define DOT11_QOS_CONTROL_DONT_ACK 0x0020 + +#pragma pack(1) +PACKED_STRUCT( dot11_header_t, + + UINT16 fc; + UINT16 duration; + macAddress_t address1; + macAddress_t address2; + macAddress_t address3; + UINT16 seqCtrl; + UINT16 qosControl; +/* macAddress_t address4;*/ +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( legacy_dot11_header_t, + + UINT16 fc; + UINT16 duration; + macAddress_t address1; + macAddress_t address2; + macAddress_t address3; + UINT16 seqCtrl; +); +#pragma pack() + + + +#pragma pack(1) +PACKED_STRUCT( dot11_mgmtHeader_t, + + UINT16 fc; + UINT16 duration; + macAddress_t DA; + macAddress_t SA; + macAddress_t BSSID; + UINT16 seqCtrl; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( Wlan_LlcHeader_T, + + UINT8 DSAP; + UINT8 SSAP; + UINT8 Control; + UINT8 OUI[3]; + UINT16 Type; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( dot11_PsPollFrameHeader_t, + + UINT16 fc; + UINT16 AID; + macAddress_t BSSID; + macAddress_t TA; +); +#pragma pack() + + + +#define FCS_SIZE 4 + +#define WLAN_HDR_LEN 24 +#define WLAN_QOS_HDR_LEN 26 +#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( ( ((*(UINT16*)(macHeaderPointer)) & DOT11_FC_TYPESUBTYPE_MASK) == DOT11_FC_DATA_QOS ) || ( ((*(UINT16*)(macHeaderPointer)) & DOT11_FC_TYPESUBTYPE_MASK) == DOT11_FC_DATA_NULL_QOS ) ) *headerSize = WLAN_QOS_HDR_LEN; else *headerSize = WLAN_HDR_LEN; + +/* data body max length */ +#define MAX_DATA_BODY_LENGTH 2312 + +/**************************************************************************************** + 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 */ +#define MAX_BEACON_BODY_LENGTH 300 + +/* general mgmt frame structure */ + +PACKED_STRUCT( dot11_mgmtFrame_t, + + dot11_mgmtHeader_t hdr; + char body[MAX_MGMT_BODY_LENGTH]; +); + +/* 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_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 + * --------------------------- + */ + + +PACKED_STRUCT( dot11_eleHdr_t, + + UINT8 eleId; + UINT8 eleLen; +); + +/* fixed fields lengths, except of currentAP & timestamp*/ +#define FIX_FIELD_LEN 2 + +/* SSID Information Element */ +#define DOT11_SSID_ELE_ID 0 + +PACKED_STRUCT( dot11_SSID_t, + + dot11_eleHdr_t hdr; + char serviceSetId[MAX_SSID_LEN]; +); + + +/* Supportted rates Information Element */ +#define DOT11_SUPPORTED_RATES_ELE_ID 1 +#define DOT11_EXT_SUPPORTED_RATES_ELE_ID 50 + +PACKED_STRUCT( dot11_RATES_t, + + dot11_eleHdr_t hdr; + UINT8 rates[MAX_SUPPORTED_RATES]; +); + + +#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 + +PACKED_STRUCT( dot11_ERP_t, + + dot11_eleHdr_t hdr; + UINT8 ctrl; +); + +/* RSN Information Element */ +#define DOT11_RSN_MAX 255 + +PACKED_STRUCT( dot11_RSN_t, + + dot11_eleHdr_t hdr; + UINT8 rsnIeData[DOT11_RSN_MAX]; +); + +/* general definitions needed by whalWpa.c and 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 + +PACKED_STRUCT( dot11_DS_PARAMS_t, + + dot11_eleHdr_t hdr; + UINT8 currChannel; +); + + +/* DS params Information Element */ +#define DOT11_IBSS_PARAMS_ELE_ID 6 +#define DOT11_IBSS_PARAMS_ELE_LEN 2 + +PACKED_STRUCT( dot11_IBSS_PARAMS_t, + + dot11_eleHdr_t hdr; + UINT16 atimWindow; +); + +#define DOT11_FH_PARAMS_ELE_ID 2 +#define DOT11_FH_PARAMS_ELE_LEN 5 + +PACKED_STRUCT( dot11_FH_PARAMS_t, + + dot11_eleHdr_t hdr; + UINT16 dwellTime; + UINT8 hopSet; + UINT8 hopPattern; + UINT8 hopIndex; +); + +/* tim Information Element */ +#define DOT11_TIM_ELE_ID 5 +#define DOT11_PARTIAL_VIRTUAL_BITMAP_MAX 251 + +PACKED_STRUCT( dot11_TIM_t, + + dot11_eleHdr_t hdr; + UINT8 dtimCount; + UINT8 dtimPeriod; + UINT8 bmapControl; + UINT8 partialVirtualBmap[DOT11_PARTIAL_VIRTUAL_BITMAP_MAX]; +); + +/* tim Information Element */ +#define DOT11_CF_ELE_ID 4 +#define DOT11_CF_PARAMS_ELE_LEN 6 + +PACKED_STRUCT( dot11_CF_PARAMS_t, + + dot11_eleHdr_t hdr; + UINT8 cfpCount; + UINT8 cfpPeriod; + UINT16 cfpMaxDuration; + UINT16 cfpDurRemain; +); + +/* Challenge text Information Element */ +#define DOT11_CHALLENGE_TEXT_ELE_ID 16 +#define DOT11_CHALLENGE_TEXT_MAX 253 + +PACKED_STRUCT( dot11_CHALLENGE_t, + + dot11_eleHdr_t hdr; + UINT8 text[ DOT11_CHALLENGE_TEXT_MAX ]; +); + + +/* Country Inforamtion Element */ +#define DOT11_COUNTRY_ELE_ID 7 +#define DOT11_COUNTRY_ELE_LEN_MAX ( ((NUM_OF_MAX_TRIPLET_CHANNEL+1)*3) + !((NUM_OF_MAX_TRIPLET_CHANNEL&0x1))) + +PACKED_STRUCT( dot11_COUNTRY_t, + + dot11_eleHdr_t hdr; + countryIE_t countryIE; +); + + +/* Power Constraint Information Element */ +#define DOT11_POWER_CONSTRAINT_ELE_ID (32) +#define DOT11_POWER_CONSTRAINT_ELE_LEN (1) + +PACKED_STRUCT( dot11_POWER_CONSTRAINT_t, + + dot11_eleHdr_t hdr; + UINT8 powerConstraint; +); + + + +/* Power Capability Information Element */ +#define DOT11_CAPABILITY_ELE_ID (33) +#define DOT11_CAPABILITY_ELE_LEN (2) + +PACKED_STRUCT( dot11_CAPABILITY_t, + + dot11_eleHdr_t hdr; + UINT8 minTxPower; + UINT8 maxTxPower; +); + +/* TPC request Information Element */ +#define DOT11_TPC_REQUEST_ELE_ID (34) +#define DOT11_TPC_REQUEST_ELE_LEN (0) + +PACKED_STRUCT( dot11_TPC_REQUEST_t, + + dot11_eleHdr_t hdr; +); + +/* TPC report Information Element */ +#define DOT11_TPC_REPORT_ELE_ID (35) +#define DOT11_TPC_REPORT_ELE_LEN (2) + +PACKED_STRUCT( dot11_TPC_REPORT_t, + + dot11_eleHdr_t hdr; + UINT8 transmitPower; + UINT8 linkMargin; +); + +#ifdef EXC_MODULE_INCLUDED +/* Cell Transmit Power Information Element */ +#define DOT11_CELL_TP_ELE_ID (150) +#define DOT11_CELL_TP_ELE_LEN (6) + +PACKED_STRUCT( dot11_CELL_TP_t, + + dot11_eleHdr_t hdr; + UINT8 oui[4]; + UINT8 power; + UINT8 reerved; +); + +#define DOT11_CELL_TP \ + dot11_CELL_TP_t *cellTP; + +#else +#define DOT11_CELL_TP +#endif + +/* Channel Supported Information Element */ +#define DOT11_CHANNEL_SUPPORTED_ELE_ID (36) +#define DOT11_CHANNEL_SUPPORTED_ELE_LEN (26) + +PACKED_STRUCT( dot11_CHANNEL_SUPPORTED_t, + + dot11_eleHdr_t hdr; + UINT8 supportedChannel[DOT11_CHANNEL_SUPPORTED_ELE_LEN]; + +); + +/* Channel Switch Announcement Information Element */ +#define DOT11_CHANNEL_SWITCH_ELE_ID (37) +#define DOT11_CHANNEL_SWITCH_ELE_LEN (3) + +PACKED_STRUCT( dot11_CHANNEL_SWITCH_t, + + dot11_eleHdr_t hdr; + UINT8 channelSwitchMode; + UINT8 channelNumber; + UINT8 channelSwitchCount; +); + +#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) + +PACKED_STRUCT( dot11_MEASUREMENT_REQUEST_t, + + dot11_eleHdr_t hdr; + UINT8 measurementToken; + UINT8 measurementMode; + UINT8 measurementType; + UINT8 measurementRequests[DOT11_MEASUREMENT_REQUEST_LEN*MAX_NUM_REQ]; +); + + +/* Measurement report Information Element */ +#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) + +PACKED_STRUCT( dot11_MEASUREMENT_REPORT_t, + + dot11_eleHdr_t hdr; + UINT8 measurementToken; + UINT8 measurementMode; + UINT8 measurementType; + UINT8 measurementReports[DOT11_MAX_MEASUREMENT_REPORT_LEN*MAX_NUM_REQ]; +); + +/* Quiet Information Element */ +#define DOT11_QUIET_ELE_ID (40) +#define DOT11_QUIET_ELE_LEN (6) + +PACKED_STRUCT( dot11_QUIET_t, + + dot11_eleHdr_t hdr; + UINT8 quietCount; + UINT8 quietPeriod; + UINT16 quietDuration; + UINT16 quietOffset; +); + + +/* 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) + + +PACKED_STRUCT( dot11_QOS_CAPABILITY_IE_t, + + dot11_eleHdr_t hdr; + UINT8 QosInfoField; +); + +/* 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) + +PACKED_STRUCT( dot11_WME_IE_t, + + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 OUIType; + UINT8 OUISubType; + UINT8 version; + UINT8 ACInfoField; +); + + +/* WME Parameter Information Element */ +#define DOT11_WME_PARAM_ELE_ID (221) +#define DOT11_WME_PARAM_ELE_LEN (24) + +PACKED_STRUCT( dot11_WME_PARAM_t, + + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 OUIType; + UINT8 OUISubType; + UINT8 version; + UINT8 ACInfoField; + UINT8 reserved; + ACParameters_t WME_ACParameteres; +); + +#define dot11_WPA_OUI_TYPE (1) +#define dot11_WME_OUI_TYPE (2) +#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 ----------------- */ + +#pragma pack(1) +PACKED_STRUCT( tsInfo_t, + + UINT8 tsInfoArr[3]; + +); +#pragma pack() + + +#pragma pack(1) + +/* 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 */ +PACKED_STRUCT( dot11_WME_TSPEC_IE_hdr_t, + + dot11_eleHdr_t hdr; + + UINT8 OUI[3]; + UINT8 oui_type; + UINT8 oui_subtype; + UINT8 version; + + tsInfo_t tsInfoField; +); + + +PACKED_STRUCT( dot11_WME_TSPEC_IE_t, + + dot11_WME_TSPEC_IE_hdr_t tHdr; + + UINT16 nominalMSDUSize; + UINT16 maximumMSDUSize; + UINT32 minimumServiceInterval; + UINT32 maximumServiceInterval; + UINT32 inactivityInterval; + UINT32 suspensionInterval; + UINT32 serviceStartTime; + UINT32 minimumDataRate; + UINT32 meanDataRate; + UINT32 peakDataRate; + UINT32 maximumBurstSize; + UINT32 delayBound; + UINT32 minimumPHYRate; + UINT16 surplusBandwidthAllowance; + UINT16 mediumTime; +); +#pragma pack() + +#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 +} EXC_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 + + +/* 4X Information Element */ +#define DOT11_4X_ELE_ID 0xDD +#define DOT11_4X_MAX_LEN 64 +#define DOT11_OUI_LEN 3 +#define TI_OUI {0x08,0x00,0x28} +#define WPA_IE_OUI {0x00, 0x50, 0xf2} +#define EXC_OUI {0x00, 0x40, 0x96} + + +#define _WlanTIcap_t(_) \ + _(TI_CAP_4X_CONCATENATION, = 1) \ + _(TI_CAP_4X_CONT_WINDOW, = 2) \ + _(TI_CAP_4X_CONT_WINDOW_COMBO, = 3) \ + _(TI_CAP_4X_TCP_ACK_EMUL, = 4) \ + _(TI_CAP_TRICK_PACKET_ERP, = 5) + +PACKED_ENUM (WlanTIcap_t,_WlanTIcap_t); + + +PACKED_STRUCT( dot11_4X_t, + + dot11_eleHdr_t hdr; + UINT8 fourXCapabilities[DOT11_4X_MAX_LEN]; +); + +/* Action field structure + used for extended management action such as spectrum management */ + +PACKED_STRUCT( dot11_ACTION_FIELD_t, + + UINT8 category; + UINT8 action; +); + + +/* 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, + QOS_CAPABILITY_IE_ID = 46, + RSN_IE_ID = 48, + EXT_SUPPORTED_RATES_IE_ID = 50, + EXC_EXT_1_IE_ID = 133, + EXC_EXT_2_IE_ID = 149, + CELL_POWER_IE = 150, /*EXC*/ + WPA_IE_ID = 221, + TI_4X_IE_ID = WPA_IE_ID + +} 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 */ + +PACKED_STRUCT( probeReqTemplate_t, + + dot11_mgmtHeader_t hdr; + char infoElements[sizeof( dot11_SSID_t ) + + sizeof( dot11_RATES_t ) + + sizeof( dot11_RATES_t ) ]; +); + + +PACKED_STRUCT( probeRspTemplate_t, + + dot11_mgmtHeader_t hdr; + UINT8 timeStamp[TIME_STAMP_LEN]; + UINT16 beaconInterval; + 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) ]; +); + + +PACKED_STRUCT( nullDataTemplate_t, + + dot11_mgmtHeader_t hdr; +); + + +PACKED_STRUCT( psPollTemplate_t, + + dot11_PsPollFrameHeader_t hdr; +); + + +PACKED_STRUCT( QosNullDataTemplate_t, + + dot11_header_t hdr; +); + +#pragma pack(1) +/* Traffic Stream Rate Set (TSRS) info-elements */ +PACKED_STRUCT( dot11_TSRS_STA_IE_t, + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 oui_type; + UINT8 tsid; + UINT8 tsNominalRate; +); + +PACKED_STRUCT( dot11_TSRS_IE_t, + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 oui_type; + UINT8 tsid; + UINT8 tsRates[8]; +); + +/* MSDU lifetime info-element */ +PACKED_STRUCT( dot11_MSDU_LIFE_TIME_IE_t, + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 oui_type; + UINT8 tsid; + UINT16 msduLifeTime; +); + +PACKED_STRUCT( dot11_TS_METRICS_IE_t, + dot11_eleHdr_t hdr; + UINT8 OUI[3]; + UINT8 oui_type; + UINT8 tsid; + UINT8 state; + UINT16 measureInterval; +); + +PACKED_STRUCT( EXCv4IEs_t, + dot11_TSRS_IE_t *trafficStreamParameter; + dot11_MSDU_LIFE_TIME_IE_t *edcaLifetimeParameter; + dot11_TS_METRICS_IE_t *tsMetrixParameter; +); +#pragma pack() + +/* Disassociation frame structure */ +#pragma pack(1) +PACKED_STRUCT( disAssoc_t, + + UINT16 reason; +); +#pragma pack() + +/* (Re)Association response frame structure */ +#define ASSOC_RESP_FIXED_DATA_LEN 6 +#pragma pack(1) +PACKED_STRUCT( assocRsp_t, + + UINT16 capabilities; + UINT16 status; + UINT16 aid; + dot11_RATES_t *pRates; + dot11_RATES_t *pExtRates; + BOOL useProtection; + BOOL ciscoIEPresent; + preamble_e barkerPreambleMode; + BOOL NonErpPresent; + dot11_4X_t *fourXParams; + dot11_WME_PARAM_t *WMEParams; + dot11_RSN_t *pRsnIe; + UINT8 rsnIeLen; + dot11_QOS_CAPABILITY_IE_t *QoSCapParameters; + dot11_WME_TSPEC_IE_t *tspecVoiceParameters; + dot11_WME_TSPEC_IE_t *tspecSignalParameters; + EXCv4IEs_t excIEs[MAX_NUM_OF_AC]; +); +#pragma pack() + + +/* 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. */ + +/* In case the removing the PACKED_STRUCT for beacon_probeRsp_t it's possible to merge the 2 structures below */ + +#ifdef EXC_MODULE_INCLUDED + +PACKED_STRUCT( beacon_probeRsp_t, + + char timestamp[TIME_STAMP_LEN]; + UINT16 beaconInerval; + 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; + dot11_CELL_TP_t *cellTP; + dot11_WME_PARAM_t *WMEParams; + + dot11_RATES_t *pExtRates; + BOOL useProtection; + preamble_e barkerPreambleMode; + BOOL NonErpPresent; + dot11_FH_PARAMS_t *pFHParamsSet; + dot11_DS_PARAMS_t *pDSParamsSet; + dot11_CF_PARAMS_t *pCFParamsSet; + dot11_IBSS_PARAMS_t *pIBSSParamsSet; + dot11_4X_t *fourXParams; /* for probe response only */ + dot11_RSN_t *pRsnIe; + UINT8 rsnIeLen; + dot11_QOS_CAPABILITY_IE_t *QoSCapParameters; + dot11_TIM_t *pTIM; /* for beacons only */ +); + +#else + +PACKED_STRUCT( beacon_probeRsp_t, + + char timestamp[TIME_STAMP_LEN]; + UINT16 beaconInerval; + 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; + dot11_WME_PARAM_t *WMEParams; + dot11_RATES_t *pExtRates; + BOOL useProtection; + preamble_e barkerPreambleMode; + BOOL NonErpPresent; + dot11_FH_PARAMS_t *pFHParamsSet; + dot11_DS_PARAMS_t *pDSParamsSet; + dot11_CF_PARAMS_t *pCFParamsSet; + dot11_IBSS_PARAMS_t *pIBSSParamsSet; + dot11_4X_t *fourXParams; /* for probe response only */ + dot11_RSN_t *pRsnIe; + UINT8 rsnIeLen; + dot11_QOS_CAPABILITY_IE_t *QoSCapParameters; + dot11_TIM_t *pTIM; /* for beacons only */ +); + +#endif + +/* Authentication message frame structure */ +#pragma pack(1) +PACKED_STRUCT( authMsg_t, + + UINT16 authAlgo; + UINT16 seqNum; + UINT16 status; + dot11_CHALLENGE_t *pChallenge; +); +#pragma pack() + +/* DeAuthentication message frame structure */ +#pragma pack(1) +PACKED_STRUCT( deAuth_t, + + UINT16 reason; +); +#pragma pack() + +/* Action message frame structure */ +#pragma pack(1) +PACKED_STRUCT( action_t, + + UINT8 frameType; + UINT8 category; + UINT8 action; +); +#pragma pack() + + +/* TPCReport message frame structure */ +#pragma pack(1) +PACKED_STRUCT( TPCReport_t, + + dot11_ACTION_FIELD_t actionField; + UINT8 dialogToken; + dot11_TPC_REPORT_t TPCReport; +); +#pragma pack() + +/* Measurement Report message frame structure */ +#pragma pack(1) +PACKED_STRUCT( MeasurementReportFrame_t, + + dot11_ACTION_FIELD_t actionField; + UINT8 dialogToken; + dot11_MEASUREMENT_REPORT_t measurementReportIE; +); +#pragma pack() + +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 + +} 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; + + +/* MACROS */ +#define INRANGE(x,low,high) (((x) >= (low)) && ((x) <= (high))) +#define OUTRANGE(x,low,high) (((x) < (low)) || ((x) > (high))) + +#define WLAN_4X_LEN_FIELD_LEN 2 +#define WLAN_DA_FIELD_LEN 6 +#define WLAN_DA_FIELD_OFFSET 16 +#define WLAN_BSSID_FIELD_OFFSET 4 +#define WLAN_SA_FIELD_OFFSET 10 +#define WLAN_CONCAT_HDR_LEN (WLAN_4X_LEN_FIELD_LEN + WLAN_DA_FIELD_LEN) /* 2+6 = 8 */ +#define WLAN_CONCAT_HDR_OFFSET (WLAN_HDR_LEN - WLAN_CONCAT_HDR_LEN) /* 24-8 = 16 */ + +/* 4X definitions */ +#pragma pack(1) +PACKED_STRUCT( Wdrv4xHeader_t, + + UINT8 type; + UINT8 headerLen; + UINT16 txFlags; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( dot11_DataMsduHeader_t, + + dot11_header_t dot11Header; + Wlan_LlcHeader_T snapHeader; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( legacy_dot11_DataMsduHeader_t, + + legacy_dot11_header_t dot11Header; + Wlan_LlcHeader_T snapHeader; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( dot114xMsdu_t, + + legacy_dot11_DataMsduHeader_t msduHeader; + Wdrv4xHeader_t header4x; +); +#pragma pack() + +#pragma pack(1) +PACKED_STRUCT( Wdrv4xConcatHeader_t, + + UINT16 len; + macAddress_t SaDa; +); +#pragma pack() + +typedef enum +{ + NOT_4X_MSDU = -1, + CONCATENATION = 1, + ACK_EMULATION = 2, + MANAGMENT_4X = 3 +} Wlan4XType_t; + + +#define WLAN_HEADER_TYPE_CONCATENATION 0x01 +#define WLAN_CONCAT_HEADER_LEN 2 + +#define WLAN_4X_CONCAT_HDR_LEN 4 + +#define WLAN_4X_CONCAT_MORE_BIT 0x0001 + + +#endif /* _802_11_INFO_DEFS_H */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/CmdQueue_api.h b/sta_dk/pform/linux/src/wlan_driver_inc/CmdQueue_api.h new file mode 100644 index 0000000..ce97420 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/CmdQueue_api.h @@ -0,0 +1,98 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: CmdQueue_api.h */ +/* PURPOSE: CmdQueue api */ +/* */ +/**********************************************************************************/ +#ifndef _CMDQUEUE_API_H_ +#define _CMDQUEUE_API_H_ + +#include "whalCommon.h" +#include "public_commands.h" + +/***************************************************************************** + ** Defines ** + *****************************************************************************/ + +/***************************************************************************** + ** Enums ** + *****************************************************************************/ + +/***************************************************************************** + ** Structures ** + *****************************************************************************/ + +/***************************************************************************** + ** Types ** + *****************************************************************************/ + +/***************************************************************************** + ** APIs definitions ** + *****************************************************************************/ + +TI_HANDLE CmdQueue_Create(TI_HANDLE hOS); +int CmdQueue_Destroy(TI_HANDLE hCmdQueue); +int CmdQueue_Config(TI_HANDLE hCmdQueue, TI_HANDLE hCmdMBox, + TI_HANDLE hReport); +int CmdQueue_StartReconfig(TI_HANDLE hCmdQueue); +int CmdQueue_EndReconfig(TI_HANDLE hCmdQueue); +int CmdQueue_RegisterCmdCompleteGenericCB(TI_HANDLE hCmdQueue, void *CB_Func, TI_HANDLE CB_handle); +int CmdQueue_RegisterForErrorCB(TI_HANDLE hCmdQueue, void *CB_Func, TI_HANDLE CB_handle); +int CmdQueue_CmdConfigure(TI_HANDLE hCmdQueue, void *MboxBuf,UINT32 ParamsLen); +int CmdQueue_CmdConfigureWithCb(TI_HANDLE hCmdQueue, void *MboxBuf, UINT32 ParamsLen, + void *CB_Func, TI_HANDLE CB_handle); +int CmdQueue_CmdInterrogate(TI_HANDLE hCmdQueue, void *MboxBuf, UINT32 ParamsLen); +int CmdQueue_CmdInterrogateWithCb(TI_HANDLE hCmdQueue, void *MboxBuf, UINT32 ParamsLen, + void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf); +int CmdQueue_Command(TI_HANDLE hCmdQueue, Command_e MboxCmdType, char *MboxBuf, UINT32 ParamsLen); +int CmdQueue_CommandWithCb(TI_HANDLE hCmdQueue, Command_e MboxCmdType, void *MboxBuf, UINT32 ParamsLen, + void *CB_Func, TI_HANDLE CB_handle, void* CB_Buf); +int CmdQueue_GetMaxNumberOfCommands (TI_HANDLE hCmdQueue); +void CmdQueue_Print(TI_HANDLE hCmdQueue); +void CmdQueue_PrintHistory(TI_HANDLE hCmdQueue, int NunOfCmd); +int CmdQueue_ResultReceived(TI_HANDLE hCmdQueue, UINT32 status); +int CmdQueue_Error (TI_HANDLE hCmdQueue); +int CmdQueue_SendCmplt(TI_HANDLE hCmdQueue); +#ifdef REPORT_LOG +char* CmdQueue_GetIEString(int MboxCmdType, UINT16 Id); +char* CmdQueue_GetCmdString(int MboxCmdType); +char* CmdQueue_GetErrorString(CommandStatus_e MboxError); +#endif /* REPORT_LOG */ + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/Core_Api.h b/sta_dk/pform/linux/src/wlan_driver_inc/Core_Api.h new file mode 100644 index 0000000..fa08cd6 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/Core_Api.h @@ -0,0 +1,74 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: Core.h */ +/* PURPOSE: */ +/* */ +/***************************************************************************/ +#ifndef _CORE_API_H_ +#define _CORE_API_H_ + +#include "memMngrEx.h" +#include "whalBus_Defs.h" +#include "Core_AdaptTx.h" + + +/*#if 1 /* IMPORT_FROM_4_0_1 */*/ +/*typedef struct*/ +/*{*/ + /* Import the 4.0.1 Data Path Tx/Rx Callbacks */ + /*CoreAdapt_TxCompleteStatusCB_t ctrlData_TxCompleteStatusCB;*/ + /*CoreAdapt_SendPacketTranferCB_t txData_SendPacketTranferCB;*/ + /*CoreAdapt_QueueFreeEventCB_t txData_QueueFreeEventCB;*/ + /*CoreAdapt_msduReceiveCB_t rxData_msduReceiveCB; */ + + /*failureEventCB_t healthMonitor_FailureEventCB;*/ +/*} coreCallbacks_t;*/ + +/*#else*/ + +/*typedef struct*/ +/*{*/ +/* TxCompleteStatusCB_t ctrlData_TxCompleteStatusCB;*/ +/* msduReceiveCB_t rxData_msduReceiveCB;*/ +/* scanCompleteCB_t scan_scanCompleteCB;*/ +/* failureEventCB_t healthMonitor_FailureEventCB;*/ +/*} coreCallbacks_t;*/ + +/*#endif*/ + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/Ethernet.h b/sta_dk/pform/linux/src/wlan_driver_inc/Ethernet.h new file mode 100644 index 0000000..3d30eb9 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/Ethernet.h @@ -0,0 +1,165 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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_ + +#pragma pack(1) +typedef struct +{ + macAddress_t DstAddr; + macAddress_t SrcAddr; + UINT16 TypeLength; +} EthernetHeader_t; +#pragma pack() + +#define ETHERTYPE_802_1D 0x8100 + +typedef struct +{ + macAddress_t DstAddr; + macAddress_t SrcAddr; + UINT16 Length; + UINT8 DSAP; + UINT8 SSAP; + UINT8 Control; + UINT8 OUI[3]; + UINT16 Type; +} LlcSnapHeader_t; +#pragma pack() + +#define MAC_ADDRESS_GROUP_BIT ( 0x01 ) /* in byte [ 0 ] of the MAC Address*/ + + +#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 } + + +typedef enum tETHERTYPES +{ + ETHERTYPE_APPLE_AARP = 0x80f3, + ETHERTYPE_DIX_II_IPX = 0x8137 + +} ETHERTYPES, *PETHERTYPES; + + +static __inline BOOL IsMacAddressZero( macAddress_t *pMacAddr ) +{ + return( (BOOL)( ( 0 == * (unsigned long *)pMacAddr ) && + ( 0 == *(unsigned short *)( ( (unsigned long *)pMacAddr ) + 1 ) ) ) ); + +} + + +static __inline void ClearMacAddress( macAddress_t *pMacAddr ) +{ + * (unsigned long *)pMacAddr = 0; + *(unsigned short *)( ( (unsigned long *)pMacAddr ) + 1 ) = 0; +} + + +static __inline BOOL IsMacAddressEqual( macAddress_t *pMacAddr1, macAddress_t *pMacAddr2 ) +{ + return( (BOOL)( + ( * (unsigned long *)pMacAddr1 == + * (unsigned long *)pMacAddr2 ) && + + ( *( (unsigned short *)( ( (unsigned long *)pMacAddr1 ) + 1 ) ) == + *( (unsigned short *)( ( (unsigned long *)pMacAddr2 ) + 1 ) ) ) ) ); +} + +static __inline void SetMacAddressBroadcast( macAddress_t *pMacAddr ) +{ + * (unsigned long *)pMacAddr = 0xffffffff; + *(unsigned short *)( ( (unsigned long *)pMacAddr ) + 1 ) = 0xffff; + +} + + +static __inline BOOL IsMacAddressGroup( macAddress_t *pMACAddr ) +{ + return( pMACAddr->addr[ 0 ] & MAC_ADDRESS_GROUP_BIT ); +} + + +static __inline BOOL IsMacAddressDirected( macAddress_t *pMACAddr ) +{ + return( !IsMacAddressGroup( pMACAddr ) ); +} + + + +static __inline BOOL IsMacAddressBroadcast( macAddress_t *pMacAddr ) +{ +/* In WinCE an adrress that is not divided by 4 causes exception here */ + return( (BOOL)( ( 0xffff == *(unsigned short *)pMacAddr ) && + ( 0xffff == *(((unsigned short *)pMacAddr) + 1 ) ) && + ( 0xffff == *(((unsigned short *)pMacAddr) + 2 ) ))); +/* return( (BOOL)( ( 0xffffffff == * (unsigned long *)pMacAddr ) && + ( 0xffff == *(unsigned short *)( ( (unsigned long *)pMacAddr ) + 1 ) ) ) );*/ + +} + + +static __inline BOOL IsMacAddressMulticast( macAddress_t *pMACAddr ) +{ + return( IsMacAddressGroup( pMACAddr ) && !IsMacAddressBroadcast( pMACAddr ) ); +} + + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/EvHandler.h b/sta_dk/pform/linux/src/wlan_driver_inc/EvHandler.h new file mode 100644 index 0000000..bf2d26d --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/EvHandler.h @@ -0,0 +1,80 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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]; + UINT32 TailIndex; /* Points to the next free node*/ + UINT32 HeadIndex; /* Points to the first occupied node*/ + UINT32 Counter; +}EV_CYCL_ARRAY, *PEV_CYCL_ARRAY; + +typedef struct _EV_HANDLER_STRUCT_T { + + TI_HANDLE hOs; + IPC_EVENT_PARAMS RegistrationArray[IPC_EVENT_MAX][MAX_REGISTERED_MODULES]; + EV_CYCL_ARRAY SendEventArray; + UINT32 LastUMEventType; + +}EV_HANDLER_STRUCT_T, *PEV_HANDLER_STRUCT_T; + +/* Upper Interface*/ +TI_HANDLE EvHandlerInit (TI_HANDLE hOs); + +UINT32 EvHandlerUnload (TI_HANDLE hEvHandler); + +UINT32 EvHandlerRegisterEvent (TI_HANDLE hEvHandler, PUCHAR pData, ULONG Length); + +UINT32 EvHandlerUnRegisterEvent (TI_HANDLE hEvHandler, TI_HANDLE uEventID); + +UINT32 EvHandlerMaskEvent (TI_HANDLE hEvHandler, UINT32 uEventID); + +UINT32 EvHandlerUnMaskEvent (TI_HANDLE hEvHandler, UINT32 uEventID); + +UINT32 EvHandlerGetEventData (TI_HANDLE hEvHandler, PUCHAR pData, ULONG* pLength); + +/* Bottom Interface*/ + +UINT32 EvHandlerSendEvent (TI_HANDLE hEvHandler, UINT32 EvType, UINT8* pData, UINT32 Length); + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/IPCKernelApi.h b/sta_dk/pform/linux/src/wlan_driver_inc/IPCKernelApi.h new file mode 100644 index 0000000..2e232b1 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/IPCKernelApi.h @@ -0,0 +1,47 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" + +UINT32 IPCKernelInit (TI_HANDLE hAdapter,TI_HANDLE hIPCEv); + +UINT32 IPCKernelDeInit (TI_HANDLE hAdapter); + + INT32 IPC_EventSend (TI_HANDLE hAdapter, tiUINT8 *pEvData, tiUINT32 EvDataSize); + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/MacServices_api.h b/sta_dk/pform/linux/src/wlan_driver_inc/MacServices_api.h new file mode 100644 index 0000000..a93a1f8 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/MacServices_api.h @@ -0,0 +1,589 @@ +/** \file MacServicesApi.h + * \brief This file include public definitions for the MacServices module, comprising its API. + * \author Yuval Adler + * \date 6-Oct-2005 + */ + /**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 __MACSERVICESAPI_H__ +#define __MACSERVICESAPI_H__ + +#include "commonTypes.h" +#include "osApi.h" +/*#include "whalCtrl_api.h"*/ +#include "scanTypes.h" +#include "measurementTypes.h" + +/* + *********************************************************************** + * Constant definitions. + *********************************************************************** + */ + +/* + *********************************************************************** + * Enums. + *********************************************************************** + */ +typedef enum +{ + POWERAUTHO_AWAKE_NOT_REQUIRED = 0, + POWERAUTHO_AWAKE_REQUIRED = 1 +} MacServices_powerAutho_AwakeRequired_e; + +typedef enum +{ + POWERAUTHO_AWAKE_REASON_CONNECTION = 0, + POWERAUTHO_AWAKE_REASON_FIRST_BEACON , + POWERAUTHO_AWAKE_REASON_OUT_OS_SYNC, + POWERAUTHO_AWAKE_REASON_IBSS +} MacServices_powerAutho_AwakeReason_e; + +/* + *********************************************************************** + * Typedefs. + *********************************************************************** + */ + + /** \typedef scan_srvCompleteCB_t + * \brief Defines the function prototype for the scan complete callback + */ +typedef void (*scan_srvCompleteCB_t) ( TI_HANDLE clientObj, UINT16 SPSStatus, BOOLEAN TSFError , TI_STATUS ScanStatus , TI_STATUS PSMode); + +/** \typedef measurement_srvCompleteCB_t + * \brief Defines the function prototype for the measurement complete callback + */ +typedef void (*measurement_srvCompleteCB_t)( TI_HANDLE clientObj, measurement_reply_t* msrReply ); + +typedef void (*CmdResponseCB_t )(TI_HANDLE objectHandle,UINT16 MboxStatus); + + +/*Power server callbacks*/ +typedef void (*MacServices_powerSaveCmdResponseCB_t )(TI_HANDLE cmdResponseHandle,UINT8 MboxStatus); +/*typedef void (*powerSaveCmdResponseCB_t )(TI_HANDLE cmdResponseHandle,UINT8 MboxStatus);*/ + +typedef void (*MacServices_powerSaveCmpltCB_t )(TI_HANDLE powerSaveCmpltHandle,UINT8 PSMode,UINT8 transStatus); +/*typedef void (*powerSaveCmpltCB_t )(TI_HANDLE powerSaveCmpltHandle,UINT8 PSMode,UINT8 transStatus);*/ + + + + + +/* + *********************************************************************** + * 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 hHalCtrl - handle to the HAL ctrl object.\n + * \param hHealthMonitor - can be send as NULL. \n + */ +void MacServices_init( TI_HANDLE hMacServices, TI_HANDLE hReport, TI_HANDLE hHalCtrl); + +void MacServices_config( TI_HANDLE hMacServices,TnetwDrv_InitParams_t *pInitParams); + +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, + scan_srvCompleteCB_t 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 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 OK if successful (various, TBD codes if not).\n + */ +TI_STATUS MacServices_scanSRV_scan( TI_HANDLE hMacServices, scan_Params_t *scanParams, BOOLEAN bHighPriority, + BOOLEAN bDriverMode, BOOLEAN bScanOnDriverModeError, + PowerMgr_802_11_PsMode_e psRequest, BOOLEAN bSendNullData, + CmdResponseCB_t 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 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 OK if successful (various, TBD codes if not).\n + */ +TI_STATUS MacServices_scanSRV_stopScan( TI_HANDLE hMacServices, BOOLEAN bSendNullData , CmdResponseCB_t 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 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, UINT8 PSMode,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, 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 ); + +#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 - OK / PENDING / 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, + PowerMgr_802_11_PsMode_e psMode, + BOOL sendNullDataOnExit, + void * powerSaveCompleteCBObject, + MacServices_powerSaveCmpltCB_t powerSaveCompleteCB, + MacServices_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 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 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, + PowerMgr_802_11_PsMode_e psMode, + BOOL sendNullDataOnExit, + void * powerSaveCBObject, + MacServices_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 - OK on success else 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, + BOOL sendNullDataOnExit, + void * powerSaveCBObject, + MacServices_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 + * BOOLEAN - thre is in PS false otherwise.\n +*/ +BOOLEAN 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) UINT16 - desierd rate .\n + * Return Value:\n + * void.\n +*/ +void MacServices_powerSrv_SetRateModulation(TI_HANDLE hMacServices, 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: UINT16 - desierd rate .\n + * void.\n +*/ +UINT16 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 OK if successful (various, TBD codes if not).\n + */ +TI_STATUS MacServices_measurementSRV_startMeasurement( TI_HANDLE hMacServices, + measurement_request_t* pMsrRequest, + UINT32 timeToRequestExpiryMs, + CmdResponseCB_t cmdResponseCBFunc, + TI_HANDLE cmdResponseCBObj, + measurement_srvCompleteCB_t 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 OK if successful (various, TBD codes if not).\n + */ +TI_STATUS MacServices_measurementSRV_stopMeasurement( TI_HANDLE hMacServices, + BOOLEAN bSendNullData, + CmdResponseCB_t 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, UINT8 PSMode,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, 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, 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, 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 ); + +/** + * \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 ); + + +/** + * \author Victor Eisikovits\n + * \date 24-Nov-2005\n + * \brief updates the PowerPolicy and calcs the new MinPowerPolicy of the sustem + * + * Function Scope \e Public.\n + * \param hMacServices - the handle to the MacServices module. + * aPowerPolicy - the new power policy. + */ +int MacServices_powerAutho_PowerPolicyUpdate(TI_HANDLE hMacServices, powerAutho_PowerPolicy_e aPowerPolicy); + +/** + * \author Victor Eisikovits\n + * \date 24-Nov-2005\n + * \brief send the min power level to the FW for the first time + * + * Function Scope \e Public.\n + * \param hMacServices - the handle to the MacServices module. + */ +int MacServices_powerAutho_ExitFromInit(TI_HANDLE hMacServices); + +/** + * \author Victor Eisikovits\n + * \date 24-Nov-2005\n + * \brief updates the AwakeRequired and calcs the new MinPowerPolicy of the sustem + * + * Function Scope \e Public.\n + * \param hMacServices - the handle to the MacServices module. + * aAwakeRequired - the awake required parameter, + * can be according to the enum required or not_required. + */ +int MacServices_powerAutho_AwakeRequiredUpdate(TI_HANDLE hMacServices, MacServices_powerAutho_AwakeRequired_e aAwakeRequired, MacServices_powerAutho_AwakeReason_e aAwakeReason); + +int MacServices_powerAutho_EndRecovery(TI_HANDLE hMacServices); + +int powerAutho_Restart(TI_HANDLE hPowerAutho); + +#endif /* __MACSERVICESAPI_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/TI_IPC_Api.h b/sta_dk/pform/linux/src/wlan_driver_inc/TI_IPC_Api.h new file mode 100644 index 0000000..6241a36 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/TI_IPC_Api.h @@ -0,0 +1,155 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _TI_IPC_API_H +#define _TI_IPC_API_H + +#include "osTIType.h" +#include "TI_Results.h" + + +#define MAX_REGISTERED_MODULES 5 +#define MAX_EVENT_DATA_SIZE 2048 +#define MAX_SEND_EVENTS 4 + +#ifdef _WINDOWS +#endif + +#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_COMPLETE, + IPC_EVENT_TIMEOUT, + 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_SNR, + 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_GWSI, + IPC_EVENT_BT_COEX_MODE, + IPC_EVENT_MAX +}; + +enum +{ + DELIVERY_PUSH =0, + DELIVERY_GET_DATA +}; + +/************************* IOCTLs Functions *******************************/ + +TI_HANDLE IPC_Init(void); + +tiINT32 IPC_DeInit(void); + +TI_HANDLE IPC_DeviceOpen(tiVOID* AdapterName); /* get hDevice Handle*/ + +tiINT32 IPC_DeviceClose(TI_HANDLE hDevice); + +tiINT32 IPC_DeviceIoControl(TI_HANDLE hDevice, + tiUINT32 IoControlCode, + tiVOID* pInBuffer, + tiUINT32 InBufferSize, + tiVOID* pOutBuffer, + tiUINT32 pOutBufferSize, + tiUINT32* pBytesReturned); + +/************************* Events Functions *******************************/ + +typedef struct _IPC_EV_DATA * PIPC_EV_DATA; + +typedef tiINT32 (*TI_EVENT_CALLBACK) (PIPC_EV_DATA pData); + +typedef struct _IPC_EVENT_PARAMS +{ + tiUINT32 uEventType; + TI_HANDLE uEventID; + tiUINT32 uProcessID; + tiUINT32 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; + tiUINT32 uBufferSize; + tiUINT8 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*/ +tiINT32 IPC_RegisterEvent(TI_HANDLE hDevice, /* Driver Handle*/ + IPC_EVENT_PARAMS* pEvParams); /* size of the structure + size of the params*/ + +tiINT32 IPC_UnRegisterEvent(TI_HANDLE hDevice, + IPC_EVENT_PARAMS* pEvParams); /* returned by IPC_RegisterEvent*/ + +/***************************************************************************/ + +#ifdef __cplusplus +} +#endif + +#endif /*_IPC_UTIL_H*/ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/TI_Results.h b/sta_dk/pform/linux/src/wlan_driver_inc/TI_Results.h new file mode 100644 index 0000000..05d873f --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/TI_Results.h @@ -0,0 +1,62 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_api.h b/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_api.h new file mode 100644 index 0000000..845e798 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_api.h @@ -0,0 +1,114 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 */ +/* */ +/* PURPOSE: Driver API functions prototypes. */ +/* */ +/***************************************************************************/ + +#ifndef TNETW_DRIVER_API_H +#define TNETW_DRIVER_API_H + + +#include "commonTypes.h" +#include "TNETW_Driver_types.h" +#include "802_11Defs.h" + +/************************************************************************ + TNETW-Driver Common API Functions +************************************************************************/ + +/* Functions that handle common procedures for multiple driver modules (mainly initialization). */ +TI_HANDLE TnetwDrv_Create (TI_HANDLE hOs); +TI_STATUS TnetwDrv_Init (TI_HANDLE hTnetwDrv, TI_HANDLE hReport, TI_HANDLE hMemMgr, TI_HANDLE hUser, UINT32 *pFWImage, TnetwDrv_InitParams_t* pInitParams, TnetDrv_callback_t fUserConf); +TI_STATUS TnetwDrv_Configure (TI_HANDLE hTnetwDrv, TnetwDrv_InitParams_t* pInitParams); +void TnetwDrv_Destroy (TI_HANDLE hTnetwDrv); +void TnetwDrv_Register_CB (TI_HANDLE hTnetwDrv,tiUINT32 EventID,void *CBFunc, void *pData); +void TnetwDrv_GetInitParams (TI_HANDLE hTnetwDrv, UINT8 *pcommand, UINT16 *OutBufLen); +void TnetwDrv_PrintInfo (TI_HANDLE hTnetwDrv, TnetwDrv_PrintInfoType_e printInfo); +TI_STATUS TnetwDrv_FinalizeDownload (TI_HANDLE hTnetwDrv); +TI_STATUS TnetwDrv_FinalizeOnFailure (TI_HANDLE hTnetwDrv); + + +/* TEMPORARY!! - untill the new TNETW-Driver architecture is completed!! */ +void TnetwDrv_TEMP_GetHandles (TI_HANDLE hTnetwDrv, TI_HANDLE *pHalCtrl, TI_HANDLE *pMacServices); + +#ifdef GWSI_SPI_TEST +TI_HANDLE TnetwDrv_GetTnetwifHandle (TI_HANDLE hTnetwDrv); +#endif /* GWSI_SPI_TEST */ + +/************************************************************************ + TNETW-Driver Tx API Functions +************************************************************************/ + +txCtrlBlkEntry_t *TnetwDrv_txCtrlBlk_alloc (TI_HANDLE hTnetwDrv); +void TnetwDrv_txCtrlBlk_free (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pCurrentEntry); +txCtrlBlkEntry_t *TnetwDrv_txCtrlBlk_GetPointer (TI_HANDLE hTnetwDrv, UINT8 descId); +TI_STATUS TnetwDrv_txHwQueue_alloc (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pPktCtrlBlk); +TI_STATUS TnetwDrv_txHwQueue_free (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pPktCtrlBlk); +UINT8 TnetwDrv_txHwQueue_GetUsedHwBlks (TI_HANDLE hTnetwDrv, int TxQid); +UINT8 TnetwDrv_txGetAckPolicy (TI_HANDLE hTnetwDrv, int TxQid, BOOL bIsMultiCastAndIBSS); +void TnetwDrv_printInfo (TI_HANDLE hTnetwDrv); + +systemStatus_e TnetwDrv_txXfer_sendPacket (TI_HANDLE hTnetwDrv, + const void *aFrame, /* Pointer to the packet content. points to */ + /* the place that the actual packet begins. */ + /* a size of TX_TOTAL_OFFSET_BEFORE_DATA */ + /* must be saved before that pointer */ + UINT16 aLength, /* MSDU length from first byte of MAC */ + /* header to last byteof frame body. */ + UINT8 aQueueId, /* Tx queue as defined in ConfigureQueue. */ + UINT8 aTxRateClassId, /* Tx rate class ID defined in txRatePolicy.*/ + UINT16 aMaxTransmitRate,/* A bit mask that specifies the initial */ + /* (highest) rate to use. */ + BOOL aMore, /* Tells if there is another packet coming */ + /* shortly after this one. */ + UINT32 aPacketId, /* Packet identifier used as a context by */ + /* the host driver. */ + UINT8 aPowerLevel, /* Transmission power level. */ + UINT32 aExpiryTime, /* Time left for this MSDU to live. */ + void *aReserved); /* Optional parameters pointer. */ + +#if !defined(GWSI_DRIVER) && !defined(GWSI_LIB) +void TnetwDrv_StartRecovery(TI_HANDLE hTnetwDrv, void *endOfRecoveryCB, TI_HANDLE hRecoveryMgr); +TI_STATUS TnetwDrv_InitHw_FinalizeDownload(TI_HANDLE hTnetwDrv); +#endif + +#endif /* TNETW_DRIVER_TYPES_H */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_types.h b/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_types.h new file mode 100644 index 0000000..eaa1d2e --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/TNETW_Driver_types.h @@ -0,0 +1,201 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 */ +/* */ +/* PURPOSE: Driver constants and type definitions */ +/* */ +/***************************************************************************/ + +#ifndef TNETW_DRIVER_TYPES_H +#define TNETW_DRIVER_TYPES_H + + +#include "commonTypes.h" +#include "whalCtrl_api.h" +#include "public_descriptors.h" /* The FW Tx-Descriptor and Tx-Result structures are used to ensure + FW compatibility and to avoid conversions in the data path. */ +#if defined(HW_ACCESS_WSPI) +/* Read data offset */ +#define TNETWIF_READ_OFFSET_BYTES 8 + +/* Write data offset */ +#define TNETWIF_WRITE_OFFSET_BYTES 4 +#else +#define TNETWIF_READ_OFFSET_BYTES 0 +#define TNETWIF_WRITE_OFFSET_BYTES 0 +#endif +/* Tx packet offset before the actual data */ +#define TX_TOTAL_OFFSET_BEFORE_DATA (TNETWIF_WRITE_OFFSET_BYTES + sizeof(DbTescriptor)) + +/* Tx packet Control-Block flags bit-mask. */ +#define TX_CTRL_BLK_FLAGS_XFER_DONE_ISSUED 0x0001 /* Xfer-Done already issued to upper driver. */ +#define TX_CTRL_BLK_FLAGS_TX_COMPLETE_ISSUED 0x0002 /* Tx-Complete already issued to upper driver. */ + + +/* TNETW Driver Callback Module owner */ +typedef enum +{ + TNETW_DRIVER_TX_XFER_OWNER = 0x0100, + TNETW_DRIVER_RX_XFER_OWNER = 0x0200, + TNETW_DRIVER_HAL_CTRL_OWNER = 0x0300, + TNETW_DRIVER_MAC_SERVICES_OWNER = 0x0400, + TNETW_DRIVER_TX_RESULT_OWNER = 0x0500, + TNETW_DRIVER_TWD_OWNER = 0x0600, + + TNETW_DRIVER_LAST_OWNER = TNETW_DRIVER_TWD_OWNER + +} TNETW_DRIVER_CB_ModuleOwner_e; + + +/* TxXfer MODULE Callbacks */ +#define TX_XFER_SEND_PKT_TRANSFER 0x01 +#define TX_XFER_SEND_PKT_DEBUG 0x02 + +/* TxResult MODULE Callbacks */ +#define TX_RESULT_SEND_PKT_COMPLETE 0x01 + + + +/* TNETW Driver Callback ID */ +typedef enum +{ + /* Internal Failure Event Callbacks */ + TNETW_DRIVER_EVENT_FAILURE = HAL_INTERNAL_EVENT_FAILURE, + + /* MAC Services Event Callbacks */ + TNETW_DRIVER_EVENT_SCAN_COMPLETE = TNETW_DRIVER_MAC_SERVICES_OWNER | HAL_EVENT_SCAN_CMPLT, /* WHAL HW EVENT MBOX */ + TNETW_DRIVER_EVENT_PS_MODE_COMPLETE = TNETW_DRIVER_MAC_SERVICES_OWNER | HAL_EVENT_PS_REPORT, /* WHAL HW EVENT MBOX */ + TNETW_DRIVER_EVENT_MEASUREMENT_COMPLETE = TNETW_DRIVER_MAC_SERVICES_OWNER | HAL_EVENT_MEASUREMENT_COMPLETE, /* WHAL HW EVENT MBOX */ + + + /* Ctrl Event Callbacks */ + TNETW_DRIVER_EVENT_MEASUREMENT_START = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_MEASUREMENT_START, + TNETW_DRIVER_EVENT_CALIB_CMPLT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_CALIB_CMPLT, + TNETW_DRIVER_EVENT_RSSI_LEVEL = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_RSSI_LEVEL, + TNETW_DRIVER_EVENT_PS_REPORT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_PS_REPORT, + TNETW_DRIVER_EVENT_SYNCHRONIZATION_TIMEOUT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SYNCHRONIZATION_TIMEOUT, + TNETW_DRIVER_EVENT_HEALTH_REPORT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_HEALTH_REPORT, + TNETW_DRIVER_EVENT_ACI = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_ACI, + TNETW_DRIVER_EVENT_DEBUG_MESSAGE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_DEBUG_MESSAGE, + TNETW_DRIVER_EVENT_MAC_STATUS = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_MAC_STATUS, + TNETW_DRIVER_EVENT_DISCONNECT_COMPLETE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_DISCONNECT_COMPLETE, + TNETW_DRIVER_EVENT_JOIN_CMPLT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_JOIN_CMPLT, + TNETW_DRIVER_EVENT_SWITCH_CHANNEL_CMPLT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SWITCH_CHANNEL_CMPLT, + TNETW_DRIVER_EVENT_BSS_LOSE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_BSS_LOSE, + TNETW_DRIVER_EVENT_MAX_TX_RETRY = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_MAX_TX_RETRY, + TNETW_DRIVER_EVENT_AP_DISCOVERY_COMPLETE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_AP_DISCOVERY_COMPLETE, + TNETW_DRIVER_EVENT_SPS_SCAN_CMPLT = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SPS_SCAN_CMPLT, + TNETW_DRIVER_EVENT_BSS_REGAIN = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_BSS_REGAIN, + TNETW_DRIVER_EVENT_RSSI_LEVEL_REGAIN = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_RSSI_LEVEL_REGAIN, + TNETW_DRIVER_EVENT_BT_COEX_SENSE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SOFT_GEMINI_SENSE, + TNETW_DRIVER_EVENT_BT_COEX_PROTECTIVE_MODE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SOFT_GEMINI_PREDICTION, + TNETW_DRIVER_EVENT_BT_COEX_AVALANCHE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_EVENT_SOFT_GEMINI_AVALANCHE, + TNETW_DRIVER_COMMAND_COMPLETE = TNETW_DRIVER_HAL_CTRL_OWNER | HAL_INT_COMMAND_COMPLETE, + + /* Tx Data Path Callbacks */ + TNETW_DRIVER_TX_XFER_SEND_PKT_TRANSFER = TNETW_DRIVER_TX_XFER_OWNER | TX_XFER_SEND_PKT_TRANSFER, /* TxXfer MODULE */ + TNETW_DRIVER_TX_RESULT_SEND_PKT_COMPLETE = TNETW_DRIVER_TX_RESULT_OWNER | TX_RESULT_SEND_PKT_COMPLETE, /* TxResult MODULE */ + TNETW_DRIVER_TX_XFER_SEND_PKT_DEBUG = TNETW_DRIVER_TX_XFER_OWNER | TX_XFER_SEND_PKT_DEBUG, /* TxXfer MODULE */ + + /* Rx Data Path Callbacks */ + TNETW_DRIVER_RX_RECEIVE_PACKET = TNETW_DRIVER_RX_XFER_OWNER | HAL_INT_RECEIVE_PACKET, /* WHAL RX MODULE */ + TNETW_DRIVER_RX_REQUEST_FOR_BUFFER = TNETW_DRIVER_RX_XFER_OWNER | HAL_INT_REQUEST_FOR_BUFFER, /* WHAL RX MODULE */ + +}TnetwDrv_CB_ID_e; + + + +/* TNETW Driver print functions codes. */ +typedef enum +{ + TNETW_DRV_PRINT_TX_CTRL_BLK_TBL, + TNETW_DRV_PRINT_TX_HW_QUEUE_INFO, + TNETW_DRV_PRINT_TX_XFER_INFO, + TNETW_DRV_PRINT_TX_RESULT_INFO, + TNETW_DRV_CLEAR_TX_RESULT_INFO +}TnetwDrv_PrintInfoType_e; + + + +/* Tx Control-Block Packet parameters that are not included in the Tx-descriptor. */ +typedef struct +{ + const void *pFrame; /* Points to the whole packet including Tx-Descriptor + MAC-Header + Data. */ + UINT32 packetId; /* The packet ID used by the upper driver to identify it when called back. */ + UINT16 headerFrameCtrl; /* The Frame Control field from the MAC header. */ + UINT16 flags; /* See TX_CTRL_BLK_FLAGS_xxxx above. */ + +#ifdef TI_DBG + UINT32 dbgPktSeqNum; /* Packets sequence counter per queue. */ +#endif + +} TxPktParams_t; + + +/* + * txCtrlBlkEntry_t: + * ================= + * Contains the Tx packet parameters required for the Tx process, including + * the Tx descriptor and the attributes required for HW-queue calculations. + * Allocated for each packet sent from the upper driver and freed upon Tx-complete. + * The entry index is the descriptor-ID written in the descriptor and copied back in + * the tx-complete results. + */ +typedef struct _txCtrlBlkEntry_t +{ + struct _txCtrlBlkEntry_t * pNextFreeEntry; /* Pointer to the next free entry. */ + + DbTescriptor txDescriptor; /* The packet descriptor copied to the FW. */ + + TxPktParams_t txPktParams; /* Per packet parameters not included in the descriptor. */ + +} txCtrlBlkEntry_t; + + +typedef void (*TnetDrv_callback_t)(TI_HANDLE CB_Handle); + +/* Data path constant parametrs */ +#define DP_RX_PACKET_RING_CHUNK_SIZE 1600 +#define DP_TX_PACKET_RING_CHUNK_SIZE 1600 +#define DP_RX_PACKET_RING_CHUNK_NUM 2 +#define DP_TX_PACKET_RING_CHUNK_NUM 2 +#define DP_TX_COMPLETE_TIME_OUT 20 + +#endif /* TNETW_DRIVER_TYPES_H */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/TnetwRegisters.h b/sta_dk/pform/linux/src/wlan_driver_inc/TnetwRegisters.h new file mode 100644 index 0000000..aa226a2 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/TnetwRegisters.h @@ -0,0 +1,971 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 RGM_TNETW1150_H +#define RGM_TNETW1150_H + +#include "public_types.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 HOST_SLAVE_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 PHY_BASE 0x003C0000 + + +/* System DMA registers*/ +/* Order of registers was changed*/ +#define DMA_GLB_CFG (0x1000) +#define DMA_HDESC_OFFSET (0x1004) +#define DMA_HDATA_OFFSET (0x1008) +#define DMA_CFG0 (0x100C) /* SDMA_HOST_CFG0 changed*/ +#define DMA_CTL0 (0x1010) /* SDMA_CTRL0 changed*/ +#define DMA_LENGTH0 (0x1014) +#define DMA_L_ADDR0 (0x1018) /* SDMA_RD_ADDR ?*/ +#define DMA_L_PTR0 (0x101C) /* SDMA_RD_OFFSET ?*/ +#define DMA_H_ADDR0 (0x1020) /* SDMA_WR_ADDR ?*/ +#define DMA_H_PTR0 (0x1024) /* SDMA_WR_OFFSET ?*/ +#define DMA_STS0 (0x1028) /* Changed*/ +#define DMA_CFG1 (0x1030) /* SDMA_HOST_CFG1 changed*/ +#define DMA_CTL1 (0x1034) /* SDMA_CTRL1 changed*/ +#define DMA_LENGTH1 (0x1038) +#define DMA_L_ADDR1 (0x103C) +#define DMA_L_PTR1 (0x1040) +#define DMA_H_ADDR1 (0x1044) +#define DMA_H_PTR1 (0x1048) +#define DMA_STS1 (0x104C) +#define DMA_HFRM_PTR (0x1050) /* New ?*/ +#define DMA_DEBUG (0x1054) /* Changed*/ + +/* Local DMA registers*/ +/* number changed from 4 to 2*/ +#define LDMA_DEBUG (0x4400) +#define LDMA_CTL0 (0x4404) /* Add 2 bits to support fix address (FIFO)*/ +#define LDMA_STATUS0 (0x4408) +#define LDMA_LENGTH0 (0x440c) +#define LDMA_RD_ADDR0 (0x4410) +#define LDMA_RD_OFFSET0 (0x4414) +#define LDMA_WR_ADDR0 (0x4418) +#define LDMA_WR_OFFSET0 (0x441c) +#define LDMA_CTL1 (0x4428) /* Add 2 bits to support fix address (FIFO)*/ +#define LDMA_STATUS1 (0x442c) +#define LDMA_LENGTH1 (0x4430) +#define LDMA_RD_ADDR1 (0x4434) +#define LDMA_RD_OFFSET1 (0x4438) +#define LDMA_WR_ADDR1 (0x443c) +#define LDMA_WR_OFFSET1 (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 (0x0000) /* self clearing*/ +#define SLV_REG_ADDR (0x0004) +#define SLV_REG_DATA (0x0008) +#define SLV_REG_ADATA (0x000c) +#define SLV_MEM_CP (0x0010) +#define SLV_MEM_ADDR (0x0014) +#define SLV_MEM_DATA (0x0018) +#define SLV_MEM_CTL (0x001c) /* bit 19 moved to PCMCIA_CTL*/ +#define SLV_END_CTL (0x0020) /* 2 bits moved to ENDIAN_CTL*/ + +/* Timer registers*/ +/* Timer1/2 count MAC clocks*/ +/* Timer3/4/5 count usec*/ +#define TIM1_CTRL (0x0918) +#define TIM1_LOAD (0x091C) +#define TIM1_CNT (0x0920) +#define TIM2_CTRL (0x0924) +#define TIM2_LOAD (0x0928) +#define TIM2_CNT (0x092C) +#define TIM3_CTRL (0x0930) +#define TIM3_LOAD (0x0934) +#define TIM3_CNT (0x0938) +#define TIM4_CTRL (0x093C) +#define TIM4_LOAD (0x0940) +#define TIM4_CNT (0x0944) +#define TIM5_CTRL (0x0948) +#define TIM5_LOAD (0x094C) +#define TIM5_CNT (0x0950) + +/* Watchdog registers*/ +#define WDOG_CTRL (0x0954) +#define WDOG_LOAD (0x0958) +#define WDOG_CNT (0x095C) +#define WDOG_STS (0x0960) +#define WDOG_FEED (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 (0x0400) +#define FIQ_MASK_L (0x0400) +#define FIQ_MASK_H (0x0404) +#define FIQ_MASK_SET (0x0408) +#define FIQ_MASK_SET_L (0x0408) +#define FIQ_MASK_SET_H (0x040C) +#define FIQ_MASK_CLR (0x0410) +#define FIQ_MASK_CLR_L (0x0410) +#define FIQ_MASK_CLR_H (0x0414) +#define IRQ_MASK (0x0418) +#define IRQ_MASK_L (0x0418) +#define IRQ_MASK_H (0x041C) +#define IRQ_MASK_SET (0x0420) +#define IRQ_MASK_SET_L (0x0420) +#define IRQ_MASK_SET_H (0x0424) +#define IRQ_MASK_CLR (0x0428) +#define IRQ_MASK_CLR_L (0x0428) +#define IRQ_MASK_CLR_H (0x042C) +#define ECPU_MASK (0x0448) +#define FIQ_STS_L (0x044C) +#define FIQ_STS_H (0x0450) +#define IRQ_STS_L (0x0454) +#define IRQ_STS_H (0x0458) +#define INT_STS_ND (0x0464) +#define INT_STS_RAW_L (0x0464) +#define INT_STS_RAW_H (0x0468) +#define INT_STS_CLR (0x04B4) +#define INT_STS_CLR_L (0x04B4) +#define INT_STS_CLR_H (0x04B8) +#define INT_ACK (0x046C) +#define INT_ACK_L (0x046C) +#define INT_ACK_H (0x0470) +#define INT_TRIG (0x0474) +#define INT_TRIG_L (0x0474) +#define INT_TRIG_H (0x0478) +#define HOST_STS_L (0x045C) +#define HOST_STS_H (0x0460) +#define HOST_MASK (0x0430) +#define HOST_MASK_L (0x0430) +#define HOST_MASK_H (0x0434) +#define HOST_MASK_SET (0x0438) +#define HOST_MASK_SET_L (0x0438) +#define HOST_MASK_SET_H (0x043C) +#define HOST_MASK_CLR (0x0440) +#define HOST_MASK_CLR_L (0x0440) +#define HOST_MASK_CLR_H (0x0444) + +/* GPIO Interrupts*/ +#define GPIO_INT_STS (0x0484) /* 22 GPIOs*/ +#define GPIO_INT_ACK (0x047C) +#define GPIO_INT_MASK (0x0480) +#define GPIO_POS_MASK (0x04BC) /* New*/ +#define GPIO_NEG_MASK (0x04C0) /* New*/ + +/* Protocol Interrupts*/ +#define PROTO_INT_STS (0x0490) /* Add 2 PHY->MAC source interrupts*/ +#define PROTO_INT_ACK (0x0488) +#define PROTO_INT_MASK (0x048C) + +/* Host Interrupts*/ +#define HINT_MASK (0x0494) +#define HINT_MASK_SET (0x0498) +#define HINT_MASK_CLR (0x049C) +#define HINT_STS_ND_MASKED (0x04A0) +#define HINT_STS_ND (0x04B0) /*1150 spec calls this HINT_STS_RAW*/ +#define HINT_STS_CLR (0x04A4) +#define HINT_ACK (0x04A8) +#define HINT_TRIG (0x04AC) + +/* Clock registers*/ +#define CLK_CFG (0x0C00) /* new ARM clock bit */ +#define CLK_CTRL (0x0C04) /* changed*/ +#define BLK_RST (0x0C08) /* changed*/ +#define CFG_USEC_STB (0x0C0C) +#define ARM_GATE_CLK_REG (0x0C10) /* new*/ +#define BUSY_STAT_REG (0x0C14) /* new*/ +#define CFG_PHY_CLK88 (0x0C18) +#define DYNAMIC_CLKGATE (0x0C1C) /* new*/ + +/* AES registers*/ +/* Major changes to this module*/ +#define AES_START (0x1400) +#define AES_CFG (0x1404) +#define AES_CTL (0x1408) +#define AES_STATUS (0x140C) +#define AES_LENGTH (0x1410) +#define AES_RD_ADDR (0x1414) +#define AES_RD_OFFSET (0x1418) +#define AES_WR_ADDR (0x141C) +#define AES_WR_OFFSET (0x1420) +#define AES_CUR_RD_PTR (0x1424) +#define AES_CUR_WR_PTR (0x1428) +#define AES_KEY_0 (0x142C) +#define AES_KEY_1 (0x1430) +#define AES_KEY_2 (0x1434) +#define AES_KEY_3 (0x1438) +#define AES_NONCE_0 (0x143C) +#define AES_NONCE_1 (0x1440) +#define AES_NONCE_2 (0x1444) +#define AES_NONCE_3 (0x1448) +#define AES_MIC_0 (0x144C) +#define AES_MIC_1 (0x1450) +#define AES_MIC_2 (0x1454) +#define AES_MIC_3 (0x1458) +#define AES_ASSO_DATA_0 (0x145C) +#define AES_ASSO_DATA_1 (0x1460) +#define AES_ASSO_DATA_2 (0x1464) +#define AES_ASSO_DATA_3 (0x1468) +#define AES_NUM_OF_ROUNDS (0x146C) +#define AES_TX_QUEUE_PTR (0x1470) +#define AES_RX_QUEUE_PTR (0x1474) +#define AES_STACK (0x1478) +#define AES_INT_RAW (0x147C) +#define AES_INT_MASK (0x1480) +#define AES_INT_STS (0x1484) + +/* WEP registers*/ +/* Order was changed*/ +#define DEC_CTL (0x1800) +#define DEC_STATUS (0x1804) +#define DEC_MBLK (0x1808) +#define DEC_KEY_ADDR (0x180C) +#define DEC_KEY_LEN (0x1810) +#define DEC_ADDR_UPPER_BYTE (0x1814) /* new*/ +#define DEC_LEN (0x1818) +#define DEC_OFFSET (0x181C) +#define DEC_WR_MBLK (0x1820) +#define DEC_WR_OFFSET (0x1824) + +/* TKIP MICHAEL reisters*/ +/* order changed*/ +#define MCHL_START0 (0x1C00) +#define MCHL_DMV_START_MBLK0 (0x1C04) /* Changed to 23:5 format*/ +#define MCHL_DMV_CUR_MBLK0 (0x1C10) +#define MCHL_DMV_OFFSET0 (0x1C08) +#define MCHL_DMV_LENGTH0 (0x1C0C) +#define MCHL_DMV_CFG0 (0x1C14) +#define MCHL_KEY_L0 (0x1C18) +#define MCHL_KEY_H0 (0x1C1C) +#define MCHL_MIC_L0 (0x1C20) +#define MCHL_MIC_H0 (0x1C24) +#define MCHL_START1 (0x1C28) +#define MCHL_DMV_START_MBLK1 (0x1C2C) /* Changed to 23:5 format*/ +#define MCHL_DMV_CUR_MBLK1 (0x1C38) +#define MCHL_DMV_OFFSET1 (0x1C30) +#define MCHL_DMV_LENGTH1 (0x1C34) +#define MCHL_DMV_CFG1 (0x1C3C) +#define MCHL_KEY_L1 (0x1C40) +#define MCHL_KEY_H1 (0x1C44) +#define MCHL_MIC_L1 (0x1C48) +#define MCHL_MIC_H1 (0x1C4C) +#define MCHL_CTL0 (0x1C50) /* new name MCHL_CTRL0*/ +#define MCHL_CTL1 (0x1C54) /* new name MCHL_CTRL1*/ +#define MCHL_UPPER_BYTE_ADDR0 (0x1C58) /* new*/ +#define MCHL_UPPER_BYTE_ADDR1 (0x1C5C) /* new*/ + +/* SEEPROM registers*/ +#define EE_CFG (0x0820) +#define EE_CTL (0x2000) +#define EE_DATA (0x2004) +#define EE_ADDR (0x2008) + +/* Parallel Host (PCI/CARDBUS/PCMCIA/GS*/ +#define CIS_LADDR (0x2400) +#define HI_CTL (0x2404) +#define LPWR_MGT (0x2408) +/*#define PDR0 (0x04ec)*/ +/*#define PDR1 (0x04f0)*/ +/*#define PDR2 (0x04f4)*/ +/*#define PDR3 (0x04f8)*/ +/*#define BAR2_ENABLE (0x04fc)*/ +/*#define BAR2_TRANS (0x0500)*/ +/*#define BAR2_MASK (0x0504)*/ +#define PCI_MEM_SIZE1 (0x2428) +#define PCI_MEM_OFFSET1 (0x242C) +#define PCI_MEM_OFFSET2 (0x2430) +/*#define PCI_IO_SIZE1 (0x0514)*/ +/*#define PCI_IO_OFFSET1 (0x0518)*/ +/*#define PCI_IO_OFFSET2 (0x051c)*/ +/*#define PCI_CFG_OFFSET (0x0520)*/ +#define PCMCIA_CFG (0x2444) +#define PCMCIA_CTL (0x2448) +#define PCMCIA_CFG2 (0x244C) /* new*/ +#define SRAM_PAGE (0x2450) +#define CFG_PULLUPDN (0x2454) +#define CIS_MAP (0x2458) /* new*/ +#define ENDIAN_CTRL (0x245C) /* new*/ +#define GS_SLEEP_ACCESS (0x2480) /* new*/ +#define PCMCIA_PWR_DN (0x04C4) +#define PCI_OUTPUT_DLY_CFG (0x2464) /* new*/ + +/* VLYNQ registers*/ +/* VLYNQ2 was removed from hardware*/ +#define VL1_REV_ID (0x8000) /* VLYNQ_REVISION*/ +#define VL1_CTL (0x8004) /* VLYNQ_ CONTROL*/ +#define VL1_STS (0x8008) /* VLYNQ_STATUS*/ +#define VLYNQ_INTVEC (0x800C) +#define VL1_INT_STS (0x8010) /* VLYNQ_INTCR*/ +#define VL1_INT_PEND (0x8014) /* VLYNQ_INTSR*/ +#define VL1_INT_PTR (0x8018) /* VLYNQ_INTPTR*/ +#define VL1_TX_ADDR (0x801C) /* VLYNQ_TX_MAP_ADDR*/ +#define VL1_RX_SIZE1 (0x8020) /* VLYNQ_RX_MAP_SIZE1*/ +#define VL1_RX_OFF1 (0x8024) /* VLYNQ_RX_MAP_OFFSET1*/ +#define VL1_RX_SIZE2 (0x8028) /* VLYNQ_RX_MAP_SIZE2*/ +#define VL1_RX_OFF2 (0x802C) /* VLYNQ_RX_MAP_OFFSET2*/ +#define VL1_RX_SIZE3 (0x8030) /* VLYNQ_RX_MAP_SIZE3*/ +#define VL1_RX_OFF3 (0x8034) /* VLYNQ_RX_MAP_OFFSET3*/ +#define VL1_RX_SIZE4 (0x8038) /* VLYNQ_RX_MAP_SIZE4*/ +#define VL1_RX_OFF4 (0x803C) /* VLYNQ_RX_MAP_OFFSET4*/ +#define VL1_CHIP_VER (0x8040) /* VLYNQ_CHIP_VER*/ +#define VLYNQ_AUTONEG (0x8044) +#define VLYNQ_MANNEG (0x8048) +#define VLYNQ_NEGSTAT (0x804C) +#define VLYNQ_ENDIAN (0x805C) +#define VL1_INT_VEC3_0 (0x8060) /* VLYNQ_HW_INT3TO0_CFG*/ +#define VL1_INT_VEC7_4 (0x8064) /* VLYNQ_HW_INT7TO4_CFG*/ +/* VLYNQ Remote configuration registers*/ +#define VL1_REM_REV_ID (0x8080) /* VLYNQ_REM_REVISION*/ +#define VL1_REM_CTL (0x8084) /* VLYNQ_REM_ CONTROL*/ +#define VL1_REM_STS (0x8088) /* VLYNQ_REM_STATUS*/ +#define VLYNQ_REM_INTVEC (0x808C) +#define VL1_REM_INT_STS (0x8090) /* VLYNQ_REM_INTCR*/ +#define VL1_REM_INT_PEND (0x8094) /* VLYNQ_REM_INTSR*/ +#define VL1_REM_INT_PTR (0x8098) /* VLYNQ_REM_INTPTR*/ +#define VL1_REM_TX_ADDR (0x809C) /* VLYNQ_REM_TX_MAP_ADDR*/ +#define VL1_REM_RX_SIZE1 (0x80A0) /* VLYNQ_REM_RX_MAP_SIZE1*/ +#define VL1_REM_RX_OFF1 (0x80A4) /* VLYNQ_REM_RX_MAP_OFFSET1*/ +#define VL1_REM_RX_SIZE2 (0x80A8) /* VLYNQ_REM_RX_MAP_SIZE2*/ +#define VL1_REM_RX_OFF2 (0x80AC) /* VLYNQ_REM_RX_MAP_OFFSET2*/ +#define VL1_REM_RX_SIZE3 (0x80B0) /* VLYNQ_REM_RX_MAP_SIZE3*/ +#define VL1_REM_RX_OFF3 (0x80B4) /* VLYNQ_REM_RX_MAP_OFFSET3*/ +#define VL1_REM_RX_SIZE4 (0x80B8) /* VLYNQ_REM_RX_MAP_SIZE4*/ +#define VL1_REM_RX_OFF4 (0x80BC) /* VLYNQ_REM_RX_MAP_OFFSET4*/ +#define VL1_REM_CHIP_VER (0x80C0) /* VLYNQ_REM_CHIP_VER*/ +#define VLYNQ_REM_AUTONEG (0x80C4) +#define VLYNQ_REM_MANNEG (0x80C8) +#define VLYNQ_REM_NEGSTAT (0x80CC) +#define VLYNQ_REM_ENDIAN (0x80DC) +#define VL1_REM_INT_VEC3_0 (0x80E0) /* VLYNQ_REM_HW_INT3TO0_CFG*/ +#define VL1_REM_INT_VEC7_4 (0x80E4) /* VLYNQ_REM_HW_INT7TO4_CFG*/ + +/* PCIIF*/ +/**/ +#define PCI_ID_REG (0x8400) +#define PCI_STATUS_SET_REG (0x8410) +#define PCI_STATUS_CLR_REG (0x8414) +#define PCI_HIMASK_SET_REG (0x8420) +#define PCI_HIMASK_CLR_REG (0x8424) +#define PCI_AMASK_SET_REG (0x8430) +#define PCI_AMASK_CLR_REG (0x8434) +#define PCI_CLKRUN_REG (0x8438) +#define PCI_BE_VENDOR_ID_REG (0x8500) +#define PCI_BE_COMMAND_REG (0x8504) +#define PCI_BE_REVISION_REG (0x8508) +#define PCI_BE_CL_SIZE_REG (0x850C) +#define PCI_BE_BAR0_MASK_REG (0x8510) +#define PCI_BE_BAR1_MASK_REG (0x8514) +#define PCI_BE_BAR2_MASK_REG (0x8518) +#define PCI_BE_BAR3_MASK_REG (0x851C) +#define PCI_BE_CIS_PTR_REG (0x8528) +#define PCI_BE_SUBSYS_ID_REG (0x852C) +#define PCI_BE_CAP_PTR_REG (0x8534) +#define PCI_BE_INTR_LINE_REG (0x853C) +#define PCI_BE_PM_CAP_REG (0x8540) +#define PCI_BE_PM_CTRL_REG (0x8544) +#define PCI_BE_PM_D0_CTRL_REG (0x8560) +#define PCI_BE_PM_D1_CTRL_REG (0x8564) +#define PCI_BE_PM_D2_CTRL_REG (0x8568) +#define PCI_BE_PM_D3_CTRL_REG (0x856C) +#define PCI_BE_SLV_CFG_REG (0x8580) +#define PCI_BE_ARB_CTRL_REG (0x8584) + +#define FER (0x85A0) /* PCI_BE_STSCHG_FE_REG*/ +#define FEMR (0x85A4) /* PCI_BE_STSCHG_FEM_REG*/ +#define FPSR (0x85A8) /* PCI_BE_STSCHG_FPS_REG*/ +#define FFER (0x85AC) /* PCI_BE_STSCHG_FFE_REG*/ + +#define PCI_BE_BAR0_TRANS_REG (0x85C0) +#define PCI_BE_BAR1_TRANS_REG (0x85C4) +#define PCI_BE_BAR2_TRANS_REG (0x85C8) +#define PCI_BE_BAR3_TRANS_REG (0x85CC) +#define PCI_BE_BAR4_TRANS_REG (0x85D0) +#define PCI_BE_BAR5_TRANS_REG (0x85D4) +#define PCI_BE_BAR0_REG (0x85E0) +#define PCI_BE_BAR1_REG (0x85E4) +#define PCI_BE_BAR2_REG (0x85E8) +#define PCI_BE_BAR3_REG (0x85EC) + +#define PCI_PROXY_DATA (0x8700) +#define PCI_PROXY_ADDR (0x8704) +#define PCI_PROXY_CMD (0x8708) +#define PCI_CONTROL (0x8710) + +/*#define CPC_REGION (f0100)*/ +/*#define VLYNQ1_BASE (f00a0)*/ +/*#define VLYNQ2_BASE (f00b0)*/ +/*#define SCR_IADDR1 (f00c0)*/ +/*#define SCR_IDATA1 (f00c0)*/ +/*#define SCR_IADDR2 (f00c0)*/ +/*#define SCR_IDATA2 (f00c0)*/ + +/* SDIO/WSPI*/ +#define CCCR_1 (002800) +#define CCCR_2 (002804) +#define CCCR_3 (002808) +#define FUN_BASE_REG_1 (00280C) +#define FUN_BASE_REG_2 (002810) +#define FUN_BASE_REG_3 (002814) +#define ADDR_MAP_SIZE_1 (002818) +#define ADDR_MAP_SIZE_2 (002820) +#define ADDR_MAP_SIZE_3 (002828) +#define ADDR_MAP_OFFSET_1 (00281C) +#define ADDR_MAP_OFFSET_2 (002824) +#define ADDR_MAP_OFFSET_3 (00282C) +#define ADDR_MAP_OFFSET_4 (002830) +#define CIS_OFFSET (002834) +#define CSA_OFFSET (002838) +#define DEBUG_REG_1 (002840) +#define DEBUG_REG_2 (00283C) +#define INTR_MASK (002844) +#define STATUS_REG (002848) +#define WR_ERR_LENGTH (00284C) +#define WR_ERR_ADDR (002850) +#define OCR (002858) + +/* UART*/ +/* TODO - fill in registers*/ + +/* USB1.1 registers*/ +/**/ +#define USB_STS_CLR (0x4000) +#define USB_STS_ND (0x4004) +#define USB_INT_ACK (0x4008) +#define USB_MASK (0x400c) +#define USB_MASK_SET (0x4010) +#define USB_MASK_CLR (0x4014) +#define USB_WU (0x4018) +#define USB_EP0_OUT_PTR (0x401c) +#define USB_EP0_OUT_VLD (0x4020) +#define USB_EP0_OUT_LEN (0x4024) +#define USB_EP0_IN_PTR (0x4028) +#define USB_EP0_IN_VLD (0x402c) +#define USB_EP0_IN_LEN (0x4030) +#define USB_EP1_CFG (0x4034) +#define USB_EP1_OUT_INT_CFG (0x4038) +#define USB_EP1_OUT_PTR (0x403c) +#define USB_EP1_OUT_VLD (0x4040) +#define USB_EP1_OUT_CUR_MBLK (0x4044) +#define USB_EP1_OUT_LEN (0x4048) +#define USB_EP1_IN_START_MBLK (0x404c) +#define USB_EP1_IN_LAST_MBLK (0x4050) +#define USB_EP1_IN_VLD (0x4054) + +#define USB_EP2_PTR (0x405c) +#define USB_EP2_VLD (0x4060) +#define USB_EP2_LEN (0x4064) +#define USB_EP3_OUT_PTR0 (0x4068) +#define USB_EP3_OUT_VLD0 (0x406c) +#define USB_EP3_OUT_LEN0 (0x4070) +#define USB_EP3_OUT_PTR1 (0x4074) +#define USB_EP3_OUT_VLD1 (0x4078) +#define USB_EP3_OUT_LEN1 (0x407c) +#define USB_EP3_IN_PTR0 (0x4080) +#define USB_EP3_IN_VLD0 (0x4084) +#define USB_EP3_IN_LEN0 (0x4088) +#define USB_EP3_IN_PTR1 (0x408c) +#define USB_EP3_IN_VLD1 (0x4090) +#define USB_EP3_IN_LEN1 (0x4094) +#define USB_EP1_OUT_END_MBLK (0x4098) +#define USB_EP0_OUT_SETUP (0x409c) +#define USB_EP0_STALL (0x40a0) +#define USB_EP1_IN_OFFSET (0x40a4) + +/* Device Configuration registers*/ +#define SOR_CFG (0x0800) +#define ECPU_CTRL (0x0804) +#define HI_CFG (0x0808) +#define EE_START (0x080C) + +/* IO Control registers*/ +#define SERIAL_HOST_IOCFG0 (0x0894) /* new*/ +#define SERIAL_HOST_IOCFG1 (0x0898) /* new*/ +#define SERIAL_HOST_IOCFG2 (0x089C) /* new*/ +#define SERIAL_HOST_IOCFG3 (0x08A0) /* new*/ +#define GPIO_IOCFG0 (0x08F4) /* new*/ +#define GPIO_IOCFG1 (0x08F8) /* new*/ +#define GPIO_IOCFG2 (0x08FC) /* new*/ +#define GPIO_IOCFG3 (0x0900) /* new*/ +#define CHIP_ID_B (0x5674) /* new*/ +#define CHIP_ID CHIP_ID_B/* Leave for TNETW compatability*/ +#define CHIP_ID_1251_PG10 (0x7010101) +#define CHIP_ID_1251_PG11 (0x7020101) +#define CHIP_ID_1251_PG12 (0x7030101) + +#define SYSTEM (0x0810) +#define PCI_ARB_CFG (0x0814) +#define BOOT_IRAM_CFG (0x0818) +#define ENABLE (0x5450) +#define MBLK_CFG (0x5460) +#define RS232_BITINTERVAL (0x0824) +#define TEST_PORT (0x096C) +#define DEBUG_PORT (0x0970) + +/* GPIO registers*/ +#define GPIO_OE (0x082C) /* 22 GPIOs*/ +#define GPIO_OUT (0x0834) +#define GPIO_IN (0x0830) +#define GPO_CFG (0x083C) +#define PWRDN_BUS_L (0x0844) +#define PWRDN_BUS_H (0x0848) +#define DIE_ID_L (0x088C) +#define DIE_ID_H (0x0890) + +/* Power Management registers*/ +/* */ +#define ELP_START (0x5800) +#define ELP_CFG_MODE (0x5804) +#define ELP_CMD (0x5808) +#define PLL_CAL_TIME (0x5810) +#define CLK_REQ_TIME (0x5814) +#define CLK_BUF_TIME (0x5818) + +#define CFG_PLL_SYNC_CNT (0x5820) /* Points to the CFG_PLL_SYNC_CNT_xx registers set*/ +#define CFG_PLL_SYNC_CNT_I (0x5820) +#define CFG_PLL_SYNC_CNT_II (0x5824) +#define CFG_PLL_SYNC_CNT_III (0x5828) + +#define CFG_ELP_SLEEP_CNT (0x5830) /* Points to the CFG_ELP_SLEEP_CNT_xx registers set*/ +#define CFG_ELP_SLEEP_CNT_I (0x5830) +#define CFG_ELP_SLEEP_CNT_II (0x5834) +#define CFG_ELP_SLEEP_CNT_III (0x5838) +#define CFG_ELP_SLEEP_CNT_IV (0x583c) + +#define ELP_SLEEP_CNT (0x5840) /* Points to the ELP_SLEEP_CNT_xx registers set*/ +#define ELP_SLEEP_CNT_I (0x5840) +#define ELP_SLEEP_CNT_II (0x5844) +#define ELP_SLEEP_CNT_III (0x5848) +#define ELP_SLEEP_CNT_IV (0x584c) + +#define ELP_WAKE_UP_STS (0x5850) +#define CFG_SLP_CLK_SEL (0x5860) +#define CFG_SLP_CLK_EN (0x5870) + +#define CFG_WAKE_UP_EN_I (0x5880) +#define CFG_WAKE_UP_EN_II (0x5884) +#define CFG_WAKE_UP_EN_III (0x5888) + +#define CFG_ELP_PWRDN_I (0x5890) +#define CFG_ELP_PWRDN_II (0x5894) +#define CFG_ELP_PWRDN_III (0x5898) + +#define CFG_POWER_DOWN_I (0x58a0) +#define CFG_POWER_DOWN_II (0x58a4) +#define CFG_POWER_DOWN_III (0x58a8) + +#define CFG_BUCK_TESTMODE_I (0x58b0) +#define CFG_BUCK_TESTMODE_II (0x58b4) + +#define POWER_STATUS_I (0x58C0) +#define POWER_STATUS_II (0x58C4) + +#define DIGLDO_BIAS_PROG_I (0x58d0) +#define DIGLDO_BIAS_PROG_II (0x58d4) + +#define LDO2P8_BIAS_PROG_I (0x58e0) +#define LDO2P8_BIAS_PROG_II (0x58e4) + +#define ADCLDO_BIAS_PROG (0x58f0) + +#define REFSYS_PROG_I (0x5910) +#define REFSYS_PROG_II (0x5914) + +#define PM_TEST_I (0x5920) +#define PM_TEST_II (0x5924) + +#define POR_PROG (0x5930) + +#define TEST_PIN_DIR_I (0x5940) +#define TEST_PIN_DIR_II (0x5944) + +#define PROC_CTL (0x5950) + +#define ADC_REF_WAKEUP_I (0x5960) +#define ADC_REF_WAKEUP_II (0x5964) +#define ADC_REF_WAKEUP_III (0x5968) +#define ADC_REF_WAKEUP_IV (0x596C) + +#define VREG_WAKEUP_I (0x5970) +#define VREG_WAKEUP_II (0x5974) +#define VREG_WAKEUP_III (0x5978) +#define VREG_WAKEUP_IV (0x597C) + +#define PLL_WAKEUP_I (0x5980) +#define PLL_WAKEUP_II (0x5984) +#define PLL_WAKEUP_III (0x5988) +#define PLL_WAKEUP_IV (0x598C) + +#define XTALOSC_WAKEUP_I (0x5990) +#define XTALOSC_WAKEUP_II (0x5994) +#define XTALOSC_WAKEUP_III (0x5998) +#define XTALOSC_WAKEUP_IV (0x599C) + +/* ----------*/ + +#define POWER_MGMT2 (0x0840) +#define POWER_MGMT (0x5098) +#define MAC_HW_DOZE (0x090c) +#define ECPU_SLEEP (0x0840) +#define DOZE_CFG (0x54bc) +#define DOZE2_CFG (0x081c) +#define WAKEUP_CFG (0x54c0) +#define WAKEUP_TIME_L (0x54c8) +#define WAKEUP_TIME_H (0x54c4) + +/**/ + +/*#define CPU_WAIT_CFG (f0020)*/ +/*#define CFG_QOS_ACM (f0046)*/ + +/* Scratch Pad registers*/ +#define SCR_PAD0 (0x5608) +#define SCR_PAD1 (0x560C) +#define SCR_PAD2 (0x5610) +#define SCR_PAD3 (0x5614) +#define SCR_PAD4 (0x5618) +#define SCR_PAD4_SET (0x561C) +#define SCR_PAD4_CLR (0x5620) +#define SCR_PAD5 (0x5624) +#define SCR_PAD5_SET (0x5628) +#define SCR_PAD5_CLR (0x562C) +#define SCR_PAD6 (0x5630) +#define SCR_PAD7 (0x5634) +#define SCR_PAD8 (0x5638) +#define SCR_PAD9 (0x563C) + +/* Spare registers*/ +#define SPARE_A1 (0x0994) +#define SPARE_A2 (0x0998) +#define SPARE_A3 (0x099C) +#define SPARE_A4 (0x09A0) +#define SPARE_A5 (0x09A4) +#define SPARE_A6 (0x09A8) +#define SPARE_A7 (0x09AC) +#define SPARE_A8 (0x09B0) +#define SPARE_B1 (0x5420) +#define SPARE_B2 (0x5424) +#define SPARE_B3 (0x5428) +#define SPARE_B4 (0x542C) +#define SPARE_B5 (0x5430) +#define SPARE_B6 (0x5434) +#define SPARE_B7 (0x5438) +#define SPARE_B8 (0x543C) + +/* RMAC registers (Raleigh MAC)*/ + +/* Station registers*/ +#define DEV_MODE (0x5464) +#define STA_ADDR_L (0x546C) +#define STA_ADDR_H (0x5470) +#define BSSID_L (0x5474) +#define BSSID_H (0x5478) +#define AID_CFG (0x547C) +#define BASIC_RATE_CFG (0x4C6C) +#define BASIC_RATE_TX_CFG (0x55F0) + +/* Protocol timers registers*/ +#define IFS_CFG0 (0x5494) +#define IFS_CFG1 (0x5498) +#define TIMEOUT_CFG (0x549C) +#define CONT_WIND_CFG (0x54A0) +#define BCN_INT_CFG (0x54A4) +#define RETRY_CFG (0x54A8) +#define DELAY_CFG (0x54B0) + +/* Hardware Override registers*/ +#define CCA_CFG (0x54CC) +#define CCA_FILTER_CFG (0x5480) +#define RADIO_PLL_CFG (0x555C) +#define CCA_MON (0x54D0) +#define TX_FRM_CTL (0x54D4) +#define CONT_TX_EN (0x50EC) +#define PHY_STANDBY_EN (0x5668) + +/* Transmit Setup registers*/ +#define TX_PING_PONG (0x5090) +#define TX_CFG0 (0x5000) +#define TX_CFG1 (0x5004) +#define TX_CFG2 (0x5008) +#define MAX_LIFETIME (0x50FC) +#define TX_PANG_SEL (0x50E0) +#define TX_PANG0 (0x50A0) +#define TX_PING0 (0x5010) +#define TX_PONG0 (0x5050) +#define TX_PANG1 (0x50A4) +#define TX_PING1 (0x5014) +#define TX_PONG1 (0x5054) +#define TX_PANG2 (0x50A8) +#define TX_PING2 (0x5018) +#define TX_PONG2 (0x5058) +#define TX_PANG3 (0x50AC) +#define TX_PING3 (0x501C) +#define TX_PONG3 (0x505C) +#define TX_PANG4 (0x50B0) +#define TX_PING4 (0x5020) +#define TX_PONG4 (0x5060) +#define TX_PANG5 (0x50B4) +#define TX_PING5 (0x5024) +#define TX_PONG5 (0x5064) +#define TX_PANG6 (0x50B8) +#define TX_PING6 (0x5028) +#define TX_PONG6 (0x5068) +#define TX_PANG7 (0x50BC) +#define TX_PING7 (0x502C) +#define TX_PONG7 (0x506C) +#define TX_PANG8 (0x50C0) +#define TX_PING8 (0x5030) +#define TX_PONG8 (0x5070) +#define TX_PANG9 (0x50C4) +#define TX_PING9 (0x5034) +#define TX_PONG9 (0x5074) +#define TX_PANG10 (0x50C8) +#define TX_PING10 (0x5038) +#define TX_PONG10 (0x5078) +#define TX_PANG11 (0x50CC) +#define TX_PING11 (0x503C) +#define TX_PONG11 (0x507C) + +/* Transmit Status registers*/ +#define TX_STATUS (0x509C) +#define TX_PANG_EXCH (0x50D0) +#define TX_PING_EXCH (0x5040) +#define TX_PONG_EXCH (0x5080) +#define TX_PANG_ATT (0x50D4) +#define TX_PING_ATT (0x5044) +#define TX_PONG_ATT (0x5084) +#define TX_PANG_TIMESTAMP (0x50DC) +#define TX_PING_TIMESTAMP (0x504C) +#define TX_PONG_TIMESTAMP (0x508C) + +/* Transmit State registers*/ +#define TX_STATE (0x5094) +#define TX_PANG_OVRD_CFG (0x50D8) +#define TX_PING_OVRD_CFG (0x5048) +#define TX_PONG_OVRD_CFG (0x5088) +#define TX_HOLD_CFG (0x54D8) +#define TSF_ADJ_CFG1 (0x54DC) +#define TSF_ADJ_CFG2 (0x54E0) +#define TSF_ADJ_CFG3 (0x54E4) +#define TSF_ADJ_CFG4 (0x54E8) +#define CFG_OFDM_TIMES0 (0x5648) +#define CFG_OFDM_TIMES1 (0x564C) + +/* Beacon/Probe Response registers*/ +#define PRB_ADDR (0x54EC) +#define PRB_LENGTH (0x54F0) +#define BCN_ADDR (0x54F4) +#define BCN_LENGTH (0x54F8) +#define TIM_VALID0 (0x54FC) +#define TIM_ADDR0 (0x5500) +#define TIM_LENGTH0 (0x5504) +#define TIM_VALID1 (0x5654) +#define TIM_ADDR1 (0x5658) +#define TIM_LENGTH1 (0x565C) +#define TIM_SELECT (0x5660) +#define TSF_CFG (0x5508) + +/* Other Hardware Generated Frames regi*/ +#define CTL_FRM_CFG (0x550C) +#define MGMT_FRM_CFG (0x5510) +#define CFG_ANT_SEL (0x5664) +#define RMAC_ADDR_BASE (0x5680) /* new*/ + +/* Protocol Interface Read Write Interf*/ +#define TXSIFS_TIMER (0x4C00) +#define TXPIFS_TIMER (0x4C04) +#define TXDIFS_TIMER (0x4C08) +#define SLOT_TIMER (0x4C0C) +#define BACKOFF_TIMER (0x4C10) +#define BCN_PSP_TIMER (0x4C14) +#define NAV (0x4C18) +#define TSF_L (0x4C1C) +#define TSF_H (0x4C20) +#define TSF_PREV_L (0x4CC4) /* new */ +#define TSF_PREV_H (0x4CC8) /* new */ +#define TOUT_TIMER (0x4C2C) +#define NEXT_TBTT_L (0x4C30) +#define NEXT_TBTT_H (0x4C34) +#define DTIM_CNT (0x4C38) +#define CONT_WIND (0x4C3C) +#define PRSP_REQ (0x4C40) +#define PRSP_DA_L (0x4C44) +#define PRSP_DA_H (0x4C48) +#define PRSP_RETRY (0x4C4C) +#define PSPOLL_REQ (0x4C50) +#define NEXT_SEQ_NUM (0x4C54) +#define PRSP_SEQ_NUM (0x4C58) +#define BCN_SEQ_NUM (0x4C5C) +#define MED_USAGE (0x4C24) +#define MED_USAGE_TM (0x4C28) +#define PRB_DLY (0x4C60) +#define STA_SRC (0x4C64) +#define STA_LRC (0x4C68) +#define CFG_ACM (0x4C70) +#define RAND_NUMB (0x4C6C) +#define CFG_ACK_CTS_DOT11A (0x4C74) +#define CFG_ACK_CTS_DOT11B (0x4C78) +#define ACM_IFS_CFG0 (0x4C7C) +#define ACM_IFS_CFG1 (0x4C80) +#define ACM_IFS_CFG2 (0x4C84) +#define ACM_IFS_CFG3 (0x4C88) +#define ACK_CTS_FRM_CFG (0x4C8C) +#define CFG_RX_TSTMP_DLY0 (0x4C90) +#define CFG_RX_TSTMP_DLY1 (0x4C94) +#define CFG_RX_TSTMP_DLY2 (0x4C98) +#define CFG_RX_TSTMP_DLY3 (0x4C9C) +#define CCA_BUSY (0x4CA0) +#define CCA_BUSY_CLR (0x4CA4) +#define CCA_IDLE (0x4CA8) +#define CCA_IDLE_CLR (0x4CAC) + +/* Receive Manager registers*/ +#define RX_HEAD_PTR (0x567C) /* new*/ +#define RX_TAIL_PTR (0x4898) /* new*/ +#define RX_CURR_PTR (0x5678) /* new*/ +#define RX_RESET (0x4800) +#define RX_MODMODE (0x4838) /* new*/ +#define MAC_HEADER_BYTECNT (0x4890) +#define RX_MAC_BYTECNT_INT (0x489C) +#define MAC_HEADER_WORD0 (0x4868) +#define MAC_HEADER_WORD1 (0x486C) +#define MAC_HEADER_WORD2 (0x4870) +#define MAC_HEADER_WORD3 (0x4874) +#define MAC_HEADER_WORD4 (0x4878) +#define MAC_HEADER_WORD5 (0x487C) +#define MAC_HEADER_WORD6 (0x4880) +#define MAC_HEADER_WORD7 (0x4884) +#define MAC_HEADER_WORD8 (0x4888) +#define MAC_HEADER_WORD9 (0x488C) +#define RX_CFG (0x5514) +#define RX_FILTER_CFG (0x55B4) +#define RX_MC0_L (0x5518) +#define RX_MC0_H (0x551C) +#define RX_MC1_L (0x5520) +#define RX_MC1_H (0x5524) +#define STA_SSID0 (0x4804) +#define STA_SSID1 (0x4808) +#define STA_SSID2 (0x480C) +#define STA_SSID3 (0x4810) +#define STA_SSID4 (0x4814) +#define STA_SSID5 (0x4818) +#define STA_SSID6 (0x481C) +#define STA_SSID7 (0x4820) +#define SSID_LEN (0x4824) +#define RX_FREE_MEM (0x5528) +#define RX_CURR_MEM (0x552C) +#define MAC_TIMESTAMP (0x5560) /* Check place*/ +#define RX_TIMESTAMP (0x5564) +#define RX_FRM_PTR (0x5568) +#define RX_FRM_LEN (0x556C) +#define RX_PLCP_HDR (0x5570) +#define RX_PLCP_SIGNAL (0x5574) +#define RX_PLCP_SERVICE (0x5578) /* 16 bits ?*/ +#define RX_PLCP_LENGTH (0x557C) +#define RX_FRM_CTL (0x5580) +#define RX_DUR_ID (0x5584) +#define RX_ADDR1_L (0x5588) +#define RX_ADDR1_H (0x558C) +#define RX_ADDR2_L (0x5590) +#define RX_ADDR2_H (0x5594) +#define RX_ADDR3_L (0x5598) +#define RX_ADDR3_H (0x559C) +#define RX_SEQ_CTL (0x55A0) +#define RX_WEP_IV (0x55A4) +#define RX_TIME_L (0x55A8) +#define RX_TIME_H (0x55AC) +#define RX_STATUS (0x55B0) +#define PLCP_ERR_CNT (0x4828) +#define FCS_ERR_CNT (0x482C) +#define RX_OVERFLOW_CNT (0x4830) +#define RX_DEBUG1 (0x4858) +#define RX_DEBUG2 (0x485C) +#define RX_QOS_CFG (0x4848) +#define RX_QOS_CTL (0x4844) +#define RX_QOS_STATUS (0x4854) /* new name RX_QOS_STS*/ +#define RX_TXOP_HOLDER_L (0x484C) +#define RX_TXOP_HOLDER_H (0x4850) +#define RX_FRM_CNT (0x4834) /* what is RX_FRM_CTR*/ +#define CONS_FCS_ERR_CNT (0x483C) +#define CONS_FCS_ERR_CFG (0x4840) +#define RX_QOS_CTL_MASK (0x48A0) /* new*/ +#define RX_QOS_ACK_EN (0x48A4) /* new*/ +#define RX_QOS_NOACK_EN (0x48A8) /* new*/ +#define RX_QOS_ACK_BITMAP (0x48AC) /* new*/ + +/* Baseband Processor registers*/ +#define SBB_CFG (0x55C8) +#define SBB_ADDR (0x55D0) +#define SBB_DATA (0x55D4) +#define SBB_CTL (0x55D8) + +/* Radio Control Interface registers*/ +#define RCI_CTL (0x55DC) +#define RCI_DATA (0x55E0) +#define RCI_CFG1 (0x55E4) +#define RCI_CFG2 (0x55E8) +#define RCI_CFG3 (0x55EC) + +#define TNET1150_LAST_REG_ADDR PCI_CONTROL + + +/* Missing registers*/ + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/bssTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/bssTypes.h new file mode 100644 index 0000000..a105d79 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/bssTypes.h @@ -0,0 +1,128 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 + * \author Ronen Kalish + * \date 05-April-2005 + */ + + +#ifndef __BSS_TYPES_API_H__ +#define __BSS_TYPES_API_H__ + +#include "osDot11.h" + +/* + *********************************************************************** + * Constant definitions. + *********************************************************************** + */ +#define MAX_NUM_OF_NEIGHBOR_APS 30 +#define MAX_SIZE_OF_BSS_TRACK_LIST 16 + +/** \enum resultFrameType_e + * \brief enumerates the different types for a result frame + */ +typedef enum +{ + SCAN_RFT_BEACON = 0, /**< result frame is a beacon */ + SCAN_RFT_PROBE_RESPONSE /**< result frame is a probe response */ +} resultFrameType_e; + +/* + *********************************************************************** + * Structure definitions. + *********************************************************************** + */ + +/** \struct bssEntry_t + * \brief This structure contains a single BSS entry + */ +typedef struct +{ +/* values in beacon with fixed length */ + macAddress_t BSSID; /**< BSSID of this entry */ + UINT64 lastRxTSF; /**< TSF of last received frame */ + UINT16 beaconInterval; /**< Beacon interval of this AP */ + UINT16 capabilities; /**< capabilities of this AP */ +/* IE's in beacon */ + UINT8 DTIMPeriod; /**< DTIm period (in beacon interval quantas */ + resultFrameType_e resultType; /**< The type of frame in pBuffer */ + UINT16 bufferLength; /**< length of rest of beacon (or probe response) buffer */ + UINT8* pBuffer; /**< rest of beacon (or probe response) buffer */ +/* Information from other sources */ + radioBand_e band; /**< band on which the AP transmits */ + UINT8 channel; /**< channel on which the AP transmits */ + UINT8 rxRate; /**< Rate at which last frame was received */ + UINT32 lastRxHostTimestamp; /**< + * the host timestamp (in milliseconds) at which last frame + * was received + */ + INT8 RSSI; /**< average RSSI */ + INT8 lastRSSI; /** last given RSSI */ + BOOLEAN bNeighborAP; /**< Indicates whether this is a neighbor AP */ +} bssEntry_t; + +/** \struct bssList_t + * \brief This structure contains the BSS list + */ +typedef struct +{ + UINT8 numOfEntries; /**< number of entries in the list */ + bssEntry_t BSSList[ MAX_SIZE_OF_BSS_TRACK_LIST ]; /**< list of entries */ +} bssList_t; + +/** \struct neighborAP_t + * \brief This structure contains information on one neighbor AP + */ +typedef struct +{ + macAddress_t BSSID; /**< The BSSID (MAC address) of this AP */ + UINT8 channel; /**< the channel on which the AP transmits */ + radioBand_e band; /**< the band used by the AP */ +} neighborAP_t; + +/** \struct neighborAPList_t + * \brief This structure contains a list of Neighbor APs + */ +typedef struct +{ + UINT8 numOfEntries; /**< the number of entries in the list */ + neighborAP_t APListPtr[ MAX_NUM_OF_NEIGHBOR_APS ]; /**< a pointer to the list of APs */ +} neighborAPList_t; + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/cli_cu_common.h b/sta_dk/pform/linux/src/wlan_driver_inc/cli_cu_common.h new file mode 100644 index 0000000..09f2bd4 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/cli_cu_common.h @@ -0,0 +1,116 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" + +#ifdef _WINDOWS +#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 TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef NULL +# define NULL 0L +#endif + +#ifndef UNUSED +# define UNUSED(p) ((void)p) +#endif + +#ifndef _WINDOWS + + #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 +{ + tiUINT32 value; + char *name; +} named_value_t; +#ifdef _WINDOWS +#else +#define print_available_values(arr) \ + { int i; for(i=0; i=SIZE_ARR(arr)-1) ? "\n" : ", " ); \ + } +#endif + +void print_memory_dump(char *addr, int size ); + +#endif /* common_h */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/commonTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/commonTypes.h new file mode 100644 index 0000000..4a24831 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/commonTypes.h @@ -0,0 +1,1133 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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__ + +#include "osTIType.h" +#include "osDot11.h" +#include "tiwlnif.h" +#include "paramMng.h" +#include "whalDefaultParams.h" + +/***************************************************************************** + ** ** + ** ** + ** CONSTANTS ** + ** ** + ** ** + *****************************************************************************/ + +/************************************/ +/* Report Module values */ +/************************************/ + +#define CONFIG_MGR_MODULE_LOG (0x00) +#define SME_SM_MODULE_LOG (0x01) +#define SITE_MGR_MODULE_LOG (0x02) +#define CONN_MODULE_LOG (0x03) +#define MLME_SM_MODULE_LOG (0x04) +#define AUTH_MODULE_LOG (0x05) +#define ASSOC_MODULE_LOG (0x06) +#define RX_DATA_MODULE_LOG (0x07) +#define TX_DATA_MODULE_LOG (0x08) +#define CTRL_DATA_MODULE_LOG (0x09) +#define RSN_MODULE_LOG (0x0A) +#define HAL_RX_MODULE_LOG (0x0B) +#define HAL_TX_MODULE_LOG (0x0C) +#define HAL_CTRL_MODULE_LOG (0x0D) +#define HAL_SECURITY_MODULE_LOG (0x0E) +#define MEM_MGR_MODULE_LOG (0x0F) +#define REPORT_MODULE_LOG (0x10) +#define SITE_UPDATE_MODULE_LOG (0x11) +#define REGULATORY_DOMAIN_MODULE_LOG (0x12) +#define MEASUREMENT_MNGR_MODULE_LOG (0x13) +#define MEASUREMENT_SRV_MODULE_LOG (0x14) +#define SOFT_GEMINI_MODULE_LOG (0x15) +#define SC_MODULE_LOG (0x16) +#define EXC_MANAGER_MODULE_LOG (0x17) +#define ROAMING_MANAGER_MODULE_LOG (0x18) +#define QOS_MANAGER_MODULE_LOG (0x19) +#define TRAFFIC_ADM_CTRL_MODULE_LOG (0x1A) +#define POWER_MANAGER_MODULE_LOG (0x1B) +#define POWER_CONTROL_MODULE_LOG (0x1C) +#define POWER_SERVER_MODULE_LOG (0x1D) +#define ELP_MODULE_LOG (0x1E) +#define SCR_MODULE_LOG (0x1F) +#define SCAN_SRV_MODULE_LOG (0x20) +#define SCAN_CNCN_MODULE_LOG (0x21) +#define SCAN_MNGR_MODULE_LOG (0x22) +#define GWSI_ADAPT_MODULE_LOG (0x23) +#define GWSI_ADAPT_CB_MODULE_LOG (0x24) +#define CORE_ADAPT_MODULE_LOG (0x25) +#define TX_HW_QUEUE_MODULE_LOG (0x26) +#define TX_CTRL_BLK_MODULE_LOG (0x27) +#define TX_RESULT_MODULE_LOG (0x28) +#define TNETW_IF_MODULE_LOG (0x29) +#define TNETW_ARBITER_MODULE_LOG (0x2a) +#define CURR_BSS_MODULE_LOG (0x2b) +#define FW_EVENT_MODULE_LOG (0x2c) +#define CMD_MBOX_MODULE_LOG (0x2d) +#define CMDQUEUE_MODULE_LOG (0x2e) +#define EVENT_MBOX_MODULE_LOG (0x2f) +#define TNETW_DRV_MODULE_LOG (0x30) +#define TNETW_XFER_MODULE_LOG (0x31) +#define RECOVERY_MGR_MODULE_LOG (0x32) +#define RECOVERY_CTRL_MODULE_LOG (0x33) +#define HW_INIT_MODULE_LOG (0x34) + +#define WLAN_MAX_LOG_MODULES (HW_INIT_MODULE_LOG + 1) + + +/************************************/ +/* Report Severity values */ +/************************************/ +#define WLAN_SEVERITY_INIT 1 +#define WLAN_SEVERITY_INFORMATION 2 +#define WLAN_SEVERITY_WARNING 3 +#define WLAN_SEVERITY_ERROR 4 +#define WLAN_SEVERITY_FATAL_ERROR 5 +#define WLAN_SEVERITY_SM 6 +#define WLAN_SEVERITY_CONSOLE 7 +#define WLAN_SEVERITY_DEBUG_RX 8 +#define WLAN_SEVERITY_DEBUG_TX 9 +#define WLAN_SEVERITY_DEBUG_CONTROL 10 +#define WLAN_SEVERITY_GWSI_RECORDING 11 + +#define WLAN_MAX_SEVERITIES (WLAN_SEVERITY_GWSI_RECORDING + 1) + + + +#define MAX_INFO_ELEMENT_LEN (32) + +#define IP_ADDR_LEN 4 +#define IP_V4_ADDR_LEN 4 +#define IP_V6_ADDR_LEN 6 + + +#define MAX_MULTICAST_GROUP_ADDRS 8 + + +#define NUM_OF_NOISE_HISTOGRAM_COUNTERS (8) + + +#define MAX_SUPPORTED_RATES 32 +#define RATES_SET_LEN 2 + +#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 MAX_IDENTITY_LEN 64 +#define MAX_PASSWD_LEN 128 + +#define MAX_NUM_OUI 16 +#define DOT11_OUI_LEN 3 + +/* The maximum number of multiple SSIDs that can be used in a single scan command */ +#define SCAN_MAX_SSID_NUM (1) + +/* The maximum number of information elements that sent in an active scan probe request + including the SSID */ +#define SCAN_MAX_INFO_ELEMENTS (3) + +/* WoneIndex value when running as station */ +#define STATION_WONE_INDEX (0) + +/* Power translation table definitions */ +#define NUM_POWER_LEVELS (4) +#define MAX_POWER_LEVEL (0) +#define MIN_POWER_LEVEL (NUM_POWER_LEVELS - 1) +#define DBM_TO_TX_POWER_FACTOR 10 + +/* TX_POWER is in Dbm/10 units */ +#define MAX_TX_POWER 255 +#define MIN_TX_POWER 0 +#define NUM_SUB_BANDS_FOR_POWER_TABLE 5 +#define BAND_2_4_POWER_TABLE 0 + +#define MAX_NUM_OF_TX_RATE_CLASS_POLICIES 8 /* max num of policies */ +#define MAX_PARAM_MODULE_NUMBER (GET_PARAM_MODULE_NUMBER(MAX_PARAM_MODULE_PARAM)) /*19*/ +#define FW_VERSION_LEN 20 +#ifndef TI_STATUS +#define TI_STATUS systemStatus_e +#endif +#define NUM_OF_MAX_TRIPLET_CHANNEL (32) +#define COUNTRY_STRING_LEN 3 + +/* Definitions for Rx Filter MIB. */ +#define PLT_MIB_RX_FILTER_PROMISCOUS_SET (UINT8) 0x01 /* set ? Enable: Forward all frames to host driver*/ +#define PLT_MIB_RX_FILTER_PROMISCOUS_CLEAR (UINT8) 0x00 /* cleared ? Disable: Do not orward all frames to the host driver*/ +#define PLT_MIB_RX_FILTER_BSSID_SET (UINT8) 0x02 /* set ? filter enabled: receive only those frames that match the BSSID given in the Join command*/ +#define PLT_MIB_RX_FILTER_BSSID_CLEAR (UINT8) 0x00 /* cleared ? filter disabled: ignore BSSID in receiving*/ + + + +/***************************************************************************** + ** ** + ** ** + ** ENUMS ** + ** ** + ** ** + *****************************************************************************/ + +typedef enum +{ + txPolicy54 = 0, + txPolicy48, + txPolicy36, + txPolicy24, + txPolicy22, + txPolicy18, + txPolicy12, + txPolicy11, + txPolicy9, + txPolicy6, + txPolicy5_5, + txPolicy2, + txPolicy1, + MAX_NUM_OF_TX_RATES_IN_CLASS +}txRateClassId_e; + + +typedef enum{ + DROP_NEW_PACKET = 0, + DROP_OLD_PACKET +}qOvFlowPolicy_e; + +typedef enum +{ + SG_ENABLE = 0, + SG_DISABLE , + SG_SENSE_NO_ACTIVITY , + SG_SENSE_ACTIVE +} SoftGeminiEnableModes_e; + + +typedef enum +{ + IP_VER_4 = 0, + IP_VER_6 +} IPver_e; + +typedef enum +{ + DRV_MODULATION_NONE = 0, + DRV_MODULATION_CCK = 1, + DRV_MODULATION_PBCC = 2, + DRV_MODULATION_QPSK = 3, + DRV_MODULATION_OFDM = 4, +} modulationType_e; + +/* tx antenna */ +typedef enum +{ + TX_ANTENNA_2 = 0, + TX_ANTENNA_1 = 1 +} txAntenna_e; + +/* rx antenna */ +typedef enum +{ + RX_ANTENNA_1 = 0, + RX_ANTENNA_2 = 1, + RX_ANTENNA_FULL = 2, + RX_ANTENNA_PARTIAL = 3 +} rxAntenna_e; + +typedef enum +{ + HW_CLOCK_40_MHZ = 40, + HW_CLOCK_80_MHZ = 80 +} hwClock_e; + +typedef enum +{ + MAXIM = 0, + RFMD = 1, + RADIA_BG = 2, + RADIA_ABG = 3, + UNKNOWN_RADIO_TYPE = 4 +} radioType_e; + + /** Available cipher suites for admission control */ +typedef enum +{ + RSN_CIPHER_NONE = 0, /**< no chpiher suite */ + RSN_CIPHER_WEP = 1, /**< WEP-40 chpiher suite */ + RSN_CIPHER_TKIP = 2, /**< TKIP chpiher suite */ + RSN_CIPHER_AES_WRAP = 3, /**< AES WRAP chpiher suite */ + RSN_CIPHER_AES_CCMP = 4, /**< AES CCMP chpiher suite */ + RSN_CIPHER_WEP104 = 5, /**< WEP-104 chpiher suite */ + RSN_CIPHER_CKIP = 6, /**< CKIP chpiher suite */ + RSN_CIPHER_UNKNOWN = 255 /**< UNKNOWN chpiher suite */ +} cipherSuite_e; + + +/** 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 */ +} authSuite_e; + +/* 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, + RSN_EXT_AUTH_MODEMAX /* Not a real mode, defined as upper bound */ +} externalAuthMode_e; + +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 +} authStatus_e; + +/************************************/ +/* System return values. */ +/************************************/ +#undef OK +#undef NOK + +typedef enum +{ + /* System section */ +#if !defined(OK) || (OK!=0) + OK = 0, +#endif +#if !defined(NOK) || (NOK!=1) + NOK = 1, +#endif + /* GWSI status */ + GWSI_FAILED = 1, + PARAM_NOT_SUPPORTED = 2, + PARAM_VALUE_NOT_VALID = 3, + CONFIGURATION_NOT_VALID = 4, + NO_SITE_SELECTED_YET = 5, + RE_SCAN_NEEDED = 6, + 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, + + /* Data path section */ + RX_MIC_FAILURE_ERROR = 12, + RX_DECRYPT_FAILURE = 13, + RX_STATUS_FAILURE = 14, + TX_QUEUE_SELECTED_OK = 15, + NO_TX_QUEUE_SELECTED = 16, + TX_STATUS_PENDING = 17, + TX_STATUS_NO_RESOURCES = 18, + TX_STATUS_FAILURE = 19, + TX_STATUS_OK = 20, + + /* 4x section */ + MAKE_CONCATENATION = 21, + SEND_ONE_MSDU = 22, + DO_NOT_SEND_MSDU = 23, + FOUR_X_DISABLE = 24, + + /* Scanning section */ + NO_COUNTRY = 25, + SCAN_ALREADY_IN_PROGRESS = 26, + NO_SCAN_IN_PROGRESS = 27, + + /* Setting same power */ + TX_POWER_SET_SAME_VALUE = 28, + /* changing service channel */ + CHANNEL_CHANGED = 29, + SUPPORT_IMMEDIATE_MEASUREMENT_ONLY = 30, + MEASUREMENT_TYPE_NOT_SUPPORT = 31, + MEASUREMENT_CAN_NOT_EXECUTED_IN_PARALLEL = 32, + MEASUREMENT_REQUEST_IGNORED = 33, + CANNOT_SET_MEASUREMENT_PARAM_WHEN_ACTIVATED = 34, + CANNOT_SET_CHANNEL_THAT_IS_NOT_SUPPORTED = 35, + + /* rsn */ + STATUS_BAD_KEY_PARAM = 36, + STATUS_RX_MIC_FAIL = 37, + + /* site Manager */ + STATUS_FIRST_PRIMARY_SITE_SET = 38, + + /* + Power Management + */ + POWER_SAVE_802_11_SUCCESS = 39, + POWER_SAVE_802_11_FAIL = 40, + POWER_SAVE_802_11_NOT_ALLOWED = 41, + PENDING = 42, + + /* GWSI TX packet sending status */ + SEND_COMPLETE_SUCCESS = 44, + SEND_COMPLETE_RETRY_EXCEEDED = 45, + SEND_COMPLETE_LIFETIME_EXCEEDED = 46, + SEND_COMPLETE_NO_LINK = 47, + SEND_COMPLETE_MAC_CRASHED = 48, + /*POWER_SAVE_802_11_NOT_ALLOWED = 39,*/ + POWER_SAVE_802_11_IS_CURRENT = 49, + + /* GWSI TX Send-Packet status */ + SEND_PACKET_XFER_DONE = 50, /* Xfer completed, another packet can be sent, Xfer-Done won't be called. */ + SEND_PACKET_SUCCESS = 51, /* Xfer in process, another packet can be sent, Xfer-Done will be called. */ + SEND_PACKET_PENDING = 52, /* Xfer in process, another packet CAN-NOT be sent. Xfer-Done will be called. */ + SEND_PACKET_BUSY = 53, /* Packet rejected due to queue lack of resources. + Should be sent again after resources are freed on Tx-complete. */ + SEND_PACKET_ERROR = 54, /* Packet rejected due to API violation (sending in PENDING state or wrong params. */ + SEND_PACKET_RECOVERY = 55, /* Recovery happened during Xfer */ + + /* QoSMngr */ + TI_WLAN_QOS_RETURN_CODES, /* detailed in tiQosTypes.h */ + + /* TNETWIF Return Errors */ + TNETWIF_NONE, + TNETWIF_OK, + TNETWIF_COMPLETE, + TNETWIF_PENDING, + TNETWIF_ERROR, + TNETWIF_MORE, + + /* Rx Data Filters */ + RX_NO_AVAILABLE_FILTERS, + RX_FILTER_ALREADY_EXISTS, + RX_FILTER_DOES_NOT_EXIST, + + /* Soft Gemini */ + SG_REJECT_MEAS_SG_ACTIVE, + +} systemStatus_e; + +typedef enum +{ + NO_FAILURE = -1, + NO_SCAN_COMPLETE_FAILURE = 0, + MBOX_FAILURE, + HW_AWAKE_FAILURE, + BUS_ERROR, + DEVICE_ERROR, + TX_STUCK, + DISCONNECT_TIMEOUT, + POWER_SAVE_FAILURE, + MEASUREMENT_FAILURE, + MAX_FAILURE_EVENTS +} failureEvent_e; + +/** \enum TnetWakeOn_e */ +typedef enum +{ + + TNET_WAKE_ON_BEACON, /**< Indicate the wake on event of the HW - beacon. + * In this event the HW configure to be awake on every beacon. + */ + + 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). + */ + + 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. + */ + + 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. + */ + + TNET_WAKE_ON_HOST /**< Indicate the wake on event of the HW - Host access only + */ + +}PowerMgr_TnetWakeOn_e; + + +/** \enum PowerMgr_RequestFor_802_11_PS_e */ +typedef enum +{ + REQUEST_TO_ENTER_POWER_SAVE_802_11, /**< request to enter to power save + * of 802.11 + */ + + REQUEST_NOT_TO_CHANGE_POWER_SAVE_802_11, /**< request to not change the + * power save of 802.11 + */ + + REQUEST_TO_EXIT_POWER_SAVE_802_11 /**< request to exit from power save + * of 802.11 + */ +}PowerMgr_RequestFor_802_11_PS_e; + +typedef enum +{ + POWER_SAVE_OFF, /**< power save of 802.11 + */ + + POWER_SAVE_ON , /**< power save on 802.11 + */ + + POWER_SAVE_KEEP_CURRENT /**< power save 802.11 don't change + */ +}PowerMgr_802_11_PsMode_e; + +typedef enum +{ + POWERAUTHO_POLICY_ELP = 0, + POWERAUTHO_POLICY_PD = 1, + POWERAUTHO_POLICY_AWAKE = 2, + POWERAUTHO_POLICY_NUM +} powerAutho_PowerPolicy_e; + +typedef enum +{ + ELPCTRL_MODE_NORMAL = 0, + ELPCTRL_MODE_KEEP_AWAKE +} elpCtrl_Mode_e; + +/* + * this enum defines the protocol modes of the QOS management object. + */ +typedef enum{ + WME = 0, + NONE_QOS, +}qosProtocols_e; + +typedef enum +{ + RX_PACKET_TYPE_DATA = 0, + RX_PACKET_TYPE_MANAGEMENT +}rxPacketType_e; + +typedef enum +{ + DOT11_B_MODE = 1, + DOT11_A_MODE = 2, + DOT11_G_MODE = 3, + DOT11_DUAL_MODE = 4, + + DOT11_MAX_MODE +} dot11mode_e; + +/* hw access method*/ +typedef enum +{ + HW_ACCESS_BUS_SLAVE_INDIRECT = 0, + HW_ACCESS_BUS_SLAVE_DIRECT = 1, + HW_ACCESS_BUS_MASTER = 2 +} hwAccessMethod_e; + +/* + * this enum includes the header converting modes configured to dataCtrl object. + */ +typedef enum{ + NO_CONVERT = 0, + QOS_CONVERT, + LEGACY_CONVERT, +}headerConvetMode_e; + +/* * this enum defines the admission state configured to dataCtrl object. + */ +typedef enum{ + ADMISSION_NOT_REQUIRED = 0, + ADMISSION_REQUIRED = 1, +}admissionState_e; + + +/***************************************************************************** + ** ** + ** ** + ** TYPEDEFS ** + ** ** + ** ** + *****************************************************************************/ +/**< +* Callback for 802.11 PS - Success/Fail +*/ +typedef void (*ps802_11_NotificationCB_t)(TI_HANDLE module, + TI_STATUS thePsSuccess); + +/**< +* Asynchronous init mode callback function type +*/ +typedef void (*fnotify_t)(TI_HANDLE module, TI_STATUS status); + +typedef struct +{ + UINT8 txRate[MAX_NUM_OF_TX_RATES_IN_CLASS]; + UINT8 shortRetryLimit; + UINT8 longRetryLimit; + UINT8 flags; +}txRateClass_t; + +typedef struct +{ + UINT32 numOfRateClasses; + txRateClass_t rateClass[MAX_NUM_OF_TX_RATE_CLASS_POLICIES]; +}txRatePolicy_t; + +PACKED_STRUCT( e2Version_t, + + UINT16 major; + UINT8 minor; + UINT8 last; + UINT16 bugfix; +); + +PACKED_STRUCT( TripletCahnnel_t, + + UINT8 firstChannelNumber; + UINT8 numberOfChannels; + UINT8 maxTxPowerLevel; +); + +PACKED_STRUCT( IpAddress_t, + + UINT8 addr[IP_ADDR_LEN]; +); + +PACKED_STRUCT( informationElementHeader_t, + + UINT8 eleId; + UINT8 eleLen; +); + +PACKED_STRUCT( informationElement_t, + + informationElementHeader_t hdr; + UINT8 info[MAX_INFO_ELEMENT_LEN]; +); + +PACKED_STRUCT( countryIE_t, + + UINT8 CountryString[COUNTRY_STRING_LEN]; + TripletCahnnel_t tripletChannels[NUM_OF_MAX_TRIPLET_CHANNEL]; +); + +/* Struct retrieved from NVS */ +typedef struct +{ + UINT8 uDbm[NUM_SUB_BANDS_FOR_POWER_TABLE][NUM_POWER_LEVELS]; +} powerLevelTable_t; + +PACKED_STRUCT( SoftGeminiParam_t, + UINT32 wlanRxMinRateToRespectBtHp; /* Integer rate number. Note that Fw gets it in Index rate */ + UINT16 btHpMaxTime; /* the maximum length of time the BT HP will be respected*/ + UINT16 wlanHpMaxTime; /* the maximum length of time the WLAN HP will be respected*/ + UINT16 senseDisableTimer; /* the length of time when working in SENSE mode that the BT needs to be inactive in order to DISABLE the SG*/ + UINT16 protectiveRxTimeBeforeBtHp; + UINT16 protectiveTxTimeBeforeBtHp; + UINT16 protectiveRxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 1500*/ + UINT16 protectiveTxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 3000*/ + UINT16 protectiveWlanCycleTimeForFastAp; /*new range: 2000-65535 default: 8700*/ + UINT16 btAntiStarvationPeriod; /* 0 - 15000Msec */ + UINT16 timeoutNextBtLpPacket; + UINT16 wakeUpTimeBeforeBeacon; + UINT16 hpdmMaxGuardTime; /* 0-50000 */ + UINT16 timeoutNextWlanPacket; + UINT8 sgAntennaType; + UINT8 signalingType; + UINT8 afhLeverageOn; /* specifies whether to use the AFH information from the BT */ + UINT8 numberQuietCycle; + UINT8 maxNumCts; + UINT8 numberOfWlanPackets; + UINT8 numberOfBtPackets; + UINT8 numberOfMissedRxForAvalancheTrigger; /*new range: 1-255 default: 5*/ + UINT8 wlanElpHpSupport; /* new range: 0-1 default: 1*/ + UINT8 btAntiStarvationNumberOfCyclesWithinThePeriod; /* 0 - 15 Cycles */ + UINT8 ackModeDuringBtLpInDualAnt; + UINT8 allowPaSdToggleDuringBtActivityEnable; + UINT8 sgAutoModeNoCts; + UINT8 numOfBtHpRespectedReq; + +); /* Parameters directly to FW */ + + +PACKED_STRUCT( interogateCmdHdr_t, + + UINT16 id; + UINT16 len; +); + +/* Struct for retrieving powerLevelTable_t with interrogate IE */ +typedef struct +{ + interogateCmdHdr_t tPowerLevelResCmdHdr; + powerLevelTable_t tTable; +} powerLevelTableInterrogate_t; + +typedef struct +{ + interogateCmdHdr_t noiseHistResCmdHdr; + UINT32 counters[NUM_OF_NOISE_HISTOGRAM_COUNTERS]; + UINT32 numOfLostCycles; + UINT32 numOfTxHwGenLostCycles; + UINT32 numOfRxLostCycles; +} noiseHistogramResults_t; +/* + * interogateCmdCBParams_t: + * 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 + */ +typedef struct +{ + void* CB_Func; /* Completion CB function*/ + TI_HANDLE CB_handle; /* CB handle*/ + UINT8* CB_buf; /* Buffer contains the content to be written or the retrieved content*/ +} interogateCmdCBParams_t; + + +typedef struct +{ + void* CB_Func; + TI_HANDLE CB_handle; + UINT8* CB_buf; +} configureCmdCBParams_t; + +PACKED_STRUCT( securityKeys_t, + + keyType_e keyType; /* key type (WEP, TKIP etc.) */ + + UINT32 encLen; + UINT8 encKey[MAX_KEY_LEN]; + + UINT8 micRxKey[MAX_KEY_LEN]; + UINT8 micTxKey[MAX_KEY_LEN]; + + UINT32 keyIndex; /* id=0 is broadcast key */ + macAddress_t macAddress; + UINT8 keyRsc[KEY_RSC_LEN]; +); + + +typedef struct +{ + UINT8 queueID; + UINT8 channelType; + UINT8 tsid; + UINT32 dot11EDCATableMSDULifeTime; + UINT8 psScheme; + UINT8 ackPolicy; + UINT32 APSDConf[2]; +} queueTrafficParams_t; + +typedef struct +{ + UINT8 ac; + UINT8 cwMin; + UINT16 cwMax; + UINT8 aifsn; + UINT16 txopLimit; +}acQosParams_t; + +PACKED_STRUCT( rxTimeOut_t, + UINT16 psPoll; + UINT16 UPSD; +); + +PACKED_STRUCT( QOS_AC_IE_ParametersRecord_t, + + UINT8 ACI_AIFSN; + UINT8 ECWmin_ECWmax; + UINT16 TXOPLimit; +); + +PACKED_STRUCT( ACParameters_t, + + QOS_AC_IE_ParametersRecord_t ACBEParametersRecord; + QOS_AC_IE_ParametersRecord_t ACBKParametersRecord; + QOS_AC_IE_ParametersRecord_t ACVIParametersRecord; + QOS_AC_IE_ParametersRecord_t ACVOParametersRecord; +); + + +typedef struct{ + UINT8 PsMode; /* power save mode. */ + UINT16 TxQueueSize; + UINT8 QueueIndex; + qOvFlowPolicy_e QueueOvFlowPolicy; + UINT8 ackPolicy; + UINT32 MsduLifeTime; +}acTrfcCtrl_t; + +typedef struct{ + headerConvetMode_e headerConverMode; /* header converting mode */ + BOOL convertTagZeroFrames; /* flag for converting zero tags */ + trafficAdmState_e admissionState; /* AC admission state */ + admissionState_e admissionRequired; /* AC admission is mandatory. */ + acTrfcType_e tag_ToAcClsfrTable[MAX_NUM_OF_802_1d_TAGS]; /* tag to AC classification */ +}qosParams_t; + +typedef struct{ + acTrfcCtrl_t acTrfcCtrl; + qosParams_t qosParams; + UINT8 *tsrsArr; + UINT8 tsrsArrLen; + UINT8 acID; +}txDataQosParams_t; + +typedef struct{ + UINT8 voiceTspecConfigure; + UINT8 videoTspecConfigure; +}TspecConfigure_t; + + +/*************************************/ +/* TNETW Driver init table. */ +/*************************************/ + +PACKED_STRUCT(whalCtrl_tx_Queue_t, + UINT8 numDesc; + UINT8 priority; +); + + +PACKED_STRUCT(whalCtrl_init_t, + UINT8 hwAccessMethod; + UINT8 maxSitesFragCollect; + UINT8 packetDetectionThreshold; + UINT32 blockSize; + UINT8 rxDescNum; + UINT8 txDescNum; + UINT32 nullTemplateSize; + UINT32 beaconTemplateSize; + UINT32 probeRequestTemplateSize; + UINT32 probeResponseTemplateSize; + UINT32 PsPollTemplateSize; + UINT32 qosNullDataTemplateSize; + UINT32 tddRadioCalTimout; + UINT32 CrtRadioCalTimout; + int UseMboxInterrupt; + int UseTxDataInterrupt; + UINT32 TraceBufferSize; + BOOLEAN bDoPrint; + UINT8 StaMacAddress[MAC_ADDR_LEN]; + UINT8 UsePlcpHeader; + UINT8 numTxQueues; + whalCtrl_tx_Queue_t tx_attrib_queue[MAX_NUM_OF_TX_QUEUES]; + BOOL TxFlashEnable; + UINT8 rxMemBlkNumber; + UINT8 txMinMemBlkNumber; + UINT16 txCompleteTimeout; + UINT8 txCompleteThreshold; + UINT8 TxBlocksHighPercentPerAc[MAX_NUM_OF_AC]; + UINT8 TxBlocksLowPercentPerAc[MAX_NUM_OF_AC]; + UINT16 BeaconRxTimeout; + UINT16 BroadcastRxTimeout; + UINT8 RxBroadcastInPs; + UINT8 ConsecutivePsPollDeliveryFailureThreshold; +); + + +PACKED_STRUCT(halCtrlConfigParams_t, + UINT8 halCtrlCalibrationChannel2_4; + UINT8 halCtrlCalibrationChannel5_0; + UINT16 halCtrlRtsThreshold; + UINT16 halCtrlFragThreshold; + UINT32 halCtrlMaxTxMsduLifetime; + UINT32 halCtrlMaxRxMsduLifetime; + UINT8 halCtrlRateFallbackRetry; + UINT16 halCtrlListenInterval; + BOOL halCtrlEnable4x; + txAntenna_e halCtrlTxAntenna; + rxAntenna_e halCtrlRxAntenna; + UINT8 halCtrlMacClock; + UINT8 halCtrlArmClock; + BOOL halCtrlRxEnergyDetection; + BOOL halCtrlTxEnergyDetection; + BOOL halCtrlEepromLessEnable; + UINT16 halCtrlBcnRxTime; + BOOL halCtrlRxDisableBroadcast; + BOOL halCtrlRecoveryEnable; + BOOL halCtrlFirmwareDebug; + /* hardware ACI parameters */ + UINT8 halCtrlACIMode; + UINT8 halCtrlInputCCA; + UINT8 halCtrlQualifiedCCA; + UINT8 halCtrlStompForRx; + UINT8 halCtrlStompForTx; + UINT8 halCtrlTxCCA; + rxTimeOut_t rxTimeOut; + UINT8 halCtrlTxCompleteThreshold; + BOOL WiFiWmmPS; + +); + +typedef struct +{ + UINT16 gpioBitNumForRadioDisableFeature; +}radioDisableParams_t; + + /* New Power*/ +PACKED_STRUCT(PowerSrvInitParams_t, + /* powerMgmtConfig IE */ + UINT8 numNullPktRetries; + UINT8 hangOverPeriod; +); + +PACKED_STRUCT( scanSrvInitParams_t, + UINT32 numberOfNoScanCompleteToRecovery; + UINT32 uTriggeredScanTimeOut; /* i.e. split scan */ +); + +PACKED_STRUCT(reportInitParams_t, + UINT8 SeverityTable[WLAN_MAX_SEVERITIES]; + UINT8 ModuleTable[WLAN_MAX_LOG_MODULES]; +); + +PACKED_STRUCT(beaconFilterParams_t, + UINT8 desiredState; + UINT8 currentState; + UINT8 numOfStored; + UINT8 IETable[BEACON_FILTER_IE_TABLE_MAX_SIZE]; + UINT8 numOfElements; + UINT8 IETableSize; + +); + +PACKED_STRUCT(arpIpFilterParams_t, + UINT8 isFilterEnabled; + IpAddress_t arpIpInitParams; +); + +PACKED_STRUCT(macAddrFilterParams_t, + UINT8 isFilterEnabled; + UINT8 numOfMacAddresses; + macAddress_t macAddrTable[MAX_MULTICAST_GROUP_ADDRS]; + +); + +PACKED_STRUCT(txXferInitParams_t, + /* Duration in which HW buffer is full until recovery is triggered */ + UINT32 timeToTxStuckMs; +); + +PACKED_STRUCT(macPreambleParams_t, + UINT8 earlyWakeUp; +); + +/* + * TnetwDrv_InitParams_t: + * This structure encapsulates the initialization data required by the TnetwDrv layer + */ +PACKED_STRUCT(TnetwDrv_InitParams_t, + whalCtrl_init_t whalCtrl_init; + halCtrlConfigParams_t halCtrlConfigParams; + reportInitParams_t reportParams; + PowerSrvInitParams_t PowerSrvInitParams; + scanSrvInitParams_t scanSrvInitParams; + arpIpFilterParams_t arpIpFilterParams; + macAddrFilterParams_t macAddrFilterParams; + beaconFilterParams_t beaconFilterParams; + txXferInitParams_t txXferInitParams; + macPreambleParams_t macPreambleParams; +); + +/* PLT*/ +typedef struct +{ + UINT32 FCSErrorCount; /* increment when an FCS error is detected in a received MPDU*/ + UINT32 TotalFrameCount;/* increment for each packet.*/ + UINT32 PLCPErrorCount; /* increment when an PLCP error is detected in a received MPDU*/ + UINT32 SeqNumMissCount; /* Increment when an sequence number of arrived packet is not in order */ + UINT32 SeqNumMissCountRef; /* holds the reference value for seqNumMissCount test start */ +}PltRxPer_t; + +typedef struct +{ + UINT32 chID; /* Channel number */ + UINT32 rate; /* index of the transmit */ + UINT32 InterPacketDelay;/*(ms) */ + UINT32 NumOfFrames; + UINT32 aPacketLength; + UINT32 aSeqNumMode; /* fixed / incremented */ + macAddress_t aPeerMacAddr; + UINT8 preamble; /* {PREAMBLE_LONG | PREAMBLE_SHORT } */ + UINT8 band; /* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK } */ + UINT8 mode; /* {AUTO_SEQ_NUMBER | RANDOM_DATA | ZOZO_DATA} */ + UINT8 aPadding[3]; +}PltTxContinues_t; + + /* ChannelBand_t - */ +/* This structure holds the parameters for TX carrier test and radio tune*/ +typedef struct +{ + UINT32 channel; /* Channel number*/ + UINT32 band; /* Band */ +} ChannelBand_t; + + + /* PLT - MIBs structures */ +/* TMIB - */ +/* Specifies the type of a MIB element */ +typedef enum +{ + PLT_MIB_dot11StationId = 0x1001, + PLT_MIB_dot11MaxReceiveLifetime, + PLT_MIB_dot11SlotTime, + PLT_MIB_dot11GroupAddressesTable, + PLT_MIB_dot11WepDefaultKeyId, + PLT_MIB_dot11CurrentTxPowerLevel, + PLT_MIB_dot11RTSThreshold, + + PLT_MIB_ctsToSelf = 0x1101, + PLT_MIB_arpIpAddressesTable, + PLT_MIB_templateFrame, + PLT_MIB_rxFilter, + PLT_MIB_beaconFilterIETable, + PLT_MIB_beaconFilterEnable, + PLT_MIB_sleepMode, + PLT_MIB_wlanWakeUpInterval, + PLT_MIB_beaconLostCount, + PLT_MIB_rcpiThreshold, + PLT_MIB_statisticsTable, + PLT_MIB_ibssPsConfig, + PLT_MIB_txRatePolicy, + PLT_MIB_countersTable, + PLT_MIB_btCoexsitenceMode, + PLT_MIB_btCoexistenceParameters +} PLT_MIB_e; + + +#define PLT_MAX_MULTICAST_GROUP_ADDRS 8 + +typedef struct +{ + macAddress_t GroupTable[PLT_MAX_MULTICAST_GROUP_ADDRS]; + tiUINT8 bFilteringEnable; + tiUINT8 nNumberOfAddresses; +}PLT_MIB_GroupAdressTable_t; + + +typedef struct +{ + tiUINT32 FilteringEnable; + UCHAR addr[IP_V4_ADDR_LEN]; +}PLT_MIB_ArpIpAddressesTable_t; + + +/* TTemplateType - */ +/* Specifies the type of a templateFrame */ +typedef enum +{ /* Frame type: */ + PLT_TEMPLATE_TYPE_BEACON, /* 0 for beacon template, */ + PLT_TEMPLATE_TYPE_PROBE_REQUEST, /* 1 for probe request template,*/ + PLT_TEMPLATE_TYPE_NULL_FRAME, /* 2 for NULL data frame */ + PLT_TEMPLATE_TYPE_PROBE_RESPONSE, /* 3 for probe response frame */ + PLT_TEMPLATE_TYPE_QOS_NULL_FRAME, /* 4 for QOS NULL data frame */ + PLT_TEMPLATE_TYPE_PS_POLL, /* 5 for PS-Poll frame */ +} PLT_MIB_TemplateType_t; + +#define PLT_MIB_TEMPLATE_DATA_MAX_LEN 256 +typedef struct +{ + PLT_MIB_TemplateType_t FrameType; + tiUINT32 Rate; + tiUINT16 Length; + tiUINT8 Data[PLT_MIB_TEMPLATE_DATA_MAX_LEN]; +}PLT_TemplateFrame_t; + +typedef struct +{ + tiUINT32 WakeUpInterval; + tiUINT8 ListenInterval; /* Listen interval in unit of the beacon/DTIM */ +}PLT_MIB_WlanWakeUpInterval_t; + + +typedef struct +{ + tiUINT32 PLCPErrorCount; + tiUINT32 FCSErrorCount; +}PLT_MIB_CounterTable_t; + + +/*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 PLT_MIB_MAX_SIZE_OF_IE_TABLE 112 +/* NOTE: 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 WriteMIB command or readMIBComplete event */ +typedef struct +{ + UINT8 iNumberOfIEs; /* number of information elements in table */ + UINT8 iIETable[PLT_MIB_MAX_SIZE_OF_IE_TABLE]; +}PLT_SBeaconFilterIETable_t; + +typedef union +{ + macAddress_t StationId; + tiUINT32 MaxReceiveLifeTime; + UINT32 SlotTime; + PLT_MIB_GroupAdressTable_t GroupAddressTable; + tiUINT8 WepDefaultKeyId; + tiUINT8 PowerLevel; + tiUINT16 RTSThreshold; + tiUINT32 CTSToSelfEnable; + PLT_MIB_ArpIpAddressesTable_t ArpIpAddressesTable; + PLT_TemplateFrame_t TemplateFrame; + tiUINT8 RxFilter; + PLT_MIB_WlanWakeUpInterval_t WlanWakeUpInterval; + PLT_MIB_CounterTable_t CounterTable; + PLT_SBeaconFilterIETable_t BeaconFilter; + txRatePolicy_t txRatePolicy; +}PLT_MIB_data_u; + + +typedef struct{ + PLT_MIB_e aMib; + UINT32 Length; + PLT_MIB_data_u aData; +}PLT_MIB_t; + + +#endif /* __COMMON_TYPES_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/configMgr.h b/sta_dk/pform/linux/src/wlan_driver_inc/configMgr.h new file mode 100644 index 0000000..85186a8 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/configMgr.h @@ -0,0 +1,167 @@ +/** \file configMgr.h + * \brief config manager module internal header file + * + * \see configMgr.c + */ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: configMgr.h */ +/* PURPOSE: Config manager module internal header file */ +/* */ +/***************************************************************************/ +#ifndef __CONFIG_MGR_H__ +#define __CONFIG_MGR_H__ + +#include "osTIType.h" +#include "paramOut.h" +#include "paramIn.h" +#include "fsm.h" + +/* Config manager state machine defintions */ +typedef enum +{ + CFG_MGR_STATE_IDLE = 0, + CFG_MGR_STATE_RUNNING = 1, + CFG_MGR_STATE_STOPPED = 2, +} stateCfg_e; + +typedef struct +{ + paramFunc_t set; + paramFunc_t get; + TI_HANDLE handle; +} paramAccess_t; + +/* Configuration manager handle */ +typedef struct +{ + UINT8 state; + fsm_stateMachine_t *pFsm; + + paramAccess_t paramAccessTable[MAX_PARAM_MODULE_NUMBER]; + + /* SME handles */ + TI_HANDLE hSmeSm; + TI_HANDLE hSiteMgr; + TI_HANDLE hConn; + + /* MLME handles */ + TI_HANDLE hMlmeSm; + TI_HANDLE hAuth; + TI_HANDLE hAssoc; + + /* Data handles */ + TI_HANDLE hRxData; + TI_HANDLE hTxData; + TI_HANDLE hCtrlData; + + /* Traffic Monitor */ + TI_HANDLE hTrafficMon; + + /* RSN handle */ + TI_HANDLE hRsn; + + /* HAL handles */ + TI_HANDLE hHalCtrl; + + /* Network Control */ + TI_HANDLE hRegulatoryDomain; + TI_HANDLE hMeasurementMgr; + TI_HANDLE hSoftGemini; + + /* EXC Manager*/ + TI_HANDLE hExcMngr; + + /* Roaming Manager */ + TI_HANDLE hRoamingMngr; + + /* QOS Manager */ + TI_HANDLE hQosMngr; + + /* Utils handles */ + TI_HANDLE hReport; + TI_HANDLE hMemMgr; + + /* OS handle */ + TI_HANDLE hOs; + + /* Power handles */ + TI_HANDLE hPowerMgr; + TI_HANDLE hPowerSrv; + + /* Event Handler Handles */ + TI_HANDLE hEvHandler; + + /* AP Connection Handles */ + TI_HANDLE hAPConnection; + + /* Current BSS Handles */ + TI_HANDLE hCurrBss; + + /* SwitchChannel Handles */ + TI_HANDLE hSwitchChannel; + + /* Services handles */ + TI_HANDLE hSCR; /* SCR */ + TI_HANDLE hMacServices; /* MacServices */ + + /* Management handles */ + TI_HANDLE hScanCncn; /* Scan Concentrator */ + + /* Application handles */ + TI_HANDLE hScanMngr; /* Scan Manager */ + + /* Health Monitor */ + TI_HANDLE hHealthMonitor; + + TI_HANDLE hRecoveryMgr; + + /* Core Callbacks pointers to be used in the config phase */ + /*TI_HANDLE hcoreCallbacks;*/ + + TI_HANDLE hTnetwDrv; + + /* Pointer to configuration parameters */ + initTable_t *pInitTable; + + /* Pointer to driver's mac address */ + macAddress_t *pMacAddr; + +} configMgr_t; + +#endif /* __CONFIG_MGR_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/coreDefaultParams.h b/sta_dk/pform/linux/src/wlan_driver_inc/coreDefaultParams.h new file mode 100644 index 0000000..0f8b1d0 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/coreDefaultParams.h @@ -0,0 +1,1266 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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. */ + + +#define SITE_MGR_CHANNEL_MIN 1 +#define SITE_MGR_CHANNEL_A_MIN 36 /* band A*/ +#define SITE_MGR_CHANNEL_B_G_MAX 14 /* band B&G*/ +#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_BSSID_DEF "DEADDEADDEAD" + +#define SITE_MGR_SSID_STRING_DEF "" +#define SITE_MGR_SSID_LEN_DEF 0 + +#define SITE_MGR_BSS_TYPE_DEF BSS_INFRASTRUCTURE + +#define SITE_MGR_DEF_RATE_SET_MAX_BASIC_DEF DRV_RATE_2M +#define SITE_MGR_DEF_RATE_SET_MAX_ACTIVE_DEF DRV_RATE_11M + +#define SITE_MGR_MGMT_FRAME_RATE_MIN DRV_RATE_1M +#define SITE_MGR_MGMT_FRAME_RATE_MAX DRV_RATE_22M +#define SITE_MGR_MGMT_FRAME_RATE_DEF DRV_RATE_2M + +#define SITE_MGR_MODULATION_TYPE_DEF DRV_MODULATION_CCK + +#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 + +#define SITE_MGR_ROAMING_STATS_RESET_TIMEOUT_MIN 5 /* in seconds */ +#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 FALSE +#define SITE_MGR_PERFORM_BUILD_IN_TEST_RECOVEY_MAX TRUE +#define SITE_MGR_PERFORM_BUILD_IN_TEST_RECOVEY_DEF FALSE + +#define SITE_MGR_WiFiAdHoc_MIN 0 +#define SITE_MGR_WiFiAdHoc_MAX 1 +#define SITE_MGR_WiFiAdHoc_DEF 0 + + + +#define SITE_MGR_BROADCAST_BACKGROUND_SCAN_MIN FALSE +#define SITE_MGR_BROADCAST_BACKGROUND_SCAN_MAX TRUE +#define SITE_MGR_BROADCAST_BACKGROUND_SCAN_DEF FALSE + +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_MIN FALSE +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_MAX TRUE +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_DEF FALSE + +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_INTERVAL_TIME_MIN 10000 /* in miliseconds */ +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_INTERVAL_TIME_MAX 3600000 +#define SITE_MGR_PERIODIC_BROADCAST_BACKGROUND_SCAN_INTERVAL_TIME_DEF 60000 + +#define SITE_MGR_KEEP_ALIVE_MIN FALSE +#define SITE_MGR_KEEP_ALIVE_MAX TRUE +#define SITE_MGR_KEEP_ALIVE_DEF TRUE + +#define SITE_MGR_RX_LEVEL_TABLE_SIZE_DEF 44 + +#define MAX_SITES_BG_BAND 32 +#define MAX_SITES_A_BAND 20 +#define MAX_HASH_ENTRIES 32 /* must a power of 2 and more or less the site table size */ + +#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 4 +#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 */ +/*---------------------------*/ + +#define CLSFR_TYPE_MIN 1 /* 1 - Dtag, 2 - Port, 3 - IP & port */ +#define CLSFR_TYPE_DEF 3 +#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 */ +#define CLASSIFIER_IPADDRESS_MIN 0x0 /* TBD according to spec!*/ +#define CLASSIFIER_IPADDRESS_DEF 0x0A030DC4 /* MY IP ... TBD according to spec!*/ +#define CLASSIFIER_IPADDRESS_MAX 0xFFFFFFFF /* TBD according to spec!*/ + +/* 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 0 + +/* def values of code points in the DSCP classification table*/ +#define DSCP_CLASSIFIER_CODE_POINT_DEF 0x0 + +/* def values of D-tags in the DSCP classification table*/ +#define DSCP_CLASSIFIER_DTAG_DEF 0 + +/* 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 (FALSE) +#define WME_ENABLED_MAX (TRUE) +#define WME_ENABLED_DEF (TRUE) + +#define QOS_TRAFFIC_ADM_CTRL_ENABLED_MIN (FALSE) +#define QOS_TRAFFIC_ADM_CTRL_ENABLED_MAX (TRUE) +#define QOS_TRAFFIC_ADM_CTRL_ENABLED_DEF (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 (FALSE) +#define QOS_TAG_ZERO_PRIO_MAX (TRUE) +#define QOS_TAG_ZERO_PRIO_DEF (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_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_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_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_TX_QUEUE_SIZE_MIN 1 +#define QOS_TX_QUEUE_SIZE_MAX 128 + +#define QOS_TX_QUEUE0_SIZE_MIN (QOS_TX_QUEUE_SIZE_MIN) +#define QOS_TX_QUEUE0_SIZE_MAX (QOS_TX_QUEUE_SIZE_MAX) +#define QOS_TX_QUEUE0_SIZE_DEF (32) + +#define QOS_TX_QUEUE1_SIZE_MIN (QOS_TX_QUEUE_SIZE_MIN) +#define QOS_TX_QUEUE1_SIZE_MAX (QOS_TX_QUEUE_SIZE_MAX) +#define QOS_TX_QUEUE1_SIZE_DEF (32) + +#define QOS_TX_QUEUE2_SIZE_MIN (QOS_TX_QUEUE_SIZE_MIN) +#define QOS_TX_QUEUE2_SIZE_MAX (QOS_TX_QUEUE_SIZE_MAX) +#define QOS_TX_QUEUE2_SIZE_DEF (32) + +#define QOS_TX_QUEUE3_SIZE_MIN (QOS_TX_QUEUE_SIZE_MIN) +#define QOS_TX_QUEUE3_SIZE_MAX (QOS_TX_QUEUE_SIZE_MAX) +#define QOS_TX_QUEUE3_SIZE_DEF (32) + +#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_PSPOLL) + +#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_PSPOLL) + +#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_PSPOLL) + +#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_LEGACY_PSPOLL) + + +/* + * new host interface method + * sum of High threshold TxBlocks > 100% of Tx blocks + */ +#define QOS_TX_BLKS_HIGH_PRCNT_MIN (0) +#define QOS_TX_BLKS_HIGH_PRCNT_MAX (100) + +#define QOS_TX_BLKS_HIGH_PRCNT_BK_DEF (25) +#define QOS_TX_BLKS_HIGH_PRCNT_BE_DEF (35) +#define QOS_TX_BLKS_HIGH_PRCNT_VI_DEF (35) +#define QOS_TX_BLKS_HIGH_PRCNT_VO_DEF (35) +/* + * sum of Low threshold TxBlocks < 100% of Tx blocks + */ +#define QOS_TX_BLKS_LOW_PRCNT_BK_DEF (15) +#define QOS_TX_BLKS_LOW_PRCNT_BE_DEF (25) +#define QOS_TX_BLKS_LOW_PRCNT_VI_DEF (25) +#define QOS_TX_BLKS_LOW_PRCNT_VO_DEF (25) + + + +#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 +#define QOS_MAX_SP_LEN_DEF 1 /* means maxSpLen = 2 (changed for SoftGemini requiremnet) */ + + +/*--------------------------- + 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 + +/*--------------------------- + Measurement parameters +-----------------------------*/ +#define MEASUREMENT_TRAFFIC_THRSHLD_MIN 1 /* Packets Per Second threshold */ +#define MEASUREMENT_TRAFFIC_THRSHLD_MAX 1000 +#define MEASUREMENT_TRAFFIC_THRSHLD_DEF 400 + +#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MIN 1 /* In ms */ +#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MAX 1000 +#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_DEF 300 + + +/*--------------------------- + EXC Manager parameters +-----------------------------*/ +#define EXC_MNGR_ENABLE_MIN EXC_MODE_DISABLED +#define EXC_MNGR_ENABLE_MAX EXC_MODE_STANDBY +#define EXC_MNGR_ENABLE_DEF EXC_MODE_ENABLED + +#define EXC_TEST_IGNORE_DEAUTH_0_DEF 1 +#define EXC_TEST_IGNORE_DEAUTH_0_MIN 0 +#define EXC_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 + + +#define SITE_MGR_POSTDISCONNECT_TIMEOUT_DEF 6000 /*6 sec*/ +#define SITE_MGR_POSTDISCONNECT_TIMEOUT_MIN 1000 +#define SITE_MGR_POSTDISCONNECT_TIMEOUT_MAX 10000 + +#define CONN_SELF_TIMEOUT_MIN 1 * 1000 /* 1 seconds */ +#define CONN_SELF_TIMEOUT_MAX 60 * 1000 /* 1 minute */ +#define CONN_SELF_TIMEOUT_DEF 10 * 1000 /* 10 seconds */ + +#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 FALSE +#define RX_DATA_FILTERS_ENABLED_MAX TRUE +#define RX_DATA_FILTERS_ENABLED_DEF 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 TX_DATA_NUMBER_OF_DATA_QUEUES_MIN 1 +#define TX_DATA_NUMBER_OF_DATA_QUEUES_MAX 10 +#define TX_DATA_NUMBER_OF_DATA_QUEUES_DEF 4 + +#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 TX_DATA_FRAC_OF_LIFE_TIME_TO_DROP_DEF 50 +#define TX_DATA_FRAC_OF_LIFE_TIME_TO_DROP_MIN 1 /* 0% means we drop everything... so make it 1 */ +#define TX_DATA_FRAC_OF_LIFE_TIME_TO_DROP_MAX 100 /* don't drop anything (unless time expired) */ + +#define TX_DATA_ADM_CTRL_DELAY_DUE_TO_MEDIUM_OVER_USAGE_DEF FALSE +#define TX_DATA_ADM_CTRL_DELAY_DUE_TO_MEDIUM_OVER_USAGE_MIN FALSE +#define TX_DATA_ADM_CTRL_DELAY_DUE_TO_MEDIUM_OVER_USAGE_MAX TRUE + +#define TX_DATA_ADM_CTRL_DOWN_GRADE_DEF TRUE +#define TX_DATA_ADM_CTRL_DOWN_GRADE_MIN FALSE +#define TX_DATA_ADM_CTRL_DOWN_GRADE_MAX TRUE + +#define TRAFFIC_ADM_CONTROL_TIMEOUT_MIN (10) +#define TRAFFIC_ADM_CONTROL_TIMEOUT_MAX (10000) +#define TRAFFIC_ADM_CONTROL_TIMEOUT_DEF (5000) + +#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MIN 1 /* Traffic intensity threshold - Measured in packets */ +#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MAX 1000 +#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_DEF 100 + +#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MIN 1 /* Traffic intensity threshold - Measured in packets */ +#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MAX 1000 +#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_DEF 25 + +#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MIN 50 /* Traffic intensity threshold - Traffic test interval - measured in ms */ +#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MAX 10000 +#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_DEF 1000 + +#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MIN FALSE +#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MAX TRUE +#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_DEF 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_CONTROL_ENABLE_MIN FALSE +#define CTRL_DATA_RATE_CONTROL_ENABLE_MAX TRUE +#define CTRL_DATA_RATE_CONTROL_ENABLE_DEF FALSE + +#define CTRL_DATA_FOUR_X_ENABLE_MIN FALSE +#define CTRL_DATA_FOUR_X_ENABLE_MAX TRUE +#define CTRL_DATA_FOUR_X_ENABLE_DEF FALSE + +#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 4 + +#define CTRL_DATA_RATE_POLICY_USER_RETRIES_PER_RATE_CCK_DEF "1,1,1,1,1,1,1,1,1,1,1,1,1" +#define CTRL_DATA_RATE_POLICY_USER_RETRIES_PER_RATE_PBCC_DEF "1,1,1,1,1,1,1,1,1,1,1,1,1" +#define CTRL_DATA_RATE_POLICY_USER_RETRIES_PER_RATE_OFDM_DEF "0,0,0,1,0,0,0,1,0,0,1,1,1" +#define CTRL_DATA_RATE_POLICY_USER_RETRIES_PER_RATE_OFDMA_DEF "0,0,0,1,0,0,1,0,0,1,0,0,0" + +#define CTRL_DATA_RATE_POLICY_SG_SHORT_RETRY_LIMIT_MIN 1 +#define CTRL_DATA_RATE_POLICY_SG_SHORT_RETRY_LIMIT_MAX 255 +#define CTRL_DATA_RATE_POLICY_SG_SHORT_RETRY_LIMIT_DEF 10 + +#define CTRL_DATA_RATE_POLICY_SG_LONG_RETRY_LIMIT_MIN 1 +#define CTRL_DATA_RATE_POLICY_SG_LONG_RETRY_LIMIT_MAX 255 +#define CTRL_DATA_RATE_POLICY_SG_LONG_RETRY_LIMIT_DEF 4 + +#define CTRL_DATA_RATE_POLICY_SG_RETRIES_PER_RATE_CCK_DEF "1,1,1,1,1,1,1,5,1,1,1,1,1" +#define CTRL_DATA_RATE_POLICY_SG_RETRIES_PER_RATE_PBCC_DEF "1,1,1,1,1,1,1,5,1,1,1,1,1" +#define CTRL_DATA_RATE_POLICY_SG_RETRIES_PER_RATE_OFDM_DEF "1,1,1,1,1,1,1,5,1,1,1,1,1" +#define CTRL_DATA_RATE_POLICY_SG_RETRIES_PER_RATE_OFDMA_DEF "1,1,1,1,1,1,1,5,1,1,1,1,1" + +#define CTRL_DATA_RATE_POLICY_RETRIES_PER_RATE_MAX_LEN 100 + +#define REPORT_SEVERITY_VALUE_MIN 0 +#define REPORT_SEVERITY_VALUE_MAX 0xFF +#define REPORT_SEVERITY_VALUE_DEF 0xB8 /* WLAN_SEVERITY_WARNING | WLAN_SEVERITY_ERROR | WLAN_SEVERITY_FATAL_ERROR | WLAN_SEVERITY_CONSOLE */ + +#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 + +#define RSN_PMKSA_LIFETIME_MIN 1 /* 1 sec */ +#define RSN_PMKSA_LIFETIME_MAX 4233600 /* 49 days in sec */ +#define RSN_PMKSA_LIFETIME_DEF 86400 /* 1 day in sec */ + +#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 + +#define RSN_PREAUTH_TIMEOUT_MIN 500 +#define RSN_PREAUTH_TIMEOUT_MAX 60000 +#define RSN_PREAUTH_TIMEOUT_DEF 2000 /* In mSec units */ + + +#define RSN_PMKIDCANDLIST_DELAY_MIN 3000 +#define RSN_PMKIDCANDLIST_DELAY_MAX 9000 +#define RSN_PMKIDCANDLIST_DELAY_DEF 4000 + + +/* 4X VALUES */ +#define DESIRED_CONCATENATION_ENABLE_DEF TRUE +#define DESIRED_CWMIN_ENABLE_DEF TRUE +#define DESIRED_CWCOMBO_ENABLE_DEF FALSE +#define DESIRED_ACKEMULATION_ENABLE_DEF FALSE +#define DESIRED_ERP_PROTECTION_ENABLE_DEF FALSE +#define MAX_CONCAT_SIZE_DEF 4032 +#define IBSS_FOUR_X_MODE_PAYLOAD_SIZE 4032 +#define INFRASTRUCTURE_FOUR_X_MODE_PAYLOAD_SIZE 1300 +#define NOT_FOUR_X_MODE_PAYLOAD_SIZE 1500 + +/* SME Values */ + +#define ENABLE_SME_SCAN_DEF 1 +#define ENABLE_SME_SCAN_MIN 0 +#define ENABLE_SME_SCAN_MAX 1 + +#define SME_INTER_SCAN_MIN_DEF 10000 /* 10 seconds */ +#define SME_INTER_SCAN_MIN_MIN 1000 +#define SME_INTER_SCAN_MIN_MAX 3600000 + +#define SME_INTER_SCAN_MAX_DEF 60000 /* 60 seconds */ +#define SME_INTER_SCAN_MAX_MIN 1000 +#define SME_INTER_SCAN_MAX_MAX 3600000 + +#define SME_INTER_SCAN_DELTA_DEF 1000 /* 1sec*/ +#define SME_INTER_SCAN_DELTA_MIN 100 +#define SME_INTER_SCAN_DELTA_MAX 10000 + + +/* B\G First Scan Params */ +/* ---------------------- */ +#define SME_SCAN_BG_LIST_BAND_STRING_MAX_SIZE 100 +#define SME_SCAN_BG_LIST_BAND_VAL_DEF "1,2,3,4,5,6,7,8,9,10,11,12,13,14" /* All chaneels */ + +#define SME_SCAN_BG_MIN_DWELL_TIME_DEF 30000 +#define SME_SCAN_BG_MIN_DWELL_TIME_MIN 100 +#define SME_SCAN_BG_MIN_DWELL_TIME_MAX 1000000 + +#define SME_SCAN_BG_MAX_DWELL_TIME_DEF 60000 +#define SME_SCAN_BG_MAX_DWELL_TIME_MIN 100 +#define SME_SCAN_BG_MAX_DWELL_TIME_MAX 1000000 + +#define SME_SCAN_BG_NUM_PROB_REQ_DEF 3 +#define SME_SCAN_BG_NUM_PROB_REQ_MIN 1 +#define SME_SCAN_BG_NUM_PROB_REQ_MAX 5 + +#define SME_SCAN_BG_PROB_REQ_RATE_DEF 0x2 /* Represented as bitmask */ +#define SME_SCAN_BG_PROB_REQ_RATE_MIN 0x1 /* 1M=0x1, 2M=0x2, 5.5M=0x4, 11M=0x8, */ +#define SME_SCAN_BG_NUM_PROB_REQ_RATE_MAX 0x1000 /* 22M=0x10, 6M=0x20, 9M=0x40, 12M=0x80, */ + /* 18M=0x100, 24M=0x200, 36M=0x400, */ + /* 48M=0x800, 54M=0x1000 */ + +#define SME_SCAN_BG_TX_POWER_DEF MAX_TX_POWER /* Dbm/10 Units */ +#define SME_SCAN_BG_TX_POWER_MIN MIN_TX_POWER +#define SME_SCAN_BG_TX_POWER_MAX MAX_TX_POWER + + +/* A First Scan Params */ +/* ---------------------- */ +#define SME_SCAN_A_LIST_BAND_STRING_MAX_SIZE 100 +#define SME_SCAN_A_LIST_BAND_VAL_DEF "36,40,44,48,52,56,60,64" /* All chaneels */ + +#define SME_SCAN_A_MIN_DWELL_TIME_DEF 30000 +#define SME_SCAN_A_MIN_DWELL_TIME_MIN 100 +#define SME_SCAN_A_MIN_DWELL_TIME_MAX 1000000 + +#define SME_SCAN_A_MAX_DWELL_TIME_DEF 60000 +#define SME_SCAN_A_MAX_DWELL_TIME_MIN 100 +#define SME_SCAN_A_MAX_DWELL_TIME_MAX 1000000 + +#define SME_SCAN_A_NUM_PROB_REQ_DEF 3 +#define SME_SCAN_A_NUM_PROB_REQ_MIN 1 +#define SME_SCAN_A_NUM_PROB_REQ_MAX 5 + +#define SME_SCAN_A_PROB_REQ_RATE_DEF 0x20 /* Represented as bitmask */ +#define SME_SCAN_A_PROB_REQ_RATE_MIN 0x20 /* 1M=0x1, 2M=0x2, 5.5M=0x4, 11M=0x8, */ +#define SME_SCAN_A_NUM_PROB_REQ_RATE_MAX 0x1000 /* 22M=0x10, 6M=0x20, 9M=0x40, 12M=0x80, */ + /* 18M=0x100, 24M=0x200, 36M=0x400, */ + /* 48M=0x800, 54M=0x1000 */ +#define SME_SCAN_A_TX_POWER_DEF MAX_TX_POWER /* Dbm/10 */ +#define SME_SCAN_A_TX_POWER_MIN MIN_TX_POWER +#define SME_SCAN_A_TX_POWER_MAX MAX_TX_POWER + +/* 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 BEACON_FILTER_STRING_MAX_LEN 300 + +#define HAL_CTRL_EEPROMLESS_ENABLE_DEF 1 +#define HAL_CTRL_EEPROMLESS_ENABLE_MIN 0 +#define HAL_CTRL_EEPROMLESS_ENABLE_MAX 1 + +/* Scanning Channel Values */ +#define MAX_CHAN_BITMAP_BYTES (26) + +#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 */ +#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MIN (1000) /* 1 sec */ +#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MAX (1000000000) /* 11 days */ +#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_DEF (60000) /* 60 Sec */ + +/* d/h Enabling */ + +#define MULTI_REGULATORY_DOMAIN_ENABLED_MIN (FALSE) /* 802.11d */ +#define MULTI_REGULATORY_DOMAIN_ENABLED_MAX (TRUE) +#define MULTI_REGULATORY_DOMAIN_ENABLED_DEF (FALSE) + +#define SPECTRUM_MANAGEMENT_ENABLED_MIN (FALSE) /* 802.11h */ +#define SPECTRUM_MANAGEMENT_ENABLED_MAX (TRUE) +#define SPECTRUM_MANAGEMENT_ENABLED_DEF (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 - default dwell time values for driver passive scan */ +#define SCAN_CNCN_DRIVER_DEFAULT_DWELL_TIME_DEF 200000 +#define SCAN_CNCN_DRIVER_DEFAULT_DWELL_TIME_MIN 10000 +#define SCAN_CNCN_DRIVER_DEFAULT_DWELL_TIME_MAX 500000 + +#define SCAN_CNCN_MIN_DURATION_FOR_OID_SCANS_DEF 30 +#define SCAN_CNCN_MIN_DURATION_FOR_OID_SCANS_MIN 0 +#define SCAN_CNCN_MIN_DURATION_FOR_OID_SCANS_MAX 1000000 + +/* 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_ENABLE) +#define SOFT_GEMINI_ENABLED_MAX (SG_SENSE_NO_ACTIVITY) /* same as Auto*/ +#define SOFT_GEMINI_ENABLED_DEF (SG_DISABLE) /* we don't use SG_SENSE_ACTIVE*/ + +#define SOFT_GEMINI_PARAMS_BT_HP_MAXTIME_MIN (100) +#define SOFT_GEMINI_PARAMS_BT_HP_MAXTIME_MAX (15000) +#define SOFT_GEMINI_PARAMS_BT_HP_MAXTIME_DEF (2000) + +#define SOFT_GEMINI_PARAMS_WLAN_HP_MAX_TIME_MIN (100) +#define SOFT_GEMINI_PARAMS_WLAN_HP_MAX_TIME_MAX (15000) +#define SOFT_GEMINI_PARAMS_WLAN_HP_MAX_TIME_DEF (5000) + +#define SOFT_GEMINI_PARAMS_SENSE_DISABLE_TIMER_MIN (100) +#define SOFT_GEMINI_PARAMS_SENSE_DISABLE_TIMER_MAX (15000) +#define SOFT_GEMINI_PARAMS_SENSE_DISABLE_TIMER_DEF (1350) + +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_MIN (10) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_MAX (2300) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_DEF (1500) + +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_MIN (10) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_MAX (2300) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_DEF (1500) + +#define SOFT_GEMINI_PARAMS_TIMEOUT_NEXT_BT_LP_PACKET_MIN (400) +#define SOFT_GEMINI_PARAMS_TIMEOUT_NEXT_BT_LP_PACKET_MAX (10000) +#define SOFT_GEMINI_PARAMS_TIMEOUT_NEXT_BT_LP_PACKET_DEF (3000) + +#define SOFT_GEMINI_PARAMS_SG_ANTENNA_TYPE_MIN (0) +#define SOFT_GEMINI_PARAMS_SG_ANTENNA_TYPE_MAX (7) +#define SOFT_GEMINI_PARAMS_SG_ANTENNA_TYPE_DEF (0) + +#define SOFT_GEMINI_PARAMS_SIGNALING_TYPE_MIN (0) +#define SOFT_GEMINI_PARAMS_SIGNALING_TYPE_MAX (3) +#define SOFT_GEMINI_PARAMS_SIGNALING_TYPE_DEF (1) + +#define SOFT_GEMINI_PARAMS_AFH_LEVERAGE_ON_MIN (0) +#define SOFT_GEMINI_PARAMS_AFH_LEVERAGE_ON_MAX (2) +#define SOFT_GEMINI_PARAMS_AFH_LEVERAGE_ON_DEF (0) + +#define SOFT_GEMINI_PARAMS_NUMBER_QUIET_CYCLE_MIN (0) +#define SOFT_GEMINI_PARAMS_NUMBER_QUIET_CYCLE_MAX (10) +#define SOFT_GEMINI_PARAMS_NUMBER_QUIET_CYCLE_DEF (0) + +#define SOFT_GEMINI_PARAMS_MAX_NUM_CTS_MIN (0) +#define SOFT_GEMINI_PARAMS_MAX_NUM_CTS_MAX (10) +#define SOFT_GEMINI_PARAMS_MAX_NUM_CTS_DEF (3) + +#define SOFT_GEMINI_PARAMS_NUMBER_OF_WLAN_PACKETS_MIN (1) +#define SOFT_GEMINI_PARAMS_NUMBER_OF_WLAN_PACKETS_MAX (10) +#define SOFT_GEMINI_PARAMS_NUMBER_OF_WLAN_PACKETS_DEF (2) + +#define SOFT_GEMINI_PARAMS_NUMBER_OF_BT_PACKETS_MIN (2) +#define SOFT_GEMINI_PARAMS_NUMBER_OF_BT_PACKETS_MAX (10) +#define SOFT_GEMINI_PARAMS_NUMBER_OF_BT_PACKETS_DEF (2) + +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_FAST_MIN (10) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_FAST_MAX (20000) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_RX_TIME_FAST_DEF (1500) + +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_FAST_MIN (10) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_FAST_MAX (20000) +#define SOFT_GEMINI_PARAMS_PROTECTIVE_TX_TIME_FAST_DEF (3000) + +#define SOFT_GEMINI_PARAMS_CYCLE_TIME_FAST_MIN (2000) +#define SOFT_GEMINI_PARAMS_CYCLE_TIME_FAST_MAX (65535) +#define SOFT_GEMINI_PARAMS_CYCLE_TIME_FAST_DEF (8700) + +#define SOFT_GEMINI_PARAMS_RX_FOR_AVALANCHE_MIN (1) +#define SOFT_GEMINI_PARAMS_RX_FOR_AVALANCHE_MAX (255) +#define SOFT_GEMINI_PARAMS_RX_FOR_AVALANCHE_DEF (5) + +#define SOFT_GEMINI_PARAMS_ELP_HP_MIN (0) +#define SOFT_GEMINI_PARAMS_ELP_HP_MAX (1) +#define SOFT_GEMINI_PARAMS_ELP_HP_DEF (0) + +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_PERIOD_MIN (0) +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_PERIOD_MAX (15000) +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_PERIOD_DEF (500) + +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_NUM_CYCLE_MIN (0) +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_NUM_CYCLE_MAX (15) +#define SOFT_GEMINI_PARAMS_ANTI_STARVE_NUM_CYCLE_DEF (4) + +#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_TIME_MIN (0) +#define SOFT_GEMINI_PARAMS_HPDM_MAX_TIME_MAX (50000) +#define SOFT_GEMINI_PARAMS_HPDM_MAX_TIME_DEF (1600) + +#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) + + +#define SOFT_GEMINI_PARAMS_ACK_MODE_MIN (0) +#define SOFT_GEMINI_PARAMS_ACK_MODE_MAX (1) +#define SOFT_GEMINI_PARAMS_ACK_MODE_DEF (1) + +#define SOFT_GEMINI_SCAN_NUMBER_OF_PROBE_REQUEST_MIN (0) +#define SOFT_GEMINI_SCAN_NUMBER_OF_PROBE_REQUEST_MAX (255) +#define SOFT_GEMINI_SCAN_NUMBER_OF_PROBE_REQUEST_DEF (8) + +#define SOFT_GEMINI_SCAN_COMPENSATION_PERCENT_MIN (0) +#define SOFT_GEMINI_SCAN_COMPENSATION_PERCENT_MAX (1000) +#define SOFT_GEMINI_SCAN_COMPENSATION_PERCENT_DEF (50) + +#define SOFT_GEMINI_SCAN_COMPENSATION_MAX_TIME_MIN (1) +#define SOFT_GEMINI_SCAN_COMPENSATION_MAX_TIME_MAX (1000000) +#define SOFT_GEMINI_SCAN_COMPENSATION_MAX_TIME_DEF (120000) + +#define SOFT_GEMINI_BSS_LOSS_COMPENSATION_PERCENT_MIN (0) +#define SOFT_GEMINI_BSS_LOSS_COMPENSATION_PERCENT_MAX (1000) +#define SOFT_GEMINI_BSS_LOSS_COMPENSATION_PERCENT_DEF (100) + +#define WIFI_WMM_PS_MIN (0) +#define WIFI_WMM_PS_MAX (1) +#define WIFI_WMM_PS_DEF (0) + + +/* TX FLAGS */ +/*--------------*/ +#define TX_DATA_MGMT_MSDU 0x0001 +#define TX_DATA_DATA_MSDU 0x0002 +#define TX_DATA_EAPOL_MSDU 0x0004 +#define TX_DATA_NULL_MSDU 0x0008 /* used for sending null frame before and after measuring a non serving channel */ +#define TX_DATA_MULTICAST_FRAME 0x0010 +#define TX_DATA_FROM_OS 0x0020 +#define TX_DATA_IAPP_MSDU 0x0040 +#define TX_DATA_PS_POLL 0x0080 +#define TX_DATA_ENCRYPT_MSDU 0x0100 + + +/* TX FLAGS for tx complete 2 - used for requesting txComplete*/ +/*--------------*/ +#define TX_DATA_USE_TX_COMPLETE 0x01 /* need only for TxComplete indication */ +#define TX_DATA_DISCONNECT_TEST 0x02 +#define TX_DATA_VO_SYNC_TRIG 0x04 +#define TX_DATA_DISASSOC_SYNC_TRIG 0x08 +#define TX_DATA_DEAUTH_SYNC_TRIG 0x10 + + + +/* Structures definitions */ +PACKED_STRUCT( rates_t, + + UINT8 len; + UINT8 ratesString[MAX_SUPPORTED_RATES]; +); + +/* 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 + + +/***************************************************************************** + ** 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_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 = 5, + + 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_LONG_DOZE, + + DEFAULT_POWER_LEVEL_MIN_VALUE = POWERAUTHO_POLICY_ELP, + DEFAULT_POWER_LEVEL_MAX_VALUE = POWERAUTHO_POLICY_AWAKE, + DEFAULT_POWER_LEVEL_DEF_VALUE = POWERAUTHO_POLICY_ELP, + + PS_POWER_LEVEL_MIN_VALUE = POWERAUTHO_POLICY_ELP, + PS_POWER_LEVEL_MAX_VALUE = POWERAUTHO_POLICY_AWAKE, + PS_POWER_LEVEL_DEF_VALUE = POWERAUTHO_POLICY_ELP, + + 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<length ) +#define memMgr_BufOffset(BufAddr) ( ((mem_BD_T *)BufAddr)->dataOffset ) +#define memMgr_BufData(BufAddr) ( ((mem_BD_T *)BufAddr)->data ) +#define memMgr_BufNext(BufAddr) ( ((mem_BD_T *)BufAddr)->nextBDPtr ) + +#define memMgr_MsduHdrLen(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->headerLen ) +#define memMgr_MsduFirstLen(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->firstBDPtr->length ) +#define memMgr_MsduHandle(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->handle ) +/* + * Header resides after the Descriptor + */ +#define memMgr_MsduHdrAddr(MsduAddr) ( memMgr_BufData(((mem_MSDU_T *)MsduAddr)->firstBDPtr) + \ + memMgr_BufOffset(((mem_MSDU_T *)MsduAddr)->firstBDPtr) + sizeof(DbTescriptor)) + +#define memMgr_MsduNextAddr(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->firstBDPtr->nextBDPtr ) +#define memMgr_MsduDataAddr(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->firstBDPtr ) +#define memMgr_MsduDataSize(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->dataLen ) +#define memMgr_MsduNextGet(MsduAddr) ( ((mem_MSDU_T *)MsduAddr)->nextMSDUinList) +#define memMgr_MsduFreeFuncGet(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeFunc) +#define memMgr_MsduFreeArg0Get(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeArgs[0]) +#define memMgr_MsduFreeArg1Get(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeArgs[1]) +#define memMgr_MsduFreeArg2Get(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeArgs[2]) +#define memMgr_MsduFreeArg3Get(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeArgs[3]) +#define memMgr_MsduFreeArg4Get(MsduAddr)( ((mem_MSDU_T *)MsduAddr)->freeArgs[4]) + +typedef enum +{ + /* + * Allocate on Tx + */ + MLME_MODULE = 0, + OS_ABS_TX_MODULE, + RSN_MODULE, + HAL_TX_MODULE, + CONCAT_MODULE, + DE_CONCAT_MODULE, + ACK_EMUL_MODULE, + TX_MODULE, + MEASUREMENT_MODULE, + SITE_MGR_MODULE, + EXC_MANAGER_MODULE, + TRACE_BUFFER_MODULE, + ADM_CTRL_QOS_MODULE, + CURRENT_BSS_MODULE, + /* + * Allocate on Rx + */ + HAL_RX_MODULE, + CORE_RX_MODULE, + MLME_RX_MODULE, + OS_ABS_RX_MODULE, + RSN_RX_MODULE, + MEASUREMENT_RX_MODULE, + SITE_MGR_RX_MODULE, + EXC_MANAGER_RX_MODULE, + + HAL_WEP1_RX, + HAL_WEP2_RX, + HAL_DEFRAG_RX, + HAL_DUPLICA_RX, + + /* + DO NOT TOUCH - MODULE_FREE_MSDU, MAX_NUMBER_OF_MODULE! + */ + MODULE_FREE_MSDU, + MAX_NUMBER_OF_MODULE + +}allocatingModule_e; + + +typedef void (*ap_FreeMemFunc)(TI_HANDLE, TI_HANDLE, TI_STATUS); + +#ifdef TNETW_MASTER_MODE +typedef void (*bd_FreeMemFunc)( UINT32 , UINT32, UINT32, UINT32, UINT32 ); +#endif + +typedef struct mem_DataBuf_T mem_DataBuf_T; +struct mem_DataBuf_T { + /* READ ONLY */ + /* The user MUST not change the following fields */ + UINT32 handle; /* Hanlde of this Data Buffer Structure */ + mem_DataBuf_T* nextDataBuf; /* pointer to the next free DataBuf + when this DataBuf is in Free mode */ + UINT32 refCount; /* number of instances of this Data Buf */ + /* PUBLIC - For the use of the User */ + UINT32 poolIndex; /* the buffer pool index */ + UINT8 *data; /* pointer to the Data */ +#if defined TNETW_MASTER_MODE + OS_PHYSICAL_ADDRESS data_physical; /* Physical address of the data */ +#endif +}; + +typedef struct mem_BD_T mem_BD_T; +struct mem_BD_T { + /* READ ONLY */ + /* The user MUST not change the following fields */ + UINT32 handle; /* Hanlde of this BD Data Structure */ + UINT32 refCount; /* number of instances of this BD */ + mem_DataBuf_T* dataBuf; /* pointer to the Data Buffer */ + /* PUBLIC - For the use of the User */ + char* data; /* Pointer to the Data */ + UINT32 dataOffset; /* offset of the data */ + UINT32 length; /* Tx : the length of the entire data (including TxDescriptor,TNETWIF_WRITE_OFFSET_BYTES etc..) */ + /* Rx : the length of the data (excluding TNETWIF_READ_OFFSET_BYTES) */ + mem_BD_T* nextBDPtr; /* pointer to the next BD */ + +#if defined TNETW_MASTER_MODE + UINT32 data_physical_low; /* Physical address (low) of the data */ + bd_FreeMemFunc freeFunc; /* pointer to the Data Buffer free function */ + UINT32 freeArgs[NUM_OF_FREE_ARGS]; /* arguments to be send with the free function */ +#endif + +}; + +typedef struct mem_MSDU_T mem_MSDU_T; +struct mem_MSDU_T { + /* READ ONLY */ + /* The user MUST not change the following fields */ + UINT32 handle; /* handle of this MSDU data structure */ + mem_MSDU_T* nextFreeMSDU; /* pointer to the next Free MSDU when + this MSDU Buffer is in Free mode */ + /* PUBLIC - For the use of the User */ + UINT32 headerLen; /* the length of the 802.11 header */ + mem_BD_T* firstBDPtr; /* pointer to the first BD */ + mem_BD_T* lastBDPtr; /* pointer to the last BD */ + ap_FreeMemFunc freeFunc; /* pointer to the Data Buffer free function */ + UINT32 freeArgs[NUM_OF_FREE_ARGS]; /* arguments to be send with the free function */ + UINT32 dataLen; /* length of the data (only data) of the firstBDPtr */ + allocatingModule_e module; /* the allocating module */ + + /* support Msdu List */ + mem_MSDU_T* nextMSDUinList; /* pointer to the next MSDU in Tx queue link list. */ + mem_MSDU_T* prevMSDUinList; /* pointer to the previos MSDU in Tx queue link list. */ + + + UINT32 txFlags; /* Tx flags */ + UINT8 txCompleteFlags; /* Tx complete flags */ + UINT32 insertionTime; /* time of msdu insersion to driver. */ + UINT8 qosTag; /* 802.11d qos tag */ + #ifdef TI_DBG + UINT32 timeStamp [MAX_NUM_OF_TIME_STAMPS]; + /* array of time stamps */ + UINT32 timeStampNum; /* number of time stamps */ + #endif +}; + +typedef struct +{ + UINT32 buffersSize; /* the size of the buffers in the pool */ + UINT32 numFreeDataBuf; /* number of free data buffers */ + UINT32 dataBufMaxNumber; /* maximum number of buffers */ + mem_DataBuf_T* firstFreeDataBuf; /* pointer to the first free Data Buffer */ + mem_DataBuf_T* dataBufPool; /* list of Data Buffers */ +#ifdef TNETW_MASTER_MODE + OS_PHYSICAL_ADDRESS physicalDataBufPoolPtr; +#endif + UINT8* dataBufPoolPtr; + +}buffersPool_t; + +/* structures for initialization of Memory manager */ +typedef struct +{ + UINT32 numOfbuffers; + UINT32 buffersSize; +}bufPoolInit_t; + +typedef struct +{ + UINT8 numOfPools; + bufPoolInit_t bufPoolInit[MAX_NUMBER_OF_BUF_POOLS]; +}memMngrInit_t; + +/* MemMngr Control Block */ +typedef struct +{ + TI_HANDLE hReport; /* report handle */ + TI_HANDLE hOs; /* Os handle */ + TI_HANDLE hCriticalSectionProtect; + + UINT32 currentNumberOfPools; + + UINT32 msduMaxNumber; /* maximum number of MSDUs */ + UINT32 bdMaxNumber; /* maximum number of BD;s */ + + mem_MSDU_T* msduPool; /* list of MSDU Buffer Desciptors */ + mem_BD_T* bdPool; /* list of BD Buffer Descriptors */ + + mem_MSDU_T* firstFreeMSDU; /* pointer to the first free MSDU */ + mem_BD_T* firstFreeBD; /* pointer to the first free BD */ + + UINT32 numFreeMSDU; /* number of free MSDU's */ + UINT32 numFreeBD; /* number of free BD's */ + + UINT32 moduleAllocCount[MAX_NUMBER_OF_MODULE]; /* counters of allocated */ + /* msdu per module */ + + buffersPool_t buffersPool[MAX_NUMBER_OF_BUF_POOLS]; /* Pools of Data Buffers */ + +}memMngr_t; + +typedef struct +{ + UINT32 numOfFreeBufPool1; + UINT32 numOfFreeBufPool2; + UINT32 numOfFreeBufPool3; + UINT32 numOfFreeBDs; + UINT32 numOfFreeMsdu; +}memMgrResources_t; + +/************************************************************************* + * wlan_memMngrInit * + ************************************************************************* +DESCRIPTION: Init of the Memory Manager module + +INPUT: +OUTPUT: +RETURN: OK/NOK +**************************************************************************/ +TI_HANDLE wlan_memMngrInit(TI_HANDLE hOs); + +/************************************************************************* + * wlan_memMngrDestroy * + ************************************************************************* +DESCRIPTION: + + + +INPUT: +OUTPUT: + +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrDestroy(TI_HANDLE hMemMngr); + +/************************************************************************* + * wlan_memMngrConfigure * + ************************************************************************* +DESCRIPTION: + + + +INPUT: +OUTPUT: + +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrConfigure(TI_HANDLE hMemMngr, TI_HANDLE hOs, TI_HANDLE hReport); + +/************************************************************************* + * wlan_memMngrAllocDataBuf * + ************************************************************************* +DESCRIPTION:This function allocates BDs and Data Buffers according to the + required length. The memory manager will allocate the Data + Buffers, update the buffer pointer in the BD structure and link + the BDs when more than one Data Buffer is required. + +INPUT: len - the length of the required data buffer +OUTPUT: BDPtr - a pointer in which this function will return a pointer + to the allocated BD +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrAllocDataBuf(TI_HANDLE hMemMngr, mem_BD_T** bdPtr, UINT32 len); + +/************************************************************************* + * wlan_memMngrAllocBDs * + ************************************************************************* +DESCRIPTION:This function allocates and returns a pointer to an array of BDs. + This function does not allocate any memory buffers. + +INPUT: BDsNumber - number of required BDs +OUTPUT: BDsPtr - a pointer in which this function will return a pointer + to an array of BD pointers +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrAllocBDs(TI_HANDLE hMemMngr, UINT32 bdNumber, mem_BD_T** bdPtr); + +/************************************************************************* + * wlan_memMngrAllocMSDU * + ************************************************************************* +DESCRIPTION:This function allocates MPDU structure. + +INPUT: len - the length of the required data buffer + if len=0, than only MSDU buffer will be allocated +OUTPUT: MSDUPtr - a pointer in which this function will return a pointer + to the MSDU structure +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrAllocMSDU (TI_HANDLE hMemMngr, mem_MSDU_T** MSDUPtr, + UINT32 len, allocatingModule_e module); + +/************************************************************************* + * wlan_memMngrAllocMSDUBufferOnly * + ************************************************************************* +DESCRIPTION:This function allocates MPDU structure - without Data Buffers + +INPUT: +OUTPUT: MSDUPtr - a pointer in which this function will return a pointer + to the MSDU structure +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrAllocMSDUBufferOnly(TI_HANDLE hMemMngr, mem_MSDU_T** MSDUPtr, + allocatingModule_e module); + +/************************************************************************* + * wlan_memMngrDuplicateMSDU * + ************************************************************************* +DESCRIPTION:This function duplicates the MSDU. + +INPUT: handle - handle of the MSDU the user want to duplicate +OUTPUT: newHandle - pointer in which this function sets the handle of + the duplicated MSDU. +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrDuplicateMSDU(TI_HANDLE hMemMngr, UINT32 handle, UINT32* newHandle); + +/************************************************************************* + * wlan_memMngrFreeMSDU * + ************************************************************************* +DESCRIPTION:Free MSDU structure. This function will free all BDs and Data + Buffers that are bind to this MSDU. + +INPUT: handle - handle of this MSDU +OUTPUT: +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrFreeMSDU(TI_HANDLE hMemMngr, UINT32 handle); + +/************************************************************************* + * * + ************************************************************************* +DESCRIPTION: +INPUT: +OUTPUT: +RETURN: OK/NOK +**************************************************************************/ +TI_STATUS wlan_memMngrFreeListOfMSDU(TI_HANDLE hMemMngr, UINT32 handle); + + +/************************************************************************* + * wlan_memMngrFreeBD * + ************************************************************************* +DESCRIPTION:Free BD structure. This function will free a list of BD + structures and the Data Buffer that is being pointed by these BD + if any. (e.g. - free MPDU) + +INPUT: handle - handle of this BD +OUTPUT: +RETURN: freeFlag - return TRUE if this BD list was freed + return FALSE if this BD list was not freed (refCount>0) +**************************************************************************/ +UINT32 wlan_memMngrFreeBD(TI_HANDLE hMemMngr, UINT32 handle); + +/************************************************************************* + * * + ************************************************************************* +DESCRIPTION: + +INPUT: +OUTPUT: +RETURN: +**************************************************************************/ +TI_STATUS wlan_memMngrFreeAllOsAlocatesBuffer(TI_HANDLE hMemMngr); + +/************************************************************************* + * * + ************************************************************************* +DESCRIPTION: + +INPUT: +OUTPUT: +RETURN: +**************************************************************************/ +TI_STATUS wlan_memMngrCopyMsduFreeFunc(TI_HANDLE hMemMngr, UINT32 destMsduHandle, UINT32 sourceMsduHandle); + +/************************************************************************* + * * + ************************************************************************* +DESCRIPTION: + +INPUT: +OUTPUT: +RETURN: +**************************************************************************/ +TI_STATUS wlan_memMngrGetMemMgrResources(TI_HANDLE hMemMngr, memMgrResources_t* memMgrResources); + +/************************************************************************* + * * + ************************************************************************* +DESCRIPTION: + +INPUT: +OUTPUT: +RETURN: +**************************************************************************/ +TI_STATUS wlan_memMngrChangeMsduOwner(TI_HANDLE hMemMngr,allocatingModule_e newModule,mem_MSDU_T *pMsdu); + + +TI_STATUS wlan_memMngrSwapMsdu(TI_HANDLE hMemMngr, mem_MSDU_T *pMsdu_1, mem_MSDU_T *pMsdu_2); + + +TI_STATUS wlan_memMngrAddTimeStamp (TI_HANDLE hMemMngr, mem_MSDU_T *pMsdu); + +/************************************************************************* + * TEST_FUNCTIONS * + *************************************************************************/ +void memMngrPrintHandle(TI_HANDLE hMemMngr, UINT32 handle); +void memMngrFullPrint(TI_HANDLE hMemMngr); +void memMngrPrint(TI_HANDLE hMemMngr); + +/*test function*/ +TI_STATUS txDataSTUB_txSendMsdu(TI_HANDLE hMemMngr, mem_MSDU_T *pMsdu); +void print_MsduDataHeader(TI_HANDLE hMemMngr, mem_MSDU_T *pMsdu); +void memMngrPrintMSDUWithItsBds(mem_MSDU_T* pMsdu ); + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/mlmeApi.h b/sta_dk/pform/linux/src/wlan_driver_inc/mlmeApi.h new file mode 100644 index 0000000..c15079b --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/mlmeApi.h @@ -0,0 +1,253 @@ +/** \file mlmeApi.h + * \brief MLME API + * + * \see mlmeSm.c + */ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: mlmeApi.h */ +/* PURPOSE: MLME API */ +/* */ +/***************************************************************************/ +#ifndef __MLME_API_H__ +#define __MLME_API_H__ + +#include "osTIType.h" + +#include "paramOut.h" + +#include "802_11Defs.h" +#include "memMngrEx.h" + +#include "whalBus_Defs.h" + +/* Constants */ + +/* Enumerations */ + +typedef enum +{ + MSG_BROADCAST, + MSG_MULTICAST, + MSG_UNICAST +} mlmeMsgDestType_t; + +/* + * Disconnecting type enum + */ +typedef enum{ + DISCONN_TYPE_IMMEDIATE = 0, /* Disconnect without disassociation. */ + DISCONN_TYPE_DISASSOC, /* Send disassocciation frame upon disconnecting */ + DISCONN_TYPE_DEAUTH /* Send disassocciation notification upon disconnecting */ +}disConnType_e; + +/* Typedefs */ + + +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; + macAddress_t 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_POWER_CONSTRAINT_t powerConstraint; + dot11_4X_t fourXParams; + dot11_CHANNEL_SWITCH_t channelSwitch; + dot11_QUIET_t quiet; + dot11_TPC_REPORT_t TPCReport; +#ifdef EXC_MODULE_INCLUDED + dot11_CELL_TP_t cellTP; +#endif + dot11_RSN_t rsnIe[3]; + dot11_TIM_t tim; + dot11_QOS_CAPABILITY_IE_t QosCapParams; + UINT8 rxChannel; + UINT8 band; + BOOL myBssid; + BOOL myDst; + BOOL mySa; + BOOL recvChannelSwitchAnnoncIE; + mlmeFrameInfo_t frame; +}mlmeIEParsingParams_t; + +typedef void (*mlme_resultCB_t)( TI_HANDLE hObj, macAddress_t* bssid, mlmeFrameInfo_t* pFrameInfo, + Rx_attr_t* pRxAttr, UINT8* frame, 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); + +TI_STATUS mlme_config(TI_HANDLE hMlme, + TI_HANDLE hAuth, + TI_HANDLE hAssoc, + TI_HANDLE hSiteMgr, + TI_HANDLE hCtrlData, + TI_HANDLE hConn, + TI_HANDLE hTxData, + TI_HANDLE hHalCtrl, + TI_HANDLE hMemMgr, + 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 hConfigMgr); + +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, disConnType_e disConnType, mgmtStatus_e reason); + +TI_STATUS mlme_reportAuthStatus(TI_HANDLE hMlme, UINT16 status); + +TI_STATUS mlme_reportAssocStatus(TI_HANDLE hMlme, UINT16 status); + +/* MLME parser API */ + +TI_STATUS mlmeParser_recv(TI_HANDLE hMlme, mem_MSDU_T *pMSDU, Rx_attr_t* pRxAttr); + +TI_STATUS mlmeParser_registerForBeaconAndProbeResp( TI_HANDLE hMlme, + mlme_resultCB_t resultCBFunc, + TI_HANDLE resultCBObj ); + +void mlmeParser_unregisterForBeaconAndProbeResp( TI_HANDLE hMlme ); + +TI_STATUS mlmeParser_parseIEs(TI_HANDLE *hMlme, + UINT8 *pData, + INT32 bodyDataLen, + mlmeIEParsingParams_t *params); + +#ifdef EXC_MODULE_INCLUDED +void mlmeParser_readExcOui (UINT8 *pData, + UINT32 dataLen, + UINT32 *pReadLen, + EXCv4IEs_t *excIEs); +#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); + +TI_STATUS assoc_config(TI_HANDLE hAssoc, + TI_HANDLE hMlme, + TI_HANDLE hRegulatoryDomain, + TI_HANDLE hSiteMgr, + TI_HANDLE hCtrlData, + TI_HANDLE hTxData, + TI_HANDLE hHalCtrl, + TI_HANDLE hRsn, + TI_HANDLE hReport, + TI_HANDLE hOs, + TI_HANDLE hExcMngr, + TI_HANDLE hQosMngr, + TI_HANDLE hMeasurementMgr, + TI_HANDLE hApConn, + 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); + +TI_STATUS auth_config(TI_HANDLE hAuth, + TI_HANDLE hMlme, + TI_HANDLE hRsn, + TI_HANDLE hReport, + TI_HANDLE hOs, + 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/sta_dk/pform/linux/src/wlan_driver_inc/osApi.h b/sta_dk/pform/linux/src/wlan_driver_inc/osApi.h new file mode 100644 index 0000000..41696ab --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osApi.h @@ -0,0 +1,544 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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__ + + +#include "osTIType.h" +#include "TI_IPC_Api.h" +//TRS:MEB +#ifdef _WINDOWS +#endif + +//TRS end + + +/**************************************************************************************** + START OF OS API (Common to all GWSI LIB, Driver and TI Driver) +*****************************************************************************************/ + + +#define OS_API_MEM_ADRR 0x0000000 +#define OS_API_REG_ADRR 0x300000 + + +/**************************************************************************************** + OS HW API NEEDED BY DRIVER +*****************************************************************************************/ + + +#define OS_PAGE_SIZE 4096 + +/* +Clear the WLAN Ready Interrupt Line stored in the PIC Controller +*/ +VOID os_clearWlanReady(void); + +/* +Read the WLAN_IRQ line +*/ +UINT32 os_senseIrqLine( TI_HANDLE OsContext ); + +/* TRS: CDB Needed for osApi.C */ +#ifdef BSP_H5 +#define WLAN_GPIO_INTERRUPT_LINE 9 +#define WLAN_GPIO_POWER_ENABLET_LINE 10 +#else +#define WLAN_GPIO_INTERRUPT_LINE 134 +#define WLAN_GPIO_POWER_ENABLET_LINE 71 +#endif + + +VOID +os_disableIrq( + TI_HANDLE OsContext + ); + +VOID +os_enableIrq( + TI_HANDLE OsContext + ); + +/**************************************************************************************** + * * + * OS Report API * + * * + ****************************************************************************************/ + +VOID +os_setDebugMode( + BOOL enable + ); + +VOID +os_printf( + const char *format ,...); + +VOID os_setDebugOutputToTicon(BOOL value); + +#define os_report os_printf +#define osPrintf os_printf //TRS::CDB + +/**************************************************************************************** + * * + * OS DMA CALLBACK API * + **************************************************************************************** + * Callback directly called at an IRQ context from the SPI modue * + * This should triger a tasklet_schedule so that the End of DMA will be handled * + * in a tasklet context and then be directed to the TNETWIF to call the Client * + * * + * * + ****************************************************************************************/ + +VOID +os_TNETWIF_BusTxn_Complete( + TI_HANDLE OsContext, + int status + ); + + +/**************************************************************************************** + * * + * OS Memory API * + * * + ****************************************************************************************/ + +PVOID +os_memoryAlloc( + TI_HANDLE OsContext, + UINT32 Size + ); + +PVOID +os_memoryCAlloc( + TI_HANDLE OsContext, + UINT32 Number, + UINT32 Size + ); + +VOID +os_memorySet( + TI_HANDLE OsContext, + PVOID pMemPtr, + INT32 Value, + UINT32 Length + ); + +VOID +os_memoryZero( + TI_HANDLE OsContext, + PVOID pMemPtr, + UINT32 Length + ); + +VOID +os_memoryCopy( + TI_HANDLE pOsContext, + PVOID pDestination, + PVOID pSource, + UINT32 Size + ); + +VOID +os_memoryMove( + TI_HANDLE pOsContext, + PVOID pDestination, + PVOID pSource, + UINT32 Size + ); + +VOID +os_memoryFree( + TI_HANDLE pOsContext, + PVOID pMemPtr, + UINT32 Size + ); + +INT32 +os_memoryCompare( + TI_HANDLE OsContext, + PUINT8 Buf1, + PUINT8 Buf2, + INT32 Count + ); + +PVOID +os_memoryAlloc4HwDma( + TI_HANDLE pOsContext, + UINT32 Size + ); + +VOID +os_memory4HwDmaFree( + TI_HANDLE pOsContext, + PVOID pPMem_ptr, + UINT32 Size + ); + + +/**************************************************************************************** + * * + * OS TIMER API * + * * + ****************************************************************************************/ +typedef void (*PTIMER_FUNCTION)(TI_HANDLE Context); + +TI_HANDLE +os_timerCreate( + TI_HANDLE OsContext, + PTIMER_FUNCTION pRoutine, + TI_HANDLE Context + ); + +VOID +os_timerDestroy( + TI_HANDLE OsContext, + TI_HANDLE TimerHandle + ); + +VOID +os_timerStart( + TI_HANDLE OsContext, + TI_HANDLE TimerHandle, + UINT32 DelayMs, + BOOL bPeriodic + ); + +VOID +os_timerStop( + TI_HANDLE OsContext, + TI_HANDLE TimerHandle + ); + +VOID +os_periodicIntrTimerStart( + TI_HANDLE OsContext + ); + +UINT32 +os_timeStampMs( + TI_HANDLE OsContext + ); + +UINT32 +os_timeStampUs( + TI_HANDLE OsContext + ); + +VOID +os_StalluSec( + TI_HANDLE OsContext, + UINT32 uSec + ); + +void os_ToggleDebugGPIO(int count); + + +/**************************************************************************************** + * * + * Hardware access functions API * + * * + ****************************************************************************************/ +PVOID +os_hwGetRegistersAddr( + TI_HANDLE OsContext + ); + + +PVOID +os_hwGetMemoryAddr( + TI_HANDLE OsContext + ); + + +/**************************************************************************************** + * * + * Protection services API * + * * + **************************************************************************************** + * OS protection is implemented as dummy functions because * + * all driver code is executed in context of a single tasklet, * + * except IOCTL handlers and xmition. * + * Protection in IOCTL handlers and hard_start_xmit is done by different * + * means. * + ****************************************************************************************/ +TI_HANDLE +os_protectCreate( + TI_HANDLE OsContext + ); + +VOID +os_protectDestroy( + TI_HANDLE OsContext, + TI_HANDLE ProtectContext + ); + +VOID +os_protectLock( + TI_HANDLE OsContext, + TI_HANDLE ProtectContext + ); + +VOID +os_protectUnlock( + TI_HANDLE OsContext, + TI_HANDLE ProtectContext + ); + + + +#ifdef DRIVER_PROFILING + void _os_profile (TI_HANDLE OsContext, UINT32 fn, UINT32 par); + #define os_profile(hos,fn,par) _os_profile (hos, fn, par) +#else + #define os_profile(hos,fn,par) +#endif + + +/**************************************************************************************** + START OF GWSI DRIVER API +*****************************************************************************************/ +VOID +os_Complete( + TI_HANDLE OsContext + ); + +#ifndef GWSI_LIB + +VOID +os_WaitComplete( + TI_HANDLE OsContext + ); + +UINT32 +os_memoryGetPhysicalLow (OS_PHYSICAL_ADDRESS pAddr); +UINT32 +os_memoryGetPhysicalHigh (OS_PHYSICAL_ADDRESS pAddr); + +/* MEB use native NDIS functions */ +#ifdef _WINDOWS +#else + + UINT32 os_memoryGetPhysicalLow(OS_PHYSICAL_ADDRESS pAddr); + UINT32 os_memoryGetPhysicalHigh(OS_PHYSICAL_ADDRESS pAddr); + +#endif + + VOID os_hardResetTnetw(void); + +#endif + + +/**************************************************************************************** + START OF TI DRIVER API +*****************************************************************************************/ +#if !defined(GWSI_DRIVER) && !defined(GWSI_LIB) + +typedef struct { + UINT32 Event; + UINT8* Data; +} TI_CONNECTION_STATUS, *PTI_CONNECTION_STATUS; + + + +PVOID +os_memoryAlloc4HwCopy( + TI_HANDLE pOsContext, + UINT32 Size + ); + +VOID +os_memorySharedFree( + TI_HANDLE OsContext, + PVOID pVirtual, + UINT32 Size, + OS_PHYSICAL_ADDRESS pPhysical + ); + +PVOID +os_memorySharedAlloc( + TI_HANDLE OsContext, + UINT32 Size, + OS_PHYSICAL_ADDRESS *pPhysical + ); + +VOID +os_memoryMoveToHw( + TI_HANDLE OsContext, + PVOID pTarget, + PVOID pSource, + UINT32 Size + ); + +VOID +os_memoryMoveFromHw( + TI_HANDLE OsContext, + PVOID pTarget, + PVOID pSource, + UINT32 Size + ); + + +/**/ +/* Register access functions*/ +/**/ +VOID +os_hwReadMemRegisterUINT32( + TI_HANDLE OsContext, + PUINT32 Register, + PUINT32 Data + ); + +VOID +os_hwWriteMemRegisterUINT32( + TI_HANDLE OsContext, + PUINT32 Register, + UINT32 Data + ); + +VOID +os_hwReadMemRegisterUINT16( + TI_HANDLE OsContext, + PUINT16 Register, + PUINT16 Data + ); + +VOID +os_hwWriteMemRegisterUINT16( + TI_HANDLE OsContext, + PUINT16 Register, + UINT16 Data + ); + +VOID +os_hwReadMemRegisterUINT8( + TI_HANDLE OsContext, + PUINT8 Register, + PUINT8 Data + ); + +VOID +os_hwWriteMemRegisterUINT8( + TI_HANDLE OsContext, + PUINT8 Register, + UINT8 Data + ); + +int +os_getFirmwareImage( + TI_HANDLE OsContext, + PUINT8 *pBuffer, + PUINT32 Length, + UINT8 RadioType + ); + +int +os_getRadioImage( + TI_HANDLE OsContext, + PUINT8 *pBuffer, + PUINT32 Length, + UINT8 RadioType + ); + +VOID +os_closeFirmwareImage( TI_HANDLE OsContext ); + +VOID +os_closeRadioImage( TI_HANDLE OsContext ); + +BOOL +os_receivePacket( + TI_HANDLE OsContext, + PVOID pPacket, + UINT16 Length + ); + +INT32 +os_sendPacket( + TI_HANDLE OsContext, + PVOID pPacket, + UINT16 Length + ); + +tiINT32 +os_IndicateEvent( + IPC_EV_DATA* pData + ); + +VOID +os_powerStateBusy( + TI_HANDLE OsContext + ); + +VOID +os_powerStateIdle( + TI_HANDLE OsContext + ); + +VOID +os_setWakeOnGpio( + TI_HANDLE OsContext + ); + +VOID +os_resetWakeOnGpio( + TI_HANDLE OsContext + ); + +BOOL +os_getEeepromImage( + TI_HANDLE OsContext, + PUINT8* pBuffer, + PUINT32 length + ); + +// TRS:JCG missing in 4.03 +VOID +os_setPowerOfTnetw( + BOOL bPowerOn + ); + +#endif + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/osClsfr.h b/sta_dk/pform/linux/src/wlan_driver_inc/osClsfr.h new file mode 100644 index 0000000..ee91861 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osClsfr.h @@ -0,0 +1,62 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: OSCLSFRI.H*/ +/**/ +/* Purpose: This module demonstrate qos tag classification.*/ +/**/ +/*--------------------------------------------------------------------------*/ + +#ifndef __OS_CLSFR_H__ +#define __OS_CLSFR_H__ + +#include "srcApi.h" + + +TI_STATUS +os_txClassifier( + mem_MSDU_T *pMsdu, + UINT8 *pQosClassifierTable + ); + +TI_STATUS +osSend_ConfigTxClassifier( + PTIWLN_ADAPTER_T pAdapter, + UINT32 bufferLength, + UINT8 *pQosClassifierBuffer + ); + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/osDebug.h b/sta_dk/pform/linux/src/wlan_driver_inc/osDebug.h new file mode 100644 index 0000000..ac2aa38 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osDebug.h @@ -0,0 +1,138 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 + +#define IF_TIDEBUG(f) if (!((TiDebugFlag & (f))^(f))) +extern unsigned long TiDebugFlag; + +#define PRINT(F, A) IF_TIDEBUG( F ) { DbgPrint(A); } +#define PRINTF(F, A) IF_TIDEBUG( F ) { DbgPrint 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/sta_dk/pform/linux/src/wlan_driver_inc/osDot11.h b/sta_dk/pform/linux/src/wlan_driver_inc/osDot11.h new file mode 100644 index 0000000..62fd0ee --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osDot11.h @@ -0,0 +1,774 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" +#include "tiQosTypes.h" +/*#include "public_types.h"*/ + + +#define MAC_ADDR_LEN 6 +PACKED_STRUCT( macAddress_t, + + UINT8 addr[MAC_ADDR_LEN]; +); + + + +#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 + +/**/ +/* Per-packet information for Ieee8021QInfo.*/ +/**/ +typedef struct _OS_PACKET_8021Q_INFO +{ + union + { + struct + { + UINT32 UserPriority:3; /* 802.1p priority*/ + UINT32 CanonicalFormatId:1; /* always 0*/ + UINT32 VlanId:12; /* VLAN Identification*/ + UINT32 Reserved:16; /* set to 0*/ + } TagHeader; + + PVOID Value; + }u; +} OS_PACKET_8021Q_INFO, *POS_PACKET_8021Q_INFO; + +typedef tiUINT8 OS_802_11_MAC_ADDRESS[6]; + +typedef tiULONGLONG OS_802_11_KEY_RSC; + +PACKED_STRUCT( _OS_802_11_SSID, + + tiUINT32 SsidLength; + tiUINT8 Ssid[32]; +); +typedef _OS_802_11_SSID 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; + +PACKED_STRUCT( _OS_802_11_NETWORK_TYPE_LIST , + + tiUINT32 NumberOfItems; + OS_802_11_NETWORK_TYPE NetworkType [1]; +); +typedef _OS_802_11_NETWORK_TYPE_LIST 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 tiUINT32 OS_802_11_TX_POWER_LEVEL; + +/*Normal value from -10 and -200*/ +typedef 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). */ +PACKED_STRUCT( _OS_802_11_CONFIGURATION_FH , + + tiUINT32 Length; + tiUINT32 HopPattern; + tiUINT32 HopSet; + tiUINT32 DwellTime; +); +typedef _OS_802_11_CONFIGURATION_FH 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. */ +#ifdef _WINDOWS +#else + PACKED_STRUCT( _OS_802_11_CONFIGURATION , + + tiUINT32 Length; + tiUINT32 BeaconPeriod; + tiUINT32 ATIMWindow; + PACKED_UNION(Union, + tiUINT32 DSConfig; + tiUINT32 channel; + ); + + OS_802_11_CONFIGURATION_FH FHConfig; + ); +#endif + +typedef _OS_802_11_CONFIGURATION 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 tiUINT8 OS_802_11_RATES[8]; + +typedef tiUINT8 OS_802_11_RATES_EX[16]; + +PACKED_STRUCT( _OS_802_11_FIXED_IEs , + + tiUINT8 TimeStamp[8]; + tiUINT16 BeaconInterval; + tiUINT16 Capabilities; +); +typedef _OS_802_11_FIXED_IEs OS_802_11_FIXED_IEs, *POS_802_11_FIXED_IEs; + +PACKED_STRUCT( _OS_802_11_VARIABLE_IEs , + + tiUINT8 ElementID; + tiUINT8 Length; /* Number of bytes in data field*/ + tiUINT8 data[1]; +); +typedef _OS_802_11_VARIABLE_IEs OS_802_11_VARIABLE_IEs, *POS_802_11_VARIABLE_IEs; + +/*#pragma pack(push)*/ +#ifdef _WINDOWS +#else + PACKED_STRUCT( _OS_802_11_BSSID , + tiUINT32 Length; + OS_802_11_MAC_ADDRESS MacAddress; + PACKED_UNION(Union, + tiUINT8 Reserved[2]; + tiUINT16 Capabilities; + ); + OS_802_11_SSID Ssid; + tiUINT32 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; + /*tiUINT32 channel;*/ + ); +#endif +typedef _OS_802_11_BSSID OS_802_11_BSSID, *POS_802_11_BSSID; + +PACKED_STRUCT( _OS_802_11_BSSID_LIST , + + tiUINT32 NumberOfItems; + OS_802_11_BSSID Bssid[1]; +); +typedef _OS_802_11_BSSID_LIST OS_802_11_BSSID_LIST, *POS_802_11_BSSID_LIST; + +#ifdef _WINDOWS +#else + + PACKED_STRUCT( _OS_802_11_BSSID_EX , + + tiUINT32 Length; + OS_802_11_MAC_ADDRESS MacAddress; + PACKED_UNION(Union, + tiUINT8 Reserved[2]; + tiUINT16 Capabilities; + ); + OS_802_11_SSID Ssid; + tiUINT32 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; + tiUINT32 IELength; + tiUINT8 IEs[1]; + ); + +#endif + +typedef _OS_802_11_BSSID_EX OS_802_11_BSSID_EX, *POS_802_11_BSSID_EX, OS_WLAN_BSSID_EX, *POS_WLAN_BSSID_EX; + + +PACKED_STRUCT( _OS_802_11_BSSID_LIST_EX , + + tiUINT32 NumberOfItems; + OS_802_11_BSSID_EX Bssid[1]; +); +typedef _OS_802_11_BSSID_LIST_EX OS_802_11_BSSID_LIST_EX, *POS_802_11_BSSID_LIST_EX; + +/*#pragma pack(pop)*/ + +typedef tiUINT32 OS_802_11_FRAGMENTATION_THRESHOLD; +typedef tiUINT32 OS_802_11_RTS_THRESHOLD; +typedef tiUINT32 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 tiUINT32 OS_802_11_KEY_INDEX; + +PACKED_STRUCT( _OS_802_11_WEP , + + tiUINT32 Length; + tiUINT32 KeyIndex; + tiUINT32 KeyLength; + tiUINT8 KeyMaterial [32]; +); +typedef _OS_802_11_WEP OS_802_11_WEP, *POS_802_11_WEP; + +/* Key mapping keys require a BSSID*/ +/*typedef tiUINT64 OS_802_11_KEY_RSC;*/ + +/*#pragma pack(0)*/ +typedef struct _OS_802_11_KEY +{ + tiUINT32 Length; /* Length of this structure*/ + tiUINT32 KeyIndex; + tiUINT32 KeyLength; /* length of key in bytes*/ + OS_802_11_MAC_ADDRESS BSSID; + OS_802_11_KEY_RSC KeyRSC; + tiUINT8 KeyMaterial[32]; /* variable length depending on above field*/ +} OS_802_11_KEY, *POS_802_11_KEY; +/*#pragma pack()*/ + +/*#pragma pack(1)*/ +PACKED_STRUCT( _OS_802_11_REMOVE_KEY , + + tiUINT32 Length; /* Length of this structure*/ + tiUINT32 KeyIndex; + OS_802_11_MAC_ADDRESS BSSID; +); +typedef _OS_802_11_REMOVE_KEY OS_802_11_REMOVE_KEY, *POS_802_11_REMOVE_KEY; +/*#pragma pack()*/ + +#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 + +#ifndef GWSI_LIB + +#ifndef _WINDOWS +#pragma pack(1) +#endif /* ifndef _WINDOWS */ + +#ifdef _WINDOWS // TRS:AS "reserved field added to OS_802_11_AI_REQFI and OS_802_11_AI_RESFI + // structures conflicts with WM expectations and cause a problem with WPA. +#else /* ifdef _WINDOWS */ +PACKED_STRUCT( OS_802_11_AI_REQFI , + + tiUINT16 Capabilities; + tiUINT16 ListenInterval; + OS_802_11_MAC_ADDRESS CurrentAPAddress; + tiUINT16 reserved; /* added for packing */ +); + +PACKED_STRUCT( OS_802_11_AI_RESFI , + + tiUINT16 Capabilities; + tiUINT16 StatusCode; + tiUINT16 AssociationId; + tiUINT16 reserved; /* added for packing */ +); +#endif /* ifdef _WINDOWS */ + +PACKED_STRUCT( _OS_802_11_ASSOCIATION_INFORMATION , + tiUINT32 Length; + tiUINT16 AvailableRequestFixedIEs; +/* struct _OS_802_11_AI_REQFI + { + tiUINT16 Capabilities; + tiUINT16 ListenInterval; + OS_802_11_MAC_ADDRESS CurrentAPAddress; + } RequestFixedIEs; +*/ + OS_802_11_AI_REQFI RequestFixedIEs; + tiUINT32 RequestIELength; + tiUINT32 OffsetRequestIEs; + tiUINT16 AvailableResponseFixedIEs; +/* struct _OS_802_11_AI_RESFI + { + tiUINT16 Capabilities; + tiUINT16 StatusCode; + tiUINT16 AssociationId; + } ResponseFixedIEs; +*/ + OS_802_11_AI_RESFI ResponseFixedIEs; + tiUINT32 ResponseIELength; + tiUINT32 OffsetResponseIEs; + +); +typedef _OS_802_11_ASSOCIATION_INFORMATION OS_802_11_ASSOCIATION_INFORMATION, *POS_802_11_ASSOCIATION_INFORMATION; +#ifndef _WINDOWS +#pragma pack() +#endif /* ifndef _WINDOWS */ + +#endif + +/* 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; + +PACKED_STRUCT( _OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS , + + tiUINT32 uHighThreshold; + tiUINT32 uLowThreshold; + tiUINT32 TestInterval; +); +typedef _OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS; + +typedef struct{ + tiUINT32 uHighOrLowThresholdFlag; /* high or low */ + tiUINT32 uAboveOrBelowFlag; /* direction of crossing */ +} OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_CROSS_INDICATION_PARAMS; + +typedef tiUINT8 OS_802_11_PMKID_VALUE[16]; + +PACKED_STRUCT( _OS_BSSIDInfo , + + OS_802_11_MAC_ADDRESS BSSID; + OS_802_11_PMKID_VALUE PMKID; +); +typedef _OS_BSSIDInfo OS_BSSIDInfo, *POS_BSSIDInfo; + +PACKED_STRUCT( _OS_802_11_PMKID , + + tiUINT32 Length; + tiUINT32 BSSIDInfoCount; + OS_BSSIDInfo osBSSIDInfo[1]; +); +typedef _OS_802_11_PMKID 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; + +PACKED_STRUCT( _OS_802_11_STATUS_INDICATION , + + OS_802_11_STATUS_TYPE StatusType; +); +typedef _OS_802_11_STATUS_INDICATION OS_802_11_STATUS_INDICATION, *POS_802_11_STATUS_INDICATION; + + +typedef struct _OS_802_11_AUTHENTICATION_REQUEST +{ + tiUINT32 Length; /* Length of this structure*/ + OS_802_11_MAC_ADDRESS BSSID; + tiUINT32 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; + UINT32 uStatusCode; +} OS_802_11_DISASSOCIATE_REASON_T; + +#define OS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLE 0x01 + +PACKED_STRUCT( _OS_802_11_PMKID_CANDIDATE , + + OS_802_11_MAC_ADDRESS BSSID; + tiUINT32 Flags; +); +typedef _OS_802_11_PMKID_CANDIDATE OS_802_11_PMKID_CANDIDATE, *POS_802_11_PMKID_CANDIDATE; + +PACKED_STRUCT( _OS_802_11_PMKID_CANDIDATELIST , + + tiUINT32 Version; /* Version of the structure*/ + tiUINT32 NumCandidates; /* No. of pmkid candidates*/ + OS_802_11_PMKID_CANDIDATE CandidateList[1]; +); +typedef _OS_802_11_PMKID_CANDIDATELIST OS_802_11_PMKID_CANDIDATELIST, *POS_802_11_PMKID_CANDIDATELIST; + + +typedef UINT8 OS_802_11_MAC_PMKID_VALUE[16]; + +PACKED_STRUCT( _OS_802_11_BSSIDInfo , + + OS_802_11_MAC_ADDRESS BSSID; + OS_802_11_MAC_PMKID_VALUE PMKID; +); +typedef _OS_802_11_BSSIDInfo OS_802_11_BSSIDInfo, *POS_802_11_BSSIDInfo; + + +PACKED_STRUCT( _OS_802_11_AUTH_ENCRYPTION , + + OS_802_11_AUTHENTICATION_MODE AuthModeSupported; + OS_802_11_ENCRYPTION_STATUS EncryptionStatusSupported; +); +typedef _OS_802_11_AUTH_ENCRYPTION OS_802_11_AUTH_ENCRYPTION, *POS_802_11_AUTH_ENCRYPTION; + +PACKED_STRUCT( _OS_802_11_CAPABILITY , + + tiUINT32 Length; + tiUINT32 Version; + tiUINT32 NoOfPmKIDs; + tiUINT32 NoOfAuthEncryptPairsSupported; + OS_802_11_AUTH_ENCRYPTION AuthEncryptionSupported[1]; + +); +typedef _OS_802_11_CAPABILITY 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 MAX_SSID_LEN 32 + +PACKED_STRUCT(ssid_t , + + UINT8 len; + char ssidString[MAX_SSID_LEN]; +); + + +typedef enum +{ + RADIO_BAND_2_4_GHZ = 0, + RADIO_BAND_5_0_GHZ = 1, + RADIO_BAND_DUAL = 2, + RADIO_BAND_NUM_OF_BANDS = 2 +} radioBand_e; + + + + +#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 +//#define OID_802_11_CAPABILITY 0x0D010218 +//#define OID_802_11_PMKID 0x0D010219 +//#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_ENABLE_ALL 0x00000003 + + +#endif + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/osRgstry.h b/sta_dk/pform/linux/src/wlan_driver_inc/osRgstry.h new file mode 100644 index 0000000..d73fcfa --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osRgstry.h @@ -0,0 +1,136 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 { + + PUCHAR ParameterName; + NDIS_STRING NdisParameterName; + + NDIS_PARAMETER_TYPE ParameterType; + + BOOLEAN RangeCheck; + + ULONG DefaultValue; + ULONG MinValue; + ULONG MaxValue; + + ULONG FieldOffset; + ULONG FieldSize; + +} REGISTRY_DATA, *PREGISTRY_DATA; + + +VOID +regFillInitTable( + PTIWLN_ADAPTER_T pAdapter, + PVOID pInitTable + ); + +VOID +regReadParameters( + PTIWLN_ADAPTER_T pAdapter + ); + +VOID +regWriteInstanceNumber( + PTIWLN_ADAPTER_T pAdapter + ); + +VOID +regReadIntegerParameter( + PTIWLN_ADAPTER_T pAdapter, + PNDIS_STRING pParameterName, + ULONG defaultValue, + ULONG minValue, + ULONG maxValue, + UCHAR parameterSize, + PUCHAR pParameter + ); + +VOID +regReadStringParameter( + PTIWLN_ADAPTER_T pAdapter, + PNDIS_STRING pParameterName, + PCHAR pDefaultValue, + USHORT defaultLen, + PUCHAR pParameter, + void* pParameterSize + ); + +VOID +regReadUnicodeStringParameter( + PTIWLN_ADAPTER_T pAdapter, + PNDIS_STRING pParameterName, + PCHAR pDefaultValue, + UCHAR defaultLen, + PUCHAR pParameter, + PUCHAR pParameterSize + ); + + +VOID +regReadWepKeyParameter( + PTIWLN_ADAPTER_T pAdapter, + PUCHAR pKeysStructure, + UINT8 defaultKeyId + ); + +VOID +regReadNetworkAddress(PTIWLN_ADAPTER_T pAdapter); + +#ifdef TI_DBG + +VOID +regReadLastDbgState( + PTIWLN_ADAPTER_T pAdapter + ); + +VOID +regWriteLastDbgState( + PTIWLN_ADAPTER_T pAdapter + ); + +#endif + +// TRS:AS registry callbacks +#if defined(_WINDOWS) +#endif /* if defined(_WINDOWS) */ +//TRS end + +#endif // __OSRGSTRY_H_ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/osUtil.h b/sta_dk/pform/linux/src/wlan_driver_inc/osUtil.h new file mode 100644 index 0000000..e7a0de8 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/osUtil.h @@ -0,0 +1,338 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 __OSUTIL_H_ +#define __OSUTIL_H_ + +/*used for asynchron ioctl purposes*/ +void os_IoctlComplete(PTIWLN_ADAPTER_T pAdapter, TI_STATUS ReturnStatus) ; + +NTSTATUS +DispatchCommand( + PTIWLN_ADAPTER_T pAdapter, + ULONG ioControlCode, + PULONG outBufLen, + ULONG inBufLen, + PVOID ioBuffer, + PUINT8 pIoCompleteFlag + ); + +ULONG UtilInfoCodeQueryInformation( PTIWLN_ADAPTER_T pAdapter,PUCHAR pData,PULONG Length); +ULONG UtilInfoCodeSetInformation( PTIWLN_ADAPTER_T pAdapter,PUCHAR pData,ULONG Length); + +ULONG UtilGetSwVersion(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilSetBSSID(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetBSSID(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilSetSSID(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetSSID(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilNetworkTypesSupported(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilNetworkTypeInUseSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilNetworkTypeInUseGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilGetCurrentRssiLevel(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +VOID RssiUtilIoctlCompleteCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); +VOID SnrUtilIoctlCompleteCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); + +ULONG UtilBssidListGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length, BOOLEAN ExtBssid, BOOLEAN allVarIes); +ULONG UtilBssidListScanOid(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilInfrastructureModeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilInfrastructureModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilFragmentationThresholdSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilFragmentationThresholdGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilRtsThresholdSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRtsThresholdGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilSupportedRates(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilSupportedRatesSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilCurrentRatesGet(PTIWLN_ADAPTER_T pAdapter,PUCHAR pData, PULONG Length); +ULONG UtilDesiredRatesGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilBasicRatesGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilBasicRatesSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilConfigurationGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilConfigurationSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilReadReg(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilWriteReg(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilGetCounter(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Offset); +ULONG UtilStatistics(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilTxStatistics(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG inLength, PULONG outLength); + +ULONG UtilAddWep(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length, BOOLEAN CalledFromIoctl); +ULONG UtilRemoveWep(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilAddKey(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRemoveKey(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilWepStatusSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilWepStatusGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilAuthenticationModeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilAuthenticationModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilExtAuthenticationModeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExtAuthenticationModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilAssociationInfoGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG Util802CapabilityGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG Util802PmkidGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG Util802PmkidSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG Util802FSWAvailableOptionsGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG Util802FSWOptionsGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG Util802FSWOptionsSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG Util802EapTypeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG Util802EapTypeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + + +ULONG UtilBthWlanCoeEnable(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilBthWlanCoeRate(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilBthWlanCoeConfig(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilBthWlanCoeGetStatus(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG *Length); + + +ULONG UtilDesiredChannelSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilDesiredChannelGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilPowerModeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPowerModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilPowerLevelPSGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPowerLevelPSSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPowerLevelDefaultGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPowerLevelDefaultSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPowerLevelDozeModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPowerLevelDozeModeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilBeaconFilterDesiredStateSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilBeaconFilterDesiredStateGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilShortPreambleSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilShortPreambleGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilShortRetryGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilShortRetrySet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilLongRetryGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilLongRetrySet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilRegulatoryDomain_enableDisable_802_11d( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRegulatoryDomain_enableDisable_802_11h( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRegulatoryDomain_Get_802_11d( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilRegulatoryDomain_Get_802_11h( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilRegulatoryDomain_setCountryIE_2_4( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRegulatoryDomain_getCountryIE_2_4( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilRegulatoryDomain_setCountryIE_5( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRegulatoryDomain_getCountryIE_5( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilRegulatoryDomain_setMinMaxDfsChannels( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRegulatoryDomain_getMinMaxDfsChannels( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + + +ULONG UtilCurrentRegDomainGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilCurrentRegDomainSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilGetRegDomainTable(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilNumberOfAntennas(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilRxAntennaGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilRxAntennaSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilTxAntennaGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilTxAntennaSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilAntennaDivresitySet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilWepStatusGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG Util4xActiveStateGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilGetDesiredSSID(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilChannelGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilDesiredInfrastructureModeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilDriverStatusGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilDriverStatusSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilIbssProtectionGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilIbssProtectionSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilShortSlotGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilShortSlotSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilExtRatesIeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilExtRatesIeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilSetTrafficIntensityThresholds(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetTrafficIntensityThresholds(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilToggleTrafficIntensityEvents(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilSendDiscreteScanTrigger(PTIWLN_ADAPTER_T pAdapter, PUCHAR ioBuffer, ULONG inBufLen); +ULONG UtilPollApPackets(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPollApPacketsFromAC(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilConfigTxClassifier(PTIWLN_ADAPTER_T pAdapter,PUCHAR ioBuffer,ULONG inBufLen); +ULONG UtilRemoveClassifierEntry(PTIWLN_ADAPTER_T pAdapter,PUCHAR ioBuffer, ULONG inBufLen); +ULONG UtilGetClsfrType(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilGetAPQosParams(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetAsyncCurrentRssiLevel (PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetAsyncCurrentSnrRatio (PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetAPQosCapabilities(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilAddTspec(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetTspecParams(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilDeleteTspec(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetCurrentAcStatus(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilSetMediumUsageThreshold(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilSetPhyRateThreshold(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetMediumUsageThreshold(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetPhyRateThreshold(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetUserPriorityOfStream(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetDesiredPsMode(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilConfigTxClass(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilEnableEvent(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilDisableEvent(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilConfigEvents(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetDrvCapabilities(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetSelectedBSSIDInfo(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetPrimaryBSSIDInfo(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilGetDriverState (PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilStartAppScanSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilStopAppScanSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilDrvScanParamSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilScanPolicyParamSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilScanBssListGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilRssiGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilQosSetParams(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilQosSetRxTimeOut(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilSetDTagToAcMappingTable(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilSetVAD(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetVAD (PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilConfigRSSI(PTIWLN_ADAPTER_T pAdapter, UINT32 pData, ULONG Length); +ULONG UtilConfigPERLevel(PTIWLN_ADAPTER_T pAdapter, UINT32 pData, ULONG Length); + +ULONG UtilPrivacyFilterSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPrivacyFilterGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilDisassociate(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +VOID UtilDeviceSuspend(PTIWLN_ADAPTER_T pAdapter); +VOID UtilDeviceResume(PTIWLN_ADAPTER_T pAdapter); + +ULONG UtilGetTxPowerValue(PTIWLN_ADAPTER_T pAdapter,externalParam_e ParamType,PUCHAR pData,ULONG Length); + +ULONG UtilSetTxPowerDbm(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length ); +ULONG UtilGetTxPowerLevel(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length ); + +ULONG UtilEnableDisableRxDataFilters(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetRxDataFiltersStatistics(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilAddRxDataFilter(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilRemoveRxDataFilter(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilGetAPTxPowerLevel(PTIWLN_ADAPTER_T pAdapter,externalParam_e ParamType,PUCHAR pData,ULONG Length); + + +ULONG UtilTxPowerLevelDbmGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilTxPowerLevelDbmSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + + +ULONG UtilGetCountryCode(PTIWLN_ADAPTER_T pAdapter,externalParam_e ParamType,PUCHAR pData,ULONG Length); +ULONG UtilGetRegDomainBand(PTIWLN_ADAPTER_T pAdapter,externalParam_e ParamType,PUCHAR pData,ULONG Length); +ULONG UtilTestOid(PTIWLN_ADAPTER_T pAdapter,PUCHAR pData,ULONG Length); + +ULONG UtilEarlyWakeupIeGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilEarlyWakeupIeSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilExcConfigurationGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilExcConfigurationSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilExcNetworkEapGet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilExcNetworkEapSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilExcRogueApDetectedSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExcReportRogueApSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExcAuthSuccessSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExcCckmStartSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExcCckmRequestSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilExcCckmResultSet(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilGetMACAddress(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG SendUserPacket(PTIWLN_ADAPTER_T pAdapter, TI_HANDLE pPacket,ULONG PacketLen); +ULONG UtilSetMixedMode(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilGetMixedMode(PTIWLN_ADAPTER_T pAdapter, externalParam_e ParamType, PUCHAR pData, PULONG Length); + +ULONG UtilDriverSuspend(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilConfigRoamingParamsSet( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilConfigRoamingParamsGet( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + +ULONG UtilMeasurementEnableDisableParamsSet( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilMeasurementMaxDurationParamsSet( PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); + +ULONG UtilGetPowerConsumptionStatistics(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); + + +ULONG UtilPltReadRegister(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +VOID UtilPltReadRegisterCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); +ULONG UtilPltWriteRegister(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +VOID UtilPltRxPerCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); +ULONG UtilPltRxPerStart(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltRxPerStop(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltRxPerClear(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltRxPerGetResults(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG Length); +ULONG UtilPltTxStop(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltTxCW(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltTxContinues(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltWriteMib(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, ULONG Length); +ULONG UtilPltReadMib(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG pOutLength, ULONG InLength); +VOID UtilPltReadMibCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); +ULONG UtilPltRxTxCal(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG pOutLength, ULONG InLength); +VOID UtilPltRxTxCalCB(TI_HANDLE hAdapter,TI_STATUS status,PUINT8 pReadBuff); +ULONG UtilPltRxCal(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG pOutLength, ULONG InLength); +ULONG utilRxCalibrationStatus(PTIWLN_ADAPTER_T pAdapter, PUCHAR pData, PULONG pOutLength, ULONG InLength); + +#endif /*__OSUTIL_H_*/ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/paramIn.h b/sta_dk/pform/linux/src/wlan_driver_inc/paramIn.h new file mode 100644 index 0000000..5229aab --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/paramIn.h @@ -0,0 +1,152 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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_IN_H__ +#define __PARAM_IN_H__ + +#include "osTIType.h" +#include "commonTypes.h" + + + +/* In this file are defined the parameter that are for internal use of the software only. */ +/* Following are the parameters numbers. Each module can have 256 parameters */ +typedef enum +{ + /* HAL Control section */ + HAL_CTRL_AID_PARAM = HAL_CTRL_MODULE_PARAM | 0x01, + HAL_CTRL_RSN_HW_ENC_DEC_ENABLE_PARAM = HAL_CTRL_MODULE_PARAM | 0x02, + HAL_CTRL_RSN_KEY_ADD_PARAM = HAL_CTRL_MODULE_PARAM | 0x03, + HAL_CTRL_RSN_KEY_REMOVE_PARAM = HAL_CTRL_MODULE_PARAM | 0x04, + HAL_CTRL_RSN_DEFAULT_KEY_ID_PARAM = HAL_CTRL_MODULE_PARAM | 0x05, + HAL_CTRL_RSN_SECURITY_MODE_PARAM = HAL_CTRL_MODULE_PARAM | 0x06, + HAL_CTRL_RSN_SECURITY_ALARM_CB_SET_PARAM = HAL_CTRL_MODULE_PARAM | 0x07, + HAL_CTRL_ACX_STATISTICS_PARAM = HAL_CTRL_MODULE_PARAM | 0x08, + HAL_CTRL_MEDIUM_OCCUPANCY_PARAM = HAL_CTRL_MODULE_PARAM | 0x09, + HAL_CTRL_DISABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM = HAL_CTRL_MODULE_PARAM | 0x0a, + HAL_CTRL_ENABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM = HAL_CTRL_MODULE_PARAM | 0x0b, + HAL_CTRL_SG_ENABLE_PARAM = HAL_CTRL_MODULE_PARAM | 0x0c, + HAL_CTRL_SG_CONFIG_PARAM = HAL_CTRL_MODULE_PARAM | 0x0d, + + +#ifdef EXC_MODULE_INCLUDED + HAL_CTRL_RSN_EXC_SW_ENC_ENABLE_PARAM = HAL_CTRL_MODULE_PARAM | 0x0e, + HAL_CTRL_RSN_EXC_MIC_FIELD_ENABLE_PARAM = HAL_CTRL_MODULE_PARAM | 0x0f, +#endif /* EXC_MODULE_INCLUDED*/ + HAL_CTRL_TX_OP_LIMIT = HAL_CTRL_MODULE_PARAM | 0x10, + HAL_CTRL_NOISE_HISTOGRAM_PARAM = HAL_CTRL_MODULE_PARAM | 0x11, + HAL_CTRL_TSF_DTIM_MIB = HAL_CTRL_MODULE_PARAM | 0x12, + HAL_CTRL_REVISION = HAL_CTRL_MODULE_PARAM | 0x13, + HAL_CTRL_POWER_LEVEL_TABLE_PARAM = HAL_CTRL_MODULE_PARAM | 0x14, + /* Connection section */ + CONN_TYPE_PARAM = CONN_MODULE_PARAM | 0x01, + + /* MLME section */ + MLME_LEGACY_TYPE_PARAM = MLME_SM_MODULE_PARAM | 0x01, + MLME_RE_ASSOC_PARAM = MLME_SM_MODULE_PARAM | 0x02, + MLME_TNET_WAKE_ON_PARAM = MLME_SM_MODULE_PARAM | 0x03, + MLME_CAPABILITY_PARAM = MLME_SM_MODULE_PARAM | 0x04, + + /* Auth section */ + AUTH_LEGACY_TYPE_PARAM = AUTH_MODULE_PARAM | 0x01, + + /* RX data section */ + RX_DATA_EAPOL_DESTINATION_PARAM = RX_DATA_MODULE_PARAM | 0x01, + RX_DATA_PORT_STATUS_PARAM = RX_DATA_MODULE_PARAM | 0x02, + + /* TX data section */ + TX_DATA_CURRENT_PRIVACY_INVOKE_MODE_PARAM = TX_DATA_MODULE_PARAM | 0x01, + TX_DATA_EAPOL_ENCRYPTION_STATUS_PARAM = TX_DATA_MODULE_PARAM | 0x02, + TX_DATA_HAL_INTERFACE_STATUS_PARAM = TX_DATA_MODULE_PARAM | 0x03, + TX_DATA_802_11_POWER_SAVE_STATUS_PARAM = TX_DATA_MODULE_PARAM | 0x04, + + /* CTRL data section */ + CTRL_DATA_CURRENT_MODULATION_TYPE_PARAM = CTRL_DATA_MODULE_PARAM | 0x01, + CTRL_DATA_CURRENT_BASIC_RATE_PARAM = CTRL_DATA_MODULE_PARAM | 0x02, + CTRL_DATA_CURRENT_BASIC_MODULATION_PARAM = CTRL_DATA_MODULE_PARAM | 0x03, + CTRL_DATA_CURRENT_BASIC_RATE_MASK_PARAM = CTRL_DATA_MODULE_PARAM | 0x04, + CTRL_DATA_CURRENT_ACTIVE_RATE_PARAM = CTRL_DATA_MODULE_PARAM | 0x05, + + + /* SiteMgr section */ + SITE_MGR_POWER_CONSTRAINT_PARAM = SITE_MGR_MODULE_PARAM | 0x01, + SITE_MGR_BEACON_INTERVAL_PARAM = SITE_MGR_MODULE_PARAM | 0x02, + SITE_MGR_RADIO_BAND_PARAM = SITE_MGR_MODULE_PARAM | 0x03, + SITE_MGR_NEXT_DTIM_TIME_STAMP_PARAM = SITE_MGR_MODULE_PARAM | 0x04, + SITE_MGR_SITE_CAPABILITY_PARAM = SITE_MGR_MODULE_PARAM | 0x05, + SITE_MGR_4X_PARAM = SITE_MGR_MODULE_PARAM | 0x06, + SITE_MGR_RGSTRY_BASIC_RATE_SET_MASK = SITE_MGR_MODULE_PARAM | 0x08, + SITE_MGR_BEACON_RECV = SITE_MGR_MODULE_PARAM | 0x09, + SITE_MGR_DTIM_PERIOD_PARAM = SITE_MGR_MODULE_PARAM | 0x0A, + + + /* Previous Primary Site */ + SITE_MGR_PREV_SITE_BSSID_PARAM = SITE_MGR_MODULE_PARAM | 0x0B, + SITE_MGR_PREV_SITE_SSID_PARAM = SITE_MGR_MODULE_PARAM | 0x0C, + SITE_MGR_PREV_SITE_CHANNEL_PARAM = SITE_MGR_MODULE_PARAM | 0x0D, + SITE_MGR_DESIRED_RSSI_GAP_THR_PARAM = SITE_MGR_MODULE_PARAM | 0x0E, + SITE_MGR_PRIORITY_PARAM = SITE_MGR_MODULE_PARAM | 0x0F, + + /* Regulatory Domain section */ + REGULATORY_DOMAIN_DISCONNECT_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x01, + REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x02, + REGULATORY_DOMAIN_COUNTRY_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x03, + REGULATORY_DOMAIN_POWER_CAPABILITY_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x04, + REGULATORY_DOMAIN_SUPPORTED_CHANNEL_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x05, + REGULATORY_DOMAIN_SET_POWER_CONSTRAINT_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x06, + REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED = REGULATORY_DOMAIN_MODULE_PARAM| 0x07, + REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED = REGULATORY_DOMAIN_MODULE_PARAM| 0x08, + REGULATORY_DOMAIN_SET_CHANNEL_VALIDITY = REGULATORY_DOMAIN_MODULE_PARAM| 0x09, + REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES = REGULATORY_DOMAIN_MODULE_PARAM| 0x0a, + REGULATORY_DOMAIN_ALL_SUPPORTED_CHANNELS = REGULATORY_DOMAIN_MODULE_PARAM| 0x0b, + REGULATORY_DOMAIN_CHECK_COUNTRY_PARAM = REGULATORY_DOMAIN_MODULE_PARAM| 0x0c, + REGULATORY_DOMAIN_IS_COUNTRY_FOUND = REGULATORY_DOMAIN_MODULE_PARAM| 0x0d, + + /* measurement section */ + MEASUREMENT_TRAFFIC_THRESHOLD_PARAM = MEASUREMENT_MODULE_PARAM| 0x01, + MEASUREMENT_GET_STATUS_PARAM = MEASUREMENT_MODULE_PARAM| 0x02, + +#ifdef EXC_MODULE_INCLUDED + + EXC_CCKM_EXISTS = EXC_MANAGER_MODULE_PARAM | 0x01, + EXC_NEIGHBOR_APS = EXC_MANAGER_MODULE_PARAM | 0x02, +#endif + + +} internalParam_e; + + +#endif /* __PARAM_IN_H__ */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/paramMng.h b/sta_dk/pform/linux/src/wlan_driver_inc/paramMng.h new file mode 100644 index 0000000..9818b49 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/paramMng.h @@ -0,0 +1,431 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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__ + + /* 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. + +****************************************************************************/ + +#define EXTERNAL_SET_ENABLE(x) (x & 0x80000000) +#define EXTERNAL_GET_ENABLE(x) (x & 0x00800000) +#define GET_PARAM_MODULE_NUMBER(x) ((x & 0x0000FF00) >> 8) +#ifdef GWSI_LIB +/* In some compilers the macro definition defaults to int, and 0x80000000 exceeds that limit */ +#define SET_BIT ((int)0x80000000) +#else +#define SET_BIT 0x80000000 +#endif +#define GET_BIT 0x00800000 + + /* Following are the modules numbers */ +/* NOTICE! whenever you add a module, you have to increment MAX_PARAM_MODULE_NUMBER as well!!! */ +typedef enum +{ + AUTH_MODULE_PARAM = 0x0100, + ASSOC_MODULE_PARAM = 0x0200, + RX_DATA_MODULE_PARAM = 0x0300, + TX_DATA_MODULE_PARAM = 0x0400, + CTRL_DATA_MODULE_PARAM = 0x0500, + SITE_MGR_MODULE_PARAM = 0x0600, + CONN_MODULE_PARAM = 0x0700, + RSN_MODULE_PARAM = 0x0800, + ADM_CTRL_MODULE_PARAM = 0x0900, + HAL_CTRL_MODULE_PARAM = 0x0A00, + REPORT_MODULE_PARAM = 0x0B00, + SME_SM_MODULE_PARAM = 0x0C00, + MLME_SM_MODULE_PARAM = 0x0D00, + REGULATORY_DOMAIN_MODULE_PARAM = 0x0E00, + MEASUREMENT_MODULE_PARAM = 0x0F00, + EXC_MANAGER_MODULE_PARAM = 0x1000, + ROAMING_MANAGER_MODULE_PARAM = 0x1100, + SOFT_GEMINI_PARAM = 0x1200, + QOS_MANAGER_PARAM = 0x1300, + POWER_MANAGER_PARAM = 0x1400, + SCAN_CNCN_PARAM = 0x1500, + SCAN_MNGR_PARAM = 0x1600, + + /* + Last module - DO NOT TOUCH! + */ + MODULE_PARAM_LAST_MODULE + +} moduleParam_e; + +enum +{ + /* + the MAX_PARAM_MODULE_PARAM is the module param last module +1 therefore there is a need + to -1 to get to real last module number. + */ + MAX_PARAM_MODULE_PARAM = MODULE_PARAM_LAST_MODULE - 1 +}; + +/* Following are the parameters numbers. Each module can have 256 parameters */ +typedef enum +{ + /* Driver General section */ + DRIVER_STATUS_PARAM = GET_BIT | 0x00, + + /* HAL Control section */ + HAL_CTRL_RTS_THRESHOLD_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x01, + HAL_CTRL_FRAG_THRESHOLD_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x02, + HAL_CTRL_COUNTERS_PARAM = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x03, + HAL_CTRL_LISTEN_INTERVAL_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x04, + HAL_CTRL_CURRENT_BEACON_INTERVAL_PARAM = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x05, + HAL_CTRL_TX_POWER_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x06, + HAL_CTRL_TX_ANTENNA_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x07, + HAL_CTRL_RX_ANTENNA_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x08, + HAL_CTRL_MIN_POWER_LEVEL = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x09, + HAL_CTRL_CLK_RUN_ENABLE = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x0A, + HAL_CTRL_QUEUES_PARAMS = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x0B, + HAL_CTRL_AC_PARAMS = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x0C, + HAL_CTRL_TX_RATE_CLASS_PARAMS = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x0D, + HAL_CTRL_DOT11_MAX_TX_MSDU_LIFE_TIME = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x0E, + HAL_CTRL_DOT11_MAX_RX_MSDU_LIFE_TIME = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x0F, + HAL_CTRL_PS_POLL_GENERATION_MODE = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x10, + HAL_CTRL_CTS_TO_SELF_PARAM = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x11, + HAL_CTRL_TX_ACK_POLICY = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x12, + + HAL_CTRL_TX_COUNTERS_PARAM = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x14, + HAL_CTRL_RX_TIME_OUT_PARAM = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x15, + + HAL_CTRL_ANTENNA_DIVERSITY_PARAMS = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x18, + HAL_CTRL_CURRENT_CHANNEL = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x19, + HAL_CTRL_RSSI_LEVEL_PARAM = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x1a, + HAL_CTRL_SNR_RATIO_PARAM = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x1b, + HAL_CTRL_BCN_BRC_OPTIONS = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x1c, + + /* PLT params */ + HAL_CTRL_PLT_READ_REGISTER = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x1d, + HAL_CTRL_PLT_WRITE_REGISTER = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x1e, + + HAL_CTRL_PLT_RX_PER_START = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x1f, + HAL_CTRL_PLT_RX_PER_STOP = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x20, + HAL_CTRL_PLT_RX_PER_CLEAR = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x21, + HAL_CTRL_PLT_RX_PER_GET_RESULTS = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x22, + HAL_CTRL_PLT_TX_CW = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x23, + HAL_CTRL_PLT_TX_CONTINUES = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x24, + HAL_CTRL_PLT_TX_STOP = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x25, + HAL_CTRL_PLT_WRITE_MIB = SET_BIT | HAL_CTRL_MODULE_PARAM | 0x26, + HAL_CTRL_PLT_READ_MIB = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x27, + + HAL_CTRL_PLT_RX_TX_CAL = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x28, + HAL_CTRL_PLT_RX_CAL_STATUS = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x29, + + /* misc section */ + HAL_CTRL_EARLY_WAKEUP = SET_BIT | GET_BIT | HAL_CTRL_MODULE_PARAM | 0x30, + HAL_CTRL_POWER_CONSUMPTION = GET_BIT | HAL_CTRL_MODULE_PARAM | 0x31, + + + /* Site manager section */ + SITE_MGR_DESIRED_CHANNEL_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x01, + SITE_MGR_DESIRED_BSSID_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x02, + SITE_MGR_DESIRED_SSID_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x03, + SITE_MGR_DESIRED_BSS_TYPE_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x04, + SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x05, + SITE_MGR_DESIRED_TX_RATE_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x07, + 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_DESIRED_PREAMBLE_TYPE_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x0A, + + SITE_MGR_CURRENT_RADIO_TYPE_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x0D, + SITE_MGR_CURRENT_CHANNEL_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x0E, + 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_BSSID_LIST_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x13, + SITE_MGR_TI_WLAN_COUNTERS_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x14, + SITE_MGR_PRIMARY_SITE_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x15, + SITE_MGR_EEPROM_VERSION_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x16, + SITE_MGR_FIRMWARE_VERSION_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x17, + 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_USE_DRAFT_NUM_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x1A, + SITE_MGR_DESIRED_SLOT_TIME_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x1B, + 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_DISASSOCIATE_PARAM = SET_BIT | SITE_MGR_MODULE_PARAM | 0x20, + SITE_MGR_DEAUTHENTICATE_PARAM = SET_BIT | SITE_MGR_MODULE_PARAM | 0x21, + SITE_MGR_BSSID_LIST_SCAN_PARAM = SET_BIT | SITE_MGR_MODULE_PARAM | 0x22, + 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_GET_AP_QOS_CAPABILITIES = GET_BIT | SITE_MGR_MODULE_PARAM | 0x2E, + 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_TX_RATE_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x32, + SITE_MGR_CURRENT_BSS_TYPE_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x33, + SITE_MGR_BSSID_FULL_LIST_PARAM = GET_BIT | SITE_MGR_MODULE_PARAM | 0x34, + SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x35, + SITE_MGR_ALLOW_TX_POWER_CHECK = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x36, + SITE_MGR_NETWORK_TYPE_IN_USE = GET_BIT | SITE_MGR_MODULE_PARAM | 0x37, + + /* MLME section */ + MLME_BEACON_RECV = GET_BIT | MLME_SM_MODULE_PARAM | 0x01, + + /* SME SM section */ + SITE_MGR_CONNECTION_STATUS_PARAM = GET_BIT | SME_SM_MODULE_PARAM | 0x01, + SME_SM_STATE_PARAM = GET_BIT | SME_SM_MODULE_PARAM | 0x02, + SME_SCAN_ENABLED_PARAM = SET_BIT | GET_BIT | SME_SM_MODULE_PARAM | 0x03, + + /* Scan concentrator section */ + SCAN_CNCN_START_APP_SCAN = SET_BIT | SCAN_CNCN_PARAM | 0x01, + SCAN_CNCN_STOP_APP_SCAN = SET_BIT | SCAN_CNCN_PARAM | 0x02, + SCAN_CNCN_BSSID_LIST_SCAN_PARAM = SET_BIT | SCAN_CNCN_PARAM | 0x03, + + /* Scan Manager module */ + SCAN_MNGR_SET_CONFIGURATION = SET_BIT | SCAN_MNGR_PARAM | 0x01, + SCAN_MNGR_BSS_LIST_GET = GET_BIT | SCAN_MNGR_PARAM | 0x02, + + /* 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_RESP_PARAM = GET_BIT | ASSOC_MODULE_PARAM | 0x04, + + /* 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_ENCRYPTION_STATUS_PARAM = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x04, + RSN_ADD_KEY_PARAM = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x05, + RSN_REMOVE_KEY_PARAM = SET_BIT | RSN_MODULE_PARAM | 0x06, + RSN_EXT_AUTHENTICATION_MODE = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x07, + RSN_MIXED_MODE = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x08, + RSN_DEFAULT_KEY_ID = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x09, + RSN_EXC_NETWORK_EAP = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x0A, + 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 | GET_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_ENABLE_DISABLE_RX_DATA_FILTERS = SET_BIT | GET_BIT | RX_DATA_MODULE_PARAM | 0x04, + RX_DATA_ADD_RX_DATA_FILTER = SET_BIT | RX_DATA_MODULE_PARAM | 0x05, + RX_DATA_REMOVE_RX_DATA_FILTER = SET_BIT | RX_DATA_MODULE_PARAM | 0x06, + RX_DATA_GET_RX_DATA_FILTERS_STATISTICS = GET_BIT | RX_DATA_MODULE_PARAM | 0x07, + + + /* TX data section */ + TX_DATA_PORT_STATUS_PARAM = GET_BIT | TX_DATA_MODULE_PARAM | 0x01, + TX_DATA_COUNTERS_PARAM = GET_BIT | TX_DATA_MODULE_PARAM | 0x02, + TX_DATA_RESET_COUNTERS_PARAM = SET_BIT | TX_DATA_MODULE_PARAM | 0x03, + TX_DATA_ENCRYPTION_FIELD_SIZE = SET_BIT | TX_DATA_MODULE_PARAM | 0x04, + TX_DATA_PS_MODE_PARAM = SET_BIT | TX_DATA_MODULE_PARAM | 0x05, + TX_DATA_CONFIG_TX_QUEUE_SIZE = SET_BIT | TX_DATA_MODULE_PARAM | 0x07, + TX_DATA_CONVERT_HEADER_MODE = SET_BIT | GET_BIT | TX_DATA_MODULE_PARAM | 0x08, + TX_DATA_CONVERT_TAG_ZERO_HEADER_MODE = SET_BIT | TX_DATA_MODULE_PARAM | 0x09, + TX_DATA_TAG_TO_AC_CLASSIFIER_TABLE = SET_BIT | TX_DATA_MODULE_PARAM | 0x0A, + TX_DATA_PS_STATUS = SET_BIT | TX_DATA_MODULE_PARAM | 0x0B, + TX_DATA_SET_AC_QUEUE_INDEX = SET_BIT | TX_DATA_MODULE_PARAM | 0x0D, + TX_DATA_CONFIG_TX_QUEUE_OVFLOW_POLICY = SET_BIT | TX_DATA_MODULE_PARAM | 0x0E, + TX_DATA_CONFIG_AC_MSDU_LIFE_TIME = SET_BIT | TX_DATA_MODULE_PARAM | 0x0F, + TX_DATA_CONFIG_AC_ACK_POLICY = SET_BIT | TX_DATA_MODULE_PARAM | 0x10, + TX_DATA_AC_ADMISSION_STATE = SET_BIT | TX_DATA_MODULE_PARAM | 0x11, + TX_DATA_SET_MEDIUM_USAGE_THRESHOLD = SET_BIT | TX_DATA_MODULE_PARAM | 0x12, + TX_DATA_GET_MEDIUM_USAGE_THRESHOLD = SET_BIT | GET_BIT | TX_DATA_MODULE_PARAM | 0x13, + TX_DATA_POLL_AP_PACKETS_FROM_AC = SET_BIT | TX_DATA_MODULE_PARAM | 0x14, + TX_DATA_REPORT_TS_STATISTICS = GET_BIT | TX_DATA_MODULE_PARAM | 0x15, + TX_DATA_SET_VAD = SET_BIT | TX_DATA_MODULE_PARAM | 0x16, + TX_DATA_GET_VAD = GET_BIT | TX_DATA_MODULE_PARAM | 0x17, + + /* CTRL data section */ + CTRL_DATA_COUNTERS_PARAM = GET_BIT | CTRL_DATA_MODULE_PARAM | 0x01, + CTRL_DATA_RATE_CONTROL_ENABLE_PARAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x02, + CTRL_DATA_CURRENT_BSSID_PARAM = GET_BIT | CTRL_DATA_MODULE_PARAM | 0x03, + CTRL_DATA_CURRENT_BSS_TYPE_PARAM = GET_BIT | CTRL_DATA_MODULE_PARAM | 0x04, + 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_MAC_ADDRESS = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x08, + 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_FOUR_X_ENABLE_PARAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x0B, + CTRL_DATA_FOUR_X_CURRRENT_STATUS_PARAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x0C, + CTRL_DATA_CLSFR_TYPE = GET_BIT | CTRL_DATA_MODULE_PARAM | 0x0D, + CTRL_DATA_CLSFR_CONFIG = SET_BIT | CTRL_DATA_MODULE_PARAM | 0x0E, + CTRL_DATA_CLSFR_REMOVE_ENTRY = SET_BIT | CTRL_DATA_MODULE_PARAM | 0x0F, + CTRL_DATA_GET_USER_PRIORITY_OF_STREAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x10, + CTRL_DATA_SHORT_RETRY_LIMIT_PARAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x11, + CTRL_DATA_LONG_RETRY_LIMIT_PARAM = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x12, + CTRL_DATA_CURRENT_RATE_CLASS_CLIENT = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x13, + CTRL_DATA_NEXT_RATE_MASK_FOR_CLIENT = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x14, + + CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x15, + CTRL_DATA_TOGGLE_TRAFFIC_INTENSITY_EVENTS = SET_BIT | CTRL_DATA_MODULE_PARAM | 0x16, + CTRL_DATA_TSRS_PARAM = SET_BIT | CTRL_DATA_MODULE_PARAM | 0x17, + + /* REPORT section */ + REPORT_MODULE_ON_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x01, + REPORT_MODULE_OFF_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x02, + REPORT_MODULE_TABLE_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x03, + REPORT_SEVERITY_ON_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x04, + REPORT_SEVERITY_OFF_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x05, + REPORT_SEVERITY_TABLE_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x06, + REPORT_PPMODE_VALUE_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x07, + REPORT_OS_DBG_STATE_VALUE_PARAM = SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x08, + + /* regulatory domain section */ + REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM = GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x02, + REGULATORY_DOMAIN_ENABLED_PARAM = GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x03, + REGULATORY_DOMAIN_CURRENT_REGULATORY_DOMAIN_PARAM = GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x04, + REGULATORY_DOMAIN_TX_POWER_LEVEL_TABLE_PARAM = GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x07, + REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM = SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x08, + REGULATORY_DOMAIN_UPDATE_CHANNEL_VALIDITY = SET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x09, + REGULATORY_DOMAIN_TEMPORARY_TX_ATTENUATION_PARAM = SET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0B, + REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D = SET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0C, + REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H = SET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0D, + REGULATORY_DOMAIN_COUNTRY_2_4_PARAM = SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0E, + REGULATORY_DOMAIN_COUNTRY_5_PARAM = SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0F, + REGULATORY_DOMAIN_DFS_CHANNELS_RANGE = SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x10, + + + /* measurement section */ + MEASUREMENT_ENABLE_DISABLE_PARAM = SET_BIT | MEASUREMENT_MODULE_PARAM | 0x01, + MEASUREMENT_MAX_DURATION_PARAM = SET_BIT | MEASUREMENT_MODULE_PARAM | 0x02, + +#ifdef EXC_MODULE_INCLUDED + /* EXC */ + + EXC_CONFIGURATION = SET_BIT | GET_BIT | EXC_MANAGER_MODULE_PARAM | 0x01, + EXC_ROGUE_AP_DETECTED = SET_BIT | EXC_MANAGER_MODULE_PARAM | 0x02, + EXC_REPORT_ROGUE_APS = SET_BIT | EXC_MANAGER_MODULE_PARAM | 0x03, + EXC_AUTH_SUCCESS = SET_BIT | EXC_MANAGER_MODULE_PARAM | 0x04, + EXC_CCKM_REQUEST = SET_BIT | EXC_MANAGER_MODULE_PARAM | 0x05, + EXC_CCKM_RESULT = SET_BIT | EXC_MANAGER_MODULE_PARAM | 0x06, + EXC_ENABLED = SET_BIT | GET_BIT | EXC_MANAGER_MODULE_PARAM | 0x07, + EXC_CURRENT_AP_SUPPORTED_VERSION = GET_BIT | EXC_MANAGER_MODULE_PARAM | 0x08, +#endif + + /* Roaming manager */ + ROAMING_MNGR_APPLICATION_CONFIGURATION = SET_BIT | GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x01, + + /* Parameters used for DEBUG */ + ROAMING_MNGR_TRIGGER_EVENT = SET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x02, + ROAMING_MNGR_CONN_STATUS = SET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x03, + ROAMING_MNGR_CONF_PARAM = GET_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_SET_ENABLE = SET_BIT | SOFT_GEMINI_PARAM | 0x01, + SOFT_GEMINI_SET_RATE = SET_BIT | SOFT_GEMINI_PARAM | 0x02, + SOFT_GEMINI_SET_CONFIG = SET_BIT | SOFT_GEMINI_PARAM | 0x03, + SOFT_GEMINI_GET_STATUS = GET_BIT | SOFT_GEMINI_PARAM | 0x04, + + + /* 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_OS_PARAMS = SET_BIT | QOS_MANAGER_PARAM | 0x07, + 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_AP_QOS_PARAMETERS = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x0A, + QOS_MNGR_OS_TSPEC_PARAMS = SET_BIT | QOS_MANAGER_PARAM | 0x0B, + QOS_MNGR_AC_STATUS = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x0C, + QOS_MNGR_ADD_TSPEC_REQUEST = SET_BIT | QOS_MANAGER_PARAM | 0x0D, + QOS_MNGR_DEL_TSPEC_REQUEST = SET_BIT | QOS_MANAGER_PARAM | 0x0E, + QOS_MNGR_ACTIVE_PROTOCOL = GET_BIT | QOS_MANAGER_PARAM | 0x0F, + QOS_SET_RATE_THRESHOLD = SET_BIT | QOS_MANAGER_PARAM | 0x10, + QOS_GET_RATE_THRESHOLD = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x11, + QOS_MNGR_GET_DESIRED_PS_MODE = GET_BIT | QOS_MANAGER_PARAM | 0x12, + QOS_SET_RX_TIME_OUT = SET_BIT | QOS_MANAGER_PARAM | 0x14, + QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x15, + QOS_MNGR_RESEND_TSPEC_REQUEST = SET_BIT | QOS_MANAGER_PARAM | 0x16, + + /* Power Manager params */ + POWER_MGR_POWER_MODE = SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x01, + POWER_MGR_DISABLE_PRIORITY = SET_BIT | POWER_MANAGER_PARAM | 0x02, + POWER_MGR_ENABLE_PRIORITY = SET_BIT | POWER_MANAGER_PARAM | 0x03, + POWER_MGR_POWER_LEVEL_PS = SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x04, + POWER_MGR_POWER_LEVEL_DEFAULT = SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x05, + POWER_MGR_POWER_LEVEL_DOZE_MODE = SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x06, + +} externalParam_e; + + +#endif /* __PARAM_MGR_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/paramOut.h b/sta_dk/pform/linux/src/wlan_driver_inc/paramOut.h new file mode 100644 index 0000000..fbdb214 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/paramOut.h @@ -0,0 +1,1405 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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_OUT_H__ +#define __PARAM_OUT_H__ + +#include "osTIType.h" +#include "osDot11.h" +#include "tiwlnif.h" +#include "ratesTypes.h" +#include "scanTypes.h" +#include "bssTypes.h" +#include "roamingMngrTypes.h" +#include "public_commands.h" +#include "public_infoele.h" +#include "public_radio.h" + +#ifdef EXC_MODULE_INCLUDED +#include "paramOutExc.h" +#else +#define EXC_PARAM_FIELDS +#endif + +#include "paramMng.h" +#include "commonTypes.h" +#include "coreDefaultParams.h" + +#define DOT11_MAX_DEFAULT_WEP_KEYS ( 4 ) +#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 ) + +#define RX_LEVEL_TABLE_SIZE (15) +#define SPECIAL_BG_CHANNEL (14) + +#define BEACON_FILTER_STRING_MAX_LEN 300 /*this is the max possible string length from INI file*/ + +#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 + +#define RX_DATA_FILTER_MAX_MASK_SIZE (8) +#define RX_DATA_FILTER_MAX_PATTERN_SIZE (64) +#define RX_DATA_FILTER_MAX_FIELD_PATTERNS (8) +#define RX_DATA_FILTER_FILTER_BOUNDARY (256) + +#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) + + +/* Soft gemini values */ + +#define NUM_OF_RATES_IN_SG MAX_NUM_OF_TX_RATES_IN_CLASS /* all rates (13)... */ +#define SG_RATES_STRING_MAX_DEF 100 +#define SG_RATES_DEF "0,0,1,0,0,1,1,1,0,1,1,1,1" /* all rates but 1,2,6,9,22 */ +#define NUM_OF_CONFIG_PARAMS_IN_SG 28 +#define NUM_OF_STATUS_PARAMS_IN_SG 28 + + +/*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_EXC_SECURITY 109 +#define VAL_DEFAULT_KEY_ID 110 +#define VAL_AP_SUPPORT_CHANELS 111 + + + +typedef enum +{ + DRAFT_5_AND_EARLIER = 5, + DRAFT_6_AND_LATER = 6 + +} draftNumber_t; + +PACKED_STRUCT( ratePair_t, + + rate_e maxBasic; + rate_e maxActive; +); + +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 */ +PACKED_STRUCT( scanControlTable24_t, + + UINT8 tableString[NUM_OF_CHANNELS_24]; +); + +/* Scan Control Table for 5G-band type */ +PACKED_STRUCT( scanControlTable5_t, + + UINT8 tableString[A_5G_BAND_NUM_CHANNELS]; +); + +/* Scan Control Table type */ +PACKED_STRUCT( scanControlTable_t, + + scanControlTable5_t ScanControlTable5; + scanControlTable24_t ScanControlTable24; +); + +PACKED_STRUCT( country_t, + + UINT8 elementId; + UINT8 len; + countryIE_t countryIE; +); + +PACKED_STRUCT( channelPair_t, + + UINT8 firstChennelNum; + UINT8 NumOfChannels; +); + +typedef enum +{ + ACTIVE_SCANNING = 0, + PASSIVE_SCANNING = 1, +} regulatoryDomain_scanOption_e; + +PACKED_STRUCT( regulatoryDomainParam_t, + + UINT8* pChannelBitMap; + UINT8 channelCnt; + INT8 txPower; +); + +PACKED_STRUCT( powerCapability_t, + + UINT8 minTxPower; + UINT8 maxTxPower; +); + + +/* SoftGemini module init parameters */ +typedef struct +{ + SoftGeminiEnableModes_e SoftGeminiEnable; + UINT8 SoftGeminiRate[NUM_OF_RATES_IN_SG]; + SoftGeminiParam_t SoftGeminiParam; + UINT8 scanNumOfProbeRequest; + UINT32 scanCompensationPercent; + UINT32 scanCompensationMaxTime; + UINT32 BSSLossCompensationPercent; + } 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 +{ + TX_DATA_CLOSED = 0, + TX_DATA_OPEN = 1 + +} txDataHalInterfaceStatus_t; + + +typedef enum +{ + GWSI_PENDING = 0, + GWSI_OPEN = 1 +} txDataGwsiInterfaceStatus_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, /* FALSE*/ + SCAN_ENABLED = 1, /* TRUE*/ + SKIP_NEXT_SCAN = 2 /* Skip only one next coming scan, then set this parameter to TRUE*/ +} scanEnabledOptions_e; + + + + +PACKED_STRUCT( rxDataCounters_t, + + UINT32 RecvOk; /* the number of frames that the NIC receives without errors */ + UINT32 DirectedBytesRecv; /* the number of bytes in directed packets that are received without errors */ + UINT32 DirectedFramesRecv; /* the number of directed packets that are received without errors */ + UINT32 MulticastBytesRecv; /* the number of bytes in multicast/functional packets that are received without errors */ + UINT32 MulticastFramesRecv; /* the number of multicast/functional packets that are received without errors */ + UINT32 BroadcastBytesRecv; /* the number of bytes in broadcast packets that are received without errors. */ + UINT32 BroadcastFramesRecv; /* the number of broadcast packets that are received without errors. */ + UINT32 LastSecBytesRecv; /* the number of bytes received without errors during last second */ + +); + +typedef struct rxDataFilterRequest_t +{ + UINT8 offset; + UINT8 maskLength; + UINT8 patternLength; + UINT8 mask[RX_DATA_FILTER_MAX_MASK_SIZE]; + UINT8 pattern[RX_DATA_FILTER_MAX_PATTERN_SIZE]; +} rxDataFilterRequest_t; + +typedef struct rxDataFilterFieldPattern_t +{ + UINT8 offset; + UINT8 length; + UINT8 flag; + UINT8 pattern[RX_DATA_FILTER_MAX_PATTERN_SIZE]; + UINT8 mask[RX_DATA_FILTER_MAX_PATTERN_SIZE]; +} rxDataFilterFieldPattern_t; + +PACKED_STRUCT( ctrlDataCounters_t, + + UINT32 icvFailCounter; + UINT32 keyNotFoundCounter; + UINT32 MicFailureCounter; + +); + + +typedef struct +{ + PowerMgr_PowerMode_e PowerMode; + PowerMgr_Priority_e powerMngPriority; +}PowerMgr_PowerMode_t; + + +typedef struct +{ + void *handler; + void *callback; +}QoS_renegVoiceTspecReq_t; + +/* Authentication/encryption capability */ +#define MAX_AUTH_ENCR_PAIR 13 + +typedef struct +{ + externalAuthMode_e authenticationMode; + cipherSuite_e cipherSuite; + +} authEncrPairList_t; + +typedef struct +{ + UINT32 NoOfPMKIDs; + UINT32 NoOfAuthEncrPairSupported; + authEncrPairList_t authEncrPairs[MAX_AUTH_ENCR_PAIR]; + +} rsnAuthEncrCapability_t; + +typedef struct +{ + UINT32 numOfPreAuthBssids; + macAddress_t *listOfPreAuthBssid; + +} rsnPreAuthBssidList_t; + + +PACKED_STRUCT( signal_t, + + INT32 rssi; + UINT8 snr; +); + +PACKED_STRUCT( rateMask_t, + + UINT32 basicRateMask; + UINT32 supportedRateMask; +); + +PACKED_STRUCT( assocInformation_t, + + UINT8 *assocRespBuffer; + UINT32 assocRespLen; + UINT8 *assocReqBuffer; + UINT32 assocReqLen; + +); + +/* QOS Parameters Structure */ + +typedef struct +{ + macAddress_t siteMacAddress; + BOOL priority; +} siteMgr_prioritySite_t; + +/*MULTIPLE QUEUES STRUCTURE */ + + + + +#define TX_POLICY_FLAGS_TRUNCATE 0x1 +#define TX_POLICY_FLAGS_PEEAMBLE_OVERRIDE 0x2 +#define TX_POLICY_FLAGS_SHORT_PREAMBLE 0x4 + + +typedef struct{ + UINT32 thresholdCross; /* high or low */ + 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 + + + +/* this enum is used for the different txRateClass_t which are components of txRatePolicy_t */ +typedef enum { + USER_RATE_CLASS = 0, + SG_RATE_CLASS = 1, + NUM_OF_RATE_CLASS_CLIENTS = 2 +} rateClassClients_e; + +typedef struct { + rateClassClients_e clientID; + UINT32 clientRateMask; +} rateClassRateMask_t; + + +typedef enum{ + AC_ACTIVE = 0, + AC_NOT_ACTIVE, +}acActive; + + +typedef struct +{ + UINT8 *buffer; + UINT16 bufLength; + UINT8 isBeacon; /* If true, Beacon packet is returned, otherwise it is Probe Response */ +} BufferParameters_t; + + + +typedef struct{ + UINT32 trafficAdmCtrlResponseTimeout; + BOOL trafficAdmCtrlUseFixedMsduSize; +}trafficAdmCtrlInitParams_t; + +typedef struct{ + BOOL wmeEnable; + BOOL trafficAdmCtrlEnable; + BOOL qosTagZeroConverHeader; + UINT8 PacketBurstEnable; + UINT32 PacketBurstTxOpLimit; + UINT32 TxOpLimit[MAX_NUM_OF_AC]; + UINT32 MsduLifeTime[MAX_NUM_OF_AC]; + rxTimeOut_t rxTimeOut; + UINT8 ShortRetryLimit[MAX_NUM_OF_AC]; + UINT8 LongRetryLimit[MAX_NUM_OF_AC]; + UINT16 TxQueueSize[MAX_NUM_OF_TX_QUEUES]; + UINT8 desiredWmeAcPsMode[MAX_NUM_OF_AC]; /* wme per ac power save mode */ + qOvFlowPolicy_e QueueOvFlowPolicy[MAX_NUM_OF_TX_QUEUES]; + UINT8 acAckPolicy[MAX_NUM_OF_AC]; /* ack policy per AC */ + trafficAdmCtrlInitParams_t trafficAdmCtrlInitParams; + UINT8 desiredPsMode; /* The desired PS mode of the station */ + UINT8 desiredMaxSpLen; + +}QosMngrInitParams_t; + + + +/*END OF MULTIPLE QUEUES STRUCTURE*/ + + +typedef struct +{ + UINT16 bufferSize; + UINT8 *buffer; +} applicationConfigBuffer_t; + +typedef struct +{ + macAddress_t bssID; + UINT16 channel; +} apChannelPair_t; + +typedef struct +{ + apChannelPair_t *apChannelPairs; + UINT16 numOfEntries; +} neighbor_AP_t; + +typedef struct +{ + /* One channel max duration time. (time slot 0 - 65000) */ + UINT16 maxChannelDuration; + /* One channel max duration time. (time slot 0 - 65000) */ + UINT16 minChannelDuration; + /* 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*/ + UINT8 earlyTerminationMode; + /* number of AP frames (beacon/probe_resp) to trigger Early termination. + Applicable only when EarlyTerminationMode = 1 */ + UINT8 eTMaxNumOfAPframes; + /* Number of probe request transmitted on each channel */ + UINT8 numOfProbeReq; + +} periodicScanParams_t; + + +typedef struct +{ + UINT16 channelNum; + BOOL channelValidity; + radioBand_e band; +} channelValidity_t; + +typedef struct +{ + BOOL channelValidity; /*TRUE-valid, FALSE-invalid */ + UINT8 maxTxPowerDbm; /* In Dbm/10 units */ +} channelCapabilityRet_t; + +typedef struct +{ + UINT8 *listOfChannels; + UINT8 sizeOfList; +} supportedChannels_t; + +typedef struct +{ + regulatoryDomain_scanOption_e scanOption; /* Passive or Active */ + UINT8 channelNum; + radioBand_e band; +} channelCapabilityReq_t; + +typedef struct +{ + UINT16 minDFS_channelNum; + UINT16 maxDFS_channelNum; +} DFS_ChannelRange_t; + +typedef struct +{ + txDataCounters_t *pTxDataCounters; + UINT8 acID; +} reportTsStatisticsReq_t; + +typedef struct +{ + UINT16 vadTimerEnabled; + UINT16 vadTimerDuration; +} txDataVadTimerParams_t; + +/* General Parameters Structure */ + +typedef struct{ + UINT32 paramType; + UINT32 paramLength; + + union + { + /* Driver General section */ + driverStatus_e driverStatus; + + /* HAL Control section */ + UINT8 halCtrlCtsToSelf; + UINT8 halCtrlTxPowerDbm; + + /* site manager section */ + UINT8 siteMgrDesiredChannel; + macAddress_t siteMgrDesiredBSSID; + ssid_t siteMgrDesiredSSID; + bssType_e siteMgrDesiredBSSType; + ratePair_t siteMgrDesiredRatePair; + rates_t siteMgrDesiredBasicRateSet; + rates_t siteMgrDesiredSupportedRateSet; + rateMask_t siteMgrCurrentRateMask; + UINT8 siteMgrDesiredTxRate; + UINT8 siteMgrCurrentTxRate; + modulationType_e siteMgrDesiredModulationType; + UINT16 siteMgrDesiredBeaconInterval; + preamble_e siteMgrDesiredPreambleType; + preamble_e siteMgrCurrentPreambleType; + radioType_e siteMgrRadioType; + radioBand_e siteMgrRadioBand; + OS_802_11_BSSID_LIST_EX *pSiteMgrBssidList; + OS_802_11_BSSID_EX *pSiteMgrSelectedSiteInfo; + OS_802_11_BSSID *pSiteMgrPrimarySiteDesc; + dot11mode_e siteMgrDot11Mode; + dot11mode_e siteMgrDot11OperationalMode; + draftNumber_t siteMgrUseDraftNum; + UINT8 siteMgrCurrentChannel; + ssid_t siteMgrCurrentSSID; + bssType_e siteMgrCurrentBSSType; + modulationType_e siteMgrCurrentModulationType; + slotTime_e siteMgrSlotTime; + signal_t siteMgrCurrentSignal; + UINT8 siteMgrNumberOfSites; + TIWLN_COUNTERS siteMgrTiWlanCounters; + BOOL siteMgrBuiltInTestStatus; + UINT8 siteMgrFwVersion[FW_VERSION_LEN]; /* Firmware version - null terminated string*/ + e2Version_t siteMgrEEpromVersion; /* EEPROM version*/ + UINT32 siteMgrDisAssocReason; + UINT32 siteMgrNextDtimTimeStamp; + UINT16 siteMgrSiteCapability; + BOOL siteMgrFourxParam; + UINT16 beaconInterval; + UINT8 APTxPower; + BOOL siteMgrQuietScanInProcess; + BOOL siteMgrScanSliceCurrentlyActive; + UINT8 siteMgrRoamingRssiGapThreshold; + UINT8 timeStamp[8]; + BOOL siteMgrBeaconRecv; + UINT32 siteMgrDtimPeriod; + INT32 siteMgrCurrentRssi; + UINT8 siteMgrIndexOfDesiredSiteEntry; + UINT8 *pSiteMgrDesiredSiteEntry; + UINT8 siteMgrCurrentTsfTimeStamp[8]; + UINT8 siteMgrUsrConfigTxPower; + + + OS_802_11_CONFIGURATION *pSiteMgrConfiguration; + siteMgr_prioritySite_t siteMgrPrioritySite; + BufferParameters_t siteMgrLastBeacon; + UINT8 siteMgrDesiredBeaconFilterState; + BOOL siteMgrAllowTxPowerCheck; + + /* SME SM section */ + scanStatus_e smeSmScanStatus; + scanEnabledOptions_e smeSMScanEnabled; + TIWLN_DOT11_STATUS smeSmConnectionStatus; + UINT8 smeSmState; + + /* connection SM section */ + UINT32 connSelfTimeout; + + /* auth SM section */ + UINT32 authResponseTimeout; + + /* assoc SM section */ + UINT32 assocResponseTimeout; +#ifndef GWSI_LIB + OS_802_11_ASSOCIATION_INFORMATION assocAssociationInformation; +#endif /* GWSI_LIB */ + + /* RSN section */ + BOOL rsnPrivacyOptionImplemented; + authSuite_e rsnDesiredAuthType; + OS_802_11_KEY rsnOsKey; + rsnAuthEncrCapability_t *pRsnAuthEncrCapability; + UINT32 rsnNoOfPMKIDs; + OS_802_11_PMKID rsnPMKIDList; + UINT32 rsnWPAPromoteFlags; + UINT32 rsnWPAMixedModeSupport; + UINT32 rsnAuthState; /* supp_1XStates */ + cipherSuite_e rsnEncryptionStatus; + UINT8 rsnHwEncDecrEnable; /* 0- disable, 1- enable*/ + securityKeys_t *pRsnKey; + UINT8 rsnDefaultKeyID; + + externalAuthMode_e rsnExtAuthneticationMode; + BOOL rsnMixedMode; + BOOL rsnPreAuthStatus; + macAddress_t rsnApMac; + OS_802_11_EAP_TYPES eapType; + BOOL wpa_802_1x_AkmExists; + + + /* Rx Data section */ + rxDataCounters_t rxDataCounters; + BOOL rxDataFilterEnableDisable; + TIWLAN_DATA_FILTER_REQUEST rxDataFilterRequest; + + /* Tx Data section */ + portStatus_e txDataPortStatus; + txDataCounters_t *pTxDataCounters; + reportTsStatisticsReq_t tsMetricsCounters; + OS_802_11_THRESHOLD_CROSS_PARAMS txDataMediumUsageThreshold; + txDataHalInterfaceStatus_t txDataHalInterfaceStatus; + UINT8 txDataEncryptionFieldSize; + + /* Ctrl Data section */ + ctrlDataCounters_t ctrlDataCounters; + BOOL ctrlDataRateControlEnable; + BOOL ctrlDataPowerSaveEnable; + BOOL ctrlDataPowerSaveForce; + BOOL ctrlDataFourXEnable; + BOOL ctrlDatapowerSaveEnhanceAlgorithm; + erpProtectionType_e ctrlDataIbssProtecionType; + RtsCtsStatus_e ctrlDataRtsCtsStatus; + BOOL ctrlDataProtectionEnabled; + BOOL ctrlDataCerruentFourXstate; + + macAddress_t ctrlDataCurrentBSSID; + bssType_e ctrlDataCurrentBssType; + UINT32 ctrlDataCurrentRateMask; + rate_e ctrlDataCurrentBasicRate; + preamble_e ctrlDataCurrentPreambleType; + rate_e ctrlDataCurrentActiveRate; + macAddress_t ctrlDataDeviceMacAddress; + STREAM_TRAFFIC_PROPERTIES ctrlDataUpOfStream; + clsfr_tableEntry_t ctrlDataClsfrInsertTable; + clsfrTypeAndSupport ctrlDataClsfrType; + OS_802_11_THRESHOLD_CROSS_PARAMS ctrlDataRateThreshold; + rateClassClients_e ctrlDataRateClassID; + rateClassRateMask_t ctrlDataRateClassMask; + + ULONG ctrlDataTrafficIntensityEventsFlag; + OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficIntensityThresholds; + + connectionType_e connType; + + /* MLME SM section */ + legacyAuthType_e mlmeLegacyAuthType; + legacyAuthType_e authLegacyAuthType; + BOOL mlmeReAssoc; + + + BOOL rxDataExcludeUnencrypted; + eapolDestination_e rxDataEapolDestination; + portStatus_e rxDataPortStatus; + + BOOL txDataCurrentPrivacyInvokedMode; + BOOL txDataEapolEncryptionStatus; + UINT32 txDataPollApPacketsFromACid; /* AC to poll AP packets from */ + + modulationType_e ctrlDataCurrentModulationType; + modulationType_e ctrlDataCurrentBasicModulationType; + UINT32 ctrlDataBasicRateBitMask; + + /* regulatory Domain section */ + regulatoryDomainParam_t regulatoryDomainParam; + UINT8 channel; + country_t* pCountry; + UINT8 pCountryString[COUNTRY_STRING_LEN]; + BOOL spectrumManagementEnabled; + BOOL regulatoryDomainEnabled; + powerCapability_t powerCapability; + UINT8* pSupportedChannel; + UINT8 powerConstraint; + UINT8 desiredTxPower; /* The desired Tx power inforced by the User (Utility), + or The desired Tx power (in Dbm) as forced by teh OS */ + UINT8 ExternTxPowerPreferred; /*for other extern elements that want + to effect the transmit power*/ + powerLevelTable_t powerLevelTable; + channelValidity_t channelValidity; + channelCapabilityRet_t channelCapabilityRet; + channelCapabilityReq_t channelCapabilityReq; + supportedChannels_t supportedChannels; + BOOL enableDisable_802_11d; + BOOL enableDisable_802_11h; + BOOL bActivateTempPowerFix; + BOOL bIsCountryFound; + BOOL bIsChannelSupprted; + DFS_ChannelRange_t DFS_ChannelRange; + radioBand_e eRadioBand; + + /* Measurement Manager section */ + UINT32 measurementEnableDisableStatus; + UINT16 measurementTrafficThreshold; + UINT16 measurementMaxDuration; + interogateCmdCBParams_t interogateCmdCBParams; + + + /* soft Gemini section */ + SoftGeminiEnableModes_e SoftGeminiEnable; + UINT8 SoftGeminiRate[NUM_OF_RATES_IN_SG]; + UINT32 SoftGeminiParamArray[NUM_OF_CONFIG_PARAMS_IN_SG]; + + /* case EXC MODULE INCLUDED */ + EXC_PARAM_FIELDS + + /* Application Config Parameters Manager */ + applicationConfigBuffer_t applicationConfigBuffer; + roamingMngrConfigParams_t roamingConfigBuffer; + UINT32 roamingTriggerType; + UINT32 roamingConnStatus; + bssList_t* pScanBssList; + scan_Params_t* pScanParams; + + /* tx data qos related parameters */ + txDataQosParams_t txDataQosParams; + + txDataVadTimerParams_t txDataVadTimerParams; + + /* QOS Manager */ + qosProtocols_e qosSiteProtocol; + UINT8 qosPacketBurstEnb; /* Packet Burst Enable */ + dot11mode_e qosMngrOperationalMode; + UINT8 desiredPsMode; + UINT8 currentPsMode; + TspecConfigure_t TspecConfigure; + + /* Qos params from Os */ + 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_THRESHOLD_CROSS_PARAMS QOSRateThreshold; + OS_802_11_QOS_DESIRED_PS_MODE qosDesiredPsMode; + + /* + Power Manager + */ + PowerMgr_PowerMode_e PowerMode; + powerAutho_PowerPolicy_e PowerSavePowerLevel; + powerAutho_PowerPolicy_e DefaultPowerLevel; + PowerMgr_PowerMode_t powerMngPowerMode; + PowerMgr_Priority_e powerMngPriority; + PowerMgr_PowerMode_e powerMngDozeMode; + + + /* txRatePolicy params */ + txRatePolicy_t TxRatePolicy; + + TIWLN_RADIO_RX_QUALITY RxRadioQuality ; + + /*PLT MIB*/ + PLT_MIB_t PltMib; + + } content; +}paramInfo_t; + +/* Set/get params function prototype */ +typedef TI_STATUS (*paramFunc_t)(TI_HANDLE handle, paramInfo_t *pParam); + + +typedef enum +{ + MIN_BASIC_TX_RATE = 0, /* The rate of the CTL & MGMT packets will be the minimal rate advertised in the Basic rate set */ + MAX_BASIC_TX_RATE = 1, /* The rate of the CTL &MGMT packets will be the maximal rate advertised in the Basic rate set */ + SPECIFIC_TX_RATE = 2, /* The rate of the CTL & MGMT packets will be according to the configuration in the MgmtCtrlTxRate registry */ +} mgmtCtrlTxRateOption_e; + + + +/*-----------------------------------------------------*/ +/* EEPROM-less support */ +/*-----------------------------------------------------*/ +#define MAX_CALL_DATA_REG_NUM 30 +#define HW_EEPROM_PRESENTED 1 +#define HW_EEPROM_NOT_PRESENTED 0 + +PACKED_STRUCT( ELPTable_t, + + UINT8 ClockControl; + UINT16 ClockWakupTime; + UINT8 Reserved1; + UINT16 Reserved2; + UINT8 A_1_8_Control; + UINT16 A_1_8_WakeupTime; + UINT8 VsyncControl; + UINT16 VsyncWakeupTime; + UINT8 GcVccControl; + UINT16 GcVccWakeupTime; + UINT8 Reserved3; + UINT16 BBRadioWakeupTime; + UINT8 Reserved4; + UINT16 ClockIdleTime; + +); + +PACKED_STRUCT( MiscTable_t, + + UINT16 TxActivityLED; + UINT16 InitLED; + UINT16 DiagLED; + UINT8 Reserved1; + +); + + +PACKED_STRUCT( PhyRegisters_t, + + UINT16 RegAddress; + UINT16 RegValue; + +); + + +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 +{ + UINT8 siteMgr_radioRxLevel[RX_LEVEL_TABLE_SIZE]; + UINT8 siteMgr_radioLNA[RX_LEVEL_TABLE_SIZE]; + UINT8 siteMgr_radioRSSI[RX_LEVEL_TABLE_SIZE]; + UINT32 factorRSSI; /* for RADIA only */ +}radioValues_t; + +typedef struct +{ + radioType_e siteMgr_radioType; + UINT8 RxLevelTableSize; + radioValues_t* pSiteMgr_selectedRadioValues; + radioValues_t siteMgr_rfmdRadioValues; + radioValues_t siteMgr_maximRadioValues; + radioValues_t siteMgr_radiaRadioValues; +}siteMgr_radioValues_t; + + +typedef struct +{ + UINT8 siteMgrDesiredChannel; + macAddress_t siteMgrDesiredBSSID; + ssid_t siteMgrDesiredSSID; + bssType_e siteMgrDesiredBSSType; + dot11mode_e siteMgrDesiredDot11Mode; + radioBand_e siteMgrSupportedBand; + draftNumber_t siteMgrUseDraftNum; + UINT32 siteMgrRegstryBasicRate[DOT11_MAX_MODE]; + UINT32 siteMgrRegstrySuppRate[DOT11_MAX_MODE]; + UINT32 siteMgrRegstryBasicRateMask; + UINT32 siteMgrRegstrySuppRateMask; + rateMask_t siteMgrCurrentDesiredRateMask; + ratePair_t siteMgrDesiredRatePair; + UINT32 siteMgrMatchedBasicRateMask; + UINT32 siteMgrMatchedSuppRateMask; + UINT32 siteMgrMatchedMaxBasicRate; + UINT32 siteMgrMatchedMaxActiveRate; + rate_e siteMgrRegstryDesiredTxRate; + rate_e siteMgrCurrentDesiredTxRate; + mgmtCtrlTxRateOption_e siteMgrRegstryDesiredMgmtCtrlTxRateOption; + rate_e siteMgrRegstryDesiredMgmtCtrlTxRate; + modulationType_e siteMgrDesiredModulationType; + preamble_e siteMgrDesiredPreambleType; + slotTime_e siteMgrDesiredSlotTime; + UINT16 siteMgrDesiredBeaconInterval; + siteMgr_radioValues_t siteMgrRadioValues; + UINT8 siteMgrFwVersion[FW_VERSION_LEN]; /* Firmware version - null terminated string*/ + e2Version_t siteMgrEEpromVersion; /* EEPROM version*/ + UINT32 siteMgrDesiredAtimWindow; + UINT32 siteMgrFreq2ChannelTable[SITE_MGR_CHANNEL_MAX+1]; + + BOOL siteMgrDesiredkeepAliveEnable; + UINT8 siteMgrExternalConfiguration; + UINT8 siteMgrPrivacyMode; + BOOL siteMgrWiFiAdhoc; + + /* TX Power Control parameters */ + UINT32 TxPowerCheckTime; + UINT32 TxPowerControlOn; + INT32 TxPowerRssiThresh; + INT32 TxPowerRssiRestoreThresh; + + beaconFilterParams_t beaconFilterParams; /*contains the desired state*/ + +} siteMgrInitParams_t; + + +/** \struct scan_Params_t + * \brief This structure contains parameters for a scan operation + */ +typedef struct +{ + UINT8 txPowerDbm; /* In units of Dbm/10 */ + UINT8 probeReqNumber; /**< number of probe requests to send (for active scan) */ + rateMask_e probeRequestRate; /**< the rate at which to send the probe requests */ + UINT8 numOfChannels; /**< number of channels for BG (2.4) band */ + UINT8 channelsList[ MAX_NUMBER_OF_CHANNELS_PER_SCAN ]; /* scan channels list for BG */ + UINT32 minDwellTime; + UINT32 maxDwellTime; +} sme_scan_Params_t; + + +typedef struct +{ + BOOL EnableFirstConnScan; + UINT32 InterScanIntervalMin; + UINT32 InterScanIntervalMax; + UINT32 InterScanIntervalDelta; + sme_scan_Params_t scanParamsBG; + sme_scan_Params_t scanParamsA; +} smeInitParams_t; + +typedef struct +{ + UINT32 connSelfTimeout; +} connInitParams_t; + +typedef struct +{ + UINT32 authResponseTimeout; + UINT32 authMaxRetryCount; +} authInitParams_t; + +typedef struct +{ + UINT32 assocResponseTimeout; + UINT32 assocMaxRetryCount; +} assocInitParams_t; + +typedef struct +{ + UINT8 highRateThreshold; + UINT8 lowRateThreshold; + BOOL enableEvent; +}tspecsRateParameters_t; + +typedef struct +{ + UINT8 contTxPacketsThreshold; + UINT8 stepUpTxPacketsThreshold; + UINT32 ctrlDataFBShortInterval; + UINT32 ctrlDataFBLongInterval; + UINT32 rateAdapt_timeout; + tspecsRateParameters_t tspecsRateParameters[MAX_NUM_OF_AC]; + +}rateAdaptationInitParam_t; + + +typedef struct +{ + BOOL ctrlDataPowerSaveEnhanceAlgorithm; + UINT16 ctrlDataPowerSaveTimeOut; + UINT8 ctrlDataPowerSaveTxThreshold; + UINT8 ctrlDataPowerSaveRxThreshold; + +}powerSaveInitParams_t; + +typedef struct +{ + BOOL desiredConcatenationEnable; + BOOL desiredCWMinEnable; + BOOL desiredCWComboEnable; + BOOL desiredAckEmulationEnable; + BOOL desiredERP_ProtectionEnable; + UINT32 desiredMaxConcatSize; + UINT16 desiredCWMin; + UINT16 desiredCWMax; +}fourXInitParams_t; + + +typedef struct +{ + UINT32 len; + rate_e rateAdaptRatesTable[MAX_SUPPORTED_RATES]; + UINT8 rateAdaptFBTable[MAX_SUPPORTED_RATES]; + UINT8 rateAdaptSUTable[MAX_SUPPORTED_RATES]; +} ctrlData_rateAdapt_t; + +typedef struct +{ + ctrlData_rateAdapt_t ctrlDataCckRateTable; + ctrlData_rateAdapt_t ctrlDataPbccRateTable; + ctrlData_rateAdapt_t ctrlDataOfdmRateTable; + ctrlData_rateAdapt_t ctrlDataOfdmARateTable; +} rateTables_t; + +typedef struct +{ + UINT8 longRetryLimit; + UINT8 shortRetryLimit; +}txRatePolicyParams; + +typedef struct +{ + UINT8 txRate[MAX_NUM_OF_TX_RATES_IN_CLASS]; +} policyClassRatesArray_t; + +typedef struct +{ + BOOL ctrlDataRateControlEnable; + BOOL ctrlDataPowerSaveEnable; + BOOL ctrlDataFourXEnable; + BOOL ctrlDataSoftGeminiEnable; + macAddress_t ctrlDataDeviceMacAddress; + rateAdaptationInitParam_t rateAdaptationInitParam; + powerSaveInitParams_t powerSaveInitParams; + fourXInitParams_t fourXInitParams; + clsfr_Params_t ClsfrInitParam; + rateTables_t rateTable; + erpProtectionType_e ctrlDataDesiredIbssProtection; + RtsCtsStatus_e ctrlDataDesiredCtsRtsStatus; + OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficThreshold; + BOOL ctrlDataTrafficThresholdEnabled; + txRatePolicyParams ctrlDataTxRatePolicy [NUM_OF_RATE_CLASS_CLIENTS]; + policyClassRatesArray_t policyClassRatesArrayCck [NUM_OF_RATE_CLASS_CLIENTS]; + policyClassRatesArray_t policyClassRatesArrayPbcc [NUM_OF_RATE_CLASS_CLIENTS]; + policyClassRatesArray_t policyClassRatesArrayOfdm [NUM_OF_RATE_CLASS_CLIENTS]; + policyClassRatesArray_t policyClassRatesArrayOfdmA[NUM_OF_RATE_CLASS_CLIENTS]; + +} ctrlDataInitParams_t; + +typedef struct +{ + UINT8 txDataNumOfDataQueues; + UINT32 uFracOfLifeTimeToDrop; + UINT32 creditCalculationTimeout; + BOOL admCtrlDelayDueToMediumTimeOverUsage; + BOOL admissionDownGradeEnable; + BOOL bCreditCalcTimerEnabled; + /* IMPORT_FROM_4_0_1 */ + BOOL txDataHostPacketProcessing; + +} txDataInitParams_t; + +#define MAX_KEYS_NUM 4 + +typedef struct +{ + authSuite_e authSuite; + BOOL privacyOn; + securityKeys_t keys[MAX_KEYS_NUM]; + UINT8 defaultKeyId; + externalAuthMode_e externalAuthMode; + BOOL mixedMode; + BOOL WPAMixedModeEnable; + BOOL preAuthSupport; + UINT32 preAuthTimeout; +} rsnInitParams_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 +{ + UINT32 uTimeOutToResetCountryMs; /* Time after which country code will be reset */ + UINT8 multiRegulatoryDomainEnabled; /* 802.11d */ + UINT8 spectrumManagementEnabled; /* 802.11h */ + UINT8 desiredTxPower; + UINT8 uTemporaryTxPower; + scanControlTable_t desiredScanControlTable;/* for 5 and 2.4 Ghz*/ +} regulatoryDomainInitParams_t; + +#ifdef EXC_MODULE_INCLUDED +typedef enum +{ + EXC_MODE_DISABLED, + EXC_MODE_ENABLED, + EXC_MODE_STANDBY +} excMngr_mode_t; + +typedef struct +{ + excMngr_mode_t excEnabled; +} excMngrParams_t; +#endif + +/* Measurement module init parameters */ +typedef struct +{ + UINT16 trafficIntensityThreshold; + UINT16 maxDurationOnNonServingChannel; +#ifdef EXC_MODULE_INCLUDED + excMngr_mode_t excEnabled; +#endif +} measurementInitParams_t; + +/* Switch Channel Module module init parameters */ +typedef struct +{ + BOOL dot11SpectrumManagementRequired; + +} SwitchChannelInitParams_t; + +typedef struct +{ + UINT32 qosClassifierTable[MAX_NUM_OF_802_1d_TAGS]; +} +clsfrParams_t; + +/* WDK pack structure */ +#ifdef _WINDOWS +#endif + +typedef struct +{ + PowerMgr_PowerMode_e powerMode; + UINT32 beaconReceiveTime; + UINT8 hangoverPeriod; + UINT8 beaconListenInterval; + UINT8 dtimListenInterval; + UINT8 nConsecutiveBeaconsMissed; + UINT8 EnterTo802_11PsRetries; + UINT8 HwPsPollResponseTimeout; + UINT16 autoModeInterval; + UINT16 autoModeActiveTH; + UINT16 autoModeDozeTH; + PowerMgr_PowerMode_e autoModeDozeMode; + + powerAutho_PowerPolicy_e defaultPowerLevel; + powerAutho_PowerPolicy_e PowerSavePowerLevel; + + + /* powerMgmtConfig IE */ + UINT8 mode; + UINT8 needToSendNullData; + UINT8 numNullPktRetries; + UINT8 hangOverPeriod; + UINT16 NullPktRateModulation; + + /* PMConfigStruct */ + UINT32 ELPEnable; /* based on "elpType" */ + UINT32 WakeOnGPIOenable; /* based on "hwPlatformType" */ + UINT32 BaseBandWakeUpTime; /* BBWakeUpTime */ + UINT32 PLLlockTime; + + /* ACXWakeUpCondition */ + UINT8 listenInterval; + + /* BET */ + UINT32 MaximalFullBeaconReceptionInterval; /* maximal time between full beacon reception */ + UINT8 BetEnableThreshold; + UINT8 BetDisableThreshold; + UINT8 BetEnable; + UINT8 MaximumConsecutiveET; + + UINT32 PsPollDeliveryFailureRecoveryPeriod; +}PowerMgrInitParams_t; + + +typedef struct +{ + UINT32 healthCheckPeriod; + UINT8 FullRecoveryEnable; + BOOL recoveryTriggerEnabled[ MAX_FAILURE_EVENTS ]; +} healthMonitorInitParams_t; + +typedef struct +{ + BOOL ignoreDeauthReason0; +} apConnParams_t; + +typedef struct +{ + UINT32 passiveScanDwellTime; + UINT32 minimumDurationBetweenOidScans; +} scanConcentratorInitParams_t; + + +typedef struct +{ + BOOL rxDataHostPacketProcessing; + BOOL rxDataFiltersEnabled; + filter_e rxDataFiltersDefaultAction; + rxDataFilterRequest_t rxDataFilterRequests[MAX_DATA_FILTERS]; +}rxDataInitParams_t; + + +typedef struct +{ + uint32 activeTimeCnt_Low; + uint32 activeTimeCnt_Hi; + uint32 powerDownTimeCnt_Low; + uint32 powerDownTimeCnt_Hi; + uint32 elpTimeCnt_Low; + uint32 elpTimeCnt_Hi; +}PowerConsumptionTimeStat_t; + + +/* This table is forwarded to the driver upon creation by the Os abstraction layer. */ +typedef struct +{ + TnetwDrv_InitParams_t TnetwDrv_InitParams; + + siteMgrInitParams_t siteMgrInitParams; + connInitParams_t connInitParams; + authInitParams_t authInitParams; + assocInitParams_t assocInitParams; + txDataInitParams_t txDataInitParams; + ctrlDataInitParams_t ctrlDataInitParams; + rsnInitParams_t rsnInitParams; + regulatoryDomainInitParams_t regulatoryDomainInitParams; + measurementInitParams_t measurementInitParams; + smeInitParams_t smeInitParams; + SoftGeminiInitParams_t SoftGeminiInitParams; + QosMngrInitParams_t qosMngrInitParams; + clsfrParams_t clsfrParams; +#ifdef EXC_MODULE_INCLUDED + excMngrParams_t excMngrParams; +#endif + SwitchChannelInitParams_t SwitchChannelInitParams; + healthMonitorInitParams_t healthMonitorInitParams; + apConnParams_t apConnParams; + PowerMgrInitParams_t PowerMgrInitParams; + scanConcentratorInitParams_t scanConcentratorInitParams; + rxDataInitParams_t rxDataInitParams; + BOOL SendINIBufferToUser; + /* Traffic Monitor */ + UINT8 trafficMonitorMinIntervalPercentage; +} initTable_t; + +/* WDK end usage of packing */ +#ifdef _WINDOWS +#endif + +/**************************** End of Init Params ************************************/ + + + +#define P_BUFFER_ADD_UINT8(_p_buffer, _uint8) \ + { \ + *(tiUINT8 *)(_p_buffer++) = _uint8; \ + } + +#define P_BUFFER_ADD_UINT16(_p_buffer, _uint16) \ + { \ + *(tiUINT8 *)(_p_buffer++) = (_uint16 & 0x00FF); \ + *(tiUINT8 *)(_p_buffer++) = ((_uint16 & 0xFF00) >> 8);\ + } + +#define P_BUFFER_ADD_UINT32(_p_buffer, _uint32) \ +{ \ + *(tiUINT8 *)(_p_buffer++) = (_uint32 & 0x000000FF); \ + *(tiUINT8 *)(_p_buffer++) = ((_uint32 & 0x0000FF00) >> 8); \ + *(tiUINT8 *)(_p_buffer++) = ((_uint32 & 0x00FF0000) >> 16);\ + *(tiUINT8 *)(_p_buffer++) = ((_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 = *(tiUINT8 *)(_p_buffer++); \ + } + +#define P_BUFFER_GET_UINT16(_p_buffer, _uint16) \ + { \ + _uint16 = *(tiUINT8 *)(_p_buffer++); \ + _uint16 |= (*(tiUINT8 *)(_p_buffer++) << 8); \ + } + + +#define P_BUFFER_GET_UINT32(_p_buffer, _uint32) \ + { \ + _uint32 = *(tiUINT8 *)(_p_buffer++); \ + _uint32 |= (*(tiUINT8 *)(_p_buffer++) << 8); \ + _uint32 |= (*(tiUINT8 *)(_p_buffer++) << 16); \ + _uint32 |= (*(tiUINT8 *)(_p_buffer++) << 24); \ + } + +#define P_BUFFER_ADD_HDR_PARAMS(_p_buffer, _op, _status) \ + { \ + *(tiUINT8 *)(_p_buffer + 0) = (_op & 0x00FF); \ + *(tiUINT8 *)(_p_buffer + 1) = ((_op & 0xFF00) >> 8);\ + *(tiUINT8 *)(_p_buffer + 2) = _status; \ + _p_buffer += 3; \ + } + + + + +#endif /* __PARAM_OUT_H__ */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_commands.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_commands.h new file mode 100644 index 0000000..38dde06 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_commands.h @@ -0,0 +1,1693 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 PUBLIC_COMMANDS_H +#define PUBLIC_COMMANDS_H + + +#include "public_types.h" +#include "public_radio.h" + +typedef enum +{ + CMD_RESET = 0, + 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_VBM = 10, + CMD_START_JOIN = 11, + CMD_SET_KEYS = 12, + CMD_READ_MEMORY = 13, + CMD_WRITE_MEMORY = 14, + + CMD_BEACON = 19, + CMD_PROBE_RESP = 20, + CMD_NULL_DATA = 21, + CMD_PROBE_REQ = 22, + CMD_TEST = 23, + + CMD_RADIO_CALIBRATE = 25, /* OBSOLETE !!!*/ + + CMD_ENABLE_RX_PATH = 27, /* OBSOLETE !!! (what is the difference from CMD_ENABLE_RX)*/ + CMD_NOISE_HIST = 28, + CMD_RX_RESET = 29, + + CMD_PS_POLL = 30, + CMD_QOS_NULL_DATA = 31, + + 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, + +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 + + +#ifdef FW_RUNNING_AS_STA +#define MAX_CMD_PARAMS 572 +#else +#define MAX_CMD_PARAMS 384 +#endif + +#define DEBUG_INDICATOR 0x8000 + +typedef struct +{ + Command_e cmdID; + CommandStatus_e cmdStatus; + uint8 parameters[MAX_CMD_PARAMS]; +} Command_t; + + +/****************************************************************************** + + ID: CMD_RESET + Desc: This command resets all state machines in the WiLink to their power + up state and restarts the eCPU. This command has no parameters. After + issuing this command, the host must reconfigure the adapter before + normal operations resume. + In general, the host should only use this command if the WiLink has + stopped functioning properly. + Params: None. + Note: The WiLink does not return a response/status message for this command. + +******************************************************************************/ + + +/****************************************************************************** + + 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 +{ +#ifdef FW_RUNNING_AS_AP + uint16 ConfigOptions; + uint16 FilterOptions; +#else + uint32 ConfigOptions; + uint32 FilterOptions; +#endif +} ACXRxConfigStruct; + +/* +TxdRateSet_t definition +Bit Description +=== =========== +0-12 Every one of bits 0-12 specifies rate described in the column on left. Only + one bit could be set for the command, all other should be zeroed. +0 1 MBPS +1 2 MBPS +2 5.5 MBPS +3 6 MBPS +4 9 MBPS +5 11 MBPS +6 12 MBPS +7 18 MBPS +8 22 MBPS +9 24 MBPS +10 36 MBPS +11 48 MBPS +12 54 MBPS +13 Unused (set to 0). +14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC + modulation. + Notes: + Does not apply (set to 0) for rates 1 and 2 Mbps. + Does not apply (set to 0) for RevG-OFDM rates. +15 Preamble - When this bit is set, the WiLink transmits probe requests with a + short preamble. When this bit is clear, the WiLink transmits the + frame with a long preamble. + Notes: + Must be LONG (0) for 1Mbps rate. + Does not apply (set to 0) for RevG-OFDM rates. + +If neither the PBCC bit or OFDM rate are set, then the modulation format for probe +requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps. +*/ + +/* 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 4 /* 1 = Triggered scan, 0 = Normal scan*/ +#define SCAN_PRIORITY_HIGH 8 /* 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 [3:15] are reserved. */ + /* Bits [0:2] 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. */ + + TxdRateSet_t txdRateSet; /* This bitwise field specifies the rate and */ + /* modulation to transmit the probe request during*/ + /* an active scan. The allowable values for this */ + /* field are listed in the above table (refer to */ + /* TxdRateSet). 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. */ + + 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) */ +} BasicScanParameters_t; + + + +#define SCAN_ET_COND_MASK 0x30 +#define SCAN_ET_COUNT_MASK 0x0F + +#define SCAN_MAX_NUM_OF_CHANNELS 16 + +/* 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). */ + uint8 padding[3]; /* 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_VBM + Desc: This command specifies the contents of the beacon TIM template stored + in the WiLink. + Params: VBMUpdateRequest_t - see below. + Note: Second part of Beacon template + +******************************************************************************/ +typedef struct +{ + uint8 identity; /* TIM IE ID*/ + uint8 length; /* TIM IE Length*/ + uint8 DTIM_count; + uint8 DTIM_period; + uint8 BitMap_ctrl; + uint8 PVB_field[251]; /* Partial Virtual Bitmap*/ +} TIMStruct_t; + + +typedef struct +{ + uint16 len; /* length*/ + uint8 padding[2]; /* for alignment to 32 bits boundry*/ + TIMStruct_t tim; +} VBMUpdateRequest_t; + + +/****************************************************************************** + + 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. + +******************************************************************************/ + +#define JOIN_CMD_CTRL_TX_FLUSH 0x80 // When this bit is set, the firmware will flush all Tx + // frames in the pipe and will not transmit them. +#define JOIN_CMD_CTRL_EARLY_WAKEUP_ENABLE 0x01 // When this bit is set, the firmware will support + // early wakeup time + +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 +/* +BasicRateSet_t definition +Bit Description +=== =========== +0 When this bit is set, 1 MBPS is a member of the basic rate set. +1 When this bit is set, 2 MBPS is a member of the basic rate set. +2 When this bit is set, 5.5 MBPS is a member of the basic rate set. +3 Must be set to 0. +4 Must be set to 0. +5 When this bit is set, 11 MBPS is a member of the basic rate set. +6 Must be set to 0. +7 Must be set to 0. +8 When this bit is set, 22 MBPS is a member of the basic rate set. +9-15 Must be set to 0. + +Note: For OFDM, the control response frame rates 6, 9, 12, 18, 24 and 36 Mbps are the + default values and are not configurable. Contact your TI representative for + information. +*/ + + +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.*/ + +#ifdef FW_RUNNING_AS_STA + 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.*/ +#endif + BasicRateSet_t 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). The format of this field is */ + /* shown in the above table (refer to */ + /* BasicRateSet_t).*/ + + 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.*/ + + Rate_e txCtrlFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/ + Mod_e txCtrlFrmMod; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/ + + 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 */ + /* JoinCmdCtrl_enum).*/ + + Rate_e txMgmtFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/ + Mod_e txMgmtFrmMod; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/ + uint8 reserved1; +} 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 + +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; + +/* +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 +*/ + +#ifdef HOST_COMPILE +typedef uint8 KeyType_e; +#else +typedef KeyType_enum KeyType_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". */ + + KeyType_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.*/ +#define MAX_TEMPLATES_SIZE 300 +typedef struct +{ + uint16 len; + uint8 templateStart[MAX_TEMPLATES_SIZE]; +} PktTemplate_t; + + +/****************************************************************************** + + 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: TestCmd_t - see below. + The returned values are copied to the cmd/sts MB replacing the command + (similar to the interrogate mechanism). + +******************************************************************************/ +typedef enum +{ + TEST_CMD_FCC = 0x01, + TEST_CMD_TELEC = 0x02, + TEST_CMD_PLT_FCC_TELEC_TX_STOP = 0x04, + TEST_CMD_PLT_GAIN_GET = 0x05, + TEST_CMD_PLT_GAIN_ADJUST = 0x06, + TEST_CMD_PLT_TXPOWER_CAL_START = 0x07, + TEST_CMD_PLT_TXPOWER_CAL_STOP = 0x08, + TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER = 0x09, + TEST_CMD_PLT_RX_CALIBRATION = 0x0a, + TEST_CMD_RADIO_TUNE = 0x0b, + TEST_CMD_RX_PER_START = 0x0c, + TEST_CMD_RX_PER_STOP = 0x0d, + MAX_TEST_CMD_ID = 0xFF +} TestCmdID_enum; + +#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) + +/****************************************************************************** + + 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_TELEC + + Description: Generate carrier wave in a specific channel and band + + Params: TestCmdChannelBand_t telec - see below. + +******************************************************************************/ +typedef struct +{ + /*input parameters*/ + Channel_e channel; /*Channel number*/ + RadioBand_e band; /* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */ + uint8 padding[2]; /* padding to 32 bit */ +} TestCmdChannelBand_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 PltRxCalibrationRequest_t +{ + int32 expectedRssi; /* The calibration generated signal power (db) */ + int32 intervalBetweenSamplesUsec; /* uSec - recommended value 100 */ + uint8 channel; + RadioBand_e band; + int16 numOfSamples; /* recommended value 1000*/ +}PltRxCalibrationRequest_t; + +/****************************************************************************** + +TestCmdId : TEST_CMD_PLT_TXPOWER_CAL_START + +Description: + +Params: PltTxCalibrationRequest_t + +******************************************************************************/ +typedef struct +{ + uint8 refTxPower; + uint8 padding[3]; +}PltTxCalibrationRequest_t; + +/****************************************************************************** + TestCmd_t - the main PLT structure +*******************************************************************************/ +typedef struct TestCmd_t +{ + union + { + PERTxCfg_t fcc; + TestCmdChannelBand_t telec; + PltGainGet_t gainGet; + PltNvsResultsBuffer_t nvsUpdateBuffer; + PltRxCalibrationRequest_t rxCalibration; + uint32 txGainAdjust; + TestCmdChannelBand_t radioTune; + PltTxCalibrationRequest_t txCalibration; + }testCmd_u; + TestCmdID_e testCmdId; + int8 padding[3]; +}TestCmd_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_RX_RESET + Desc: This command resets the MAC Rx path. After the command is issued, + the MAC Rx path is reset the next time a frame is received (in the PHY + Rx Header interrupt). + Params: None. + Note: This command is for TI internal use only. + +******************************************************************************/ + + +/****************************************************************************** + + 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 padding[2]; /* 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 struct +{ + ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the*/ + /* device that is set after the disconnection is */ + /* complete. */ + + +} 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 + +/* +TxdRateSet_t definition +Bit Description +=== =========== +0-12 Every one of bits 0-12 specifies rate described in the column on left. Only + one bit could be set for the command, all other should be zeroed. +0 1 MBPS +1 2 MBPS +2 5.5 MBPS +3 6 MBPS +4 9 MBPS +5 11 MBPS +6 12 MBPS +7 18 MBPS +8 22 MBPS +9 24 MBPS +10 36 MBPS +11 48 MBPS +12 54 MBPS +13 Unused (set to 0). +14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC + modulation. +15 Preamble - When this bit is set, the WiLink transmits probe requests with a + short preamble. When this bit is clear, the WiLink transmits the + frame with a long preamble. + +If neither the PBCC bit or OFDM rate are set, then the modulation format for probe +requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps. +*/ + +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.*/ + + TxdRateSet_t rateToTransmitNullData; /* This bitwise field specifies the rate and */ + /* modulation to transmit the Null data packet*/ + /* to the AP. refer to above table */ + /* (TxdRateSet_t). */ + + uint8 padding[2]; /* for alignment to 32 bits boundry*/ +} 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. + +******************************************************************************/ +/* +TxdRateSet_t definition +Bit Description +=== =========== +0-12 Every one of bits 0-12 specifies rate described in the column on left. Only + one bit could be set for the command, all other should be zeroed. +0 1 MBPS +1 2 MBPS +2 5.5 MBPS +3 6 MBPS +4 9 MBPS +5 11 MBPS +6 12 MBPS +7 18 MBPS +8 22 MBPS +9 24 MBPS +10 36 MBPS +11 48 MBPS +12 54 MBPS +13 Unused (set to 0). +14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC + modulation. + Notes: + Does not apply (set to 0) for rates 1 and 2 Mbps. + Does not apply (set to 0) for RevG-OFDM rates. +15 Preamble - When this bit is set, the WiLink transmits probe requests with a + short preamble. When this bit is clear, the WiLink transmits the + frame with a long preamble. + Notes: + Must be LONG (0) for 1Mbps rate. + Does not apply (set to 0) for RevG-OFDM rates. + +If neither the PBCC bit or OFDM rate are set, then the modulation format for probe +requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps. +*/ +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 EXC 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. */ + + TxdRateSet_t txdRateSet; /* This bitwise field specifies the rate and modulation*/ + /* to transmit the probe request when an active scan is*/ + /* specified. Refer to above descrption ob TxdRateSet.*/ + uint8 padding[3]; /* for alignment to 32 bits boundry*/ +} 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. */ + /* Bits [0,2:15] are reserved. */ + /* Bit 1 is defined as follows:*/ + /* Band Select - 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. */ + + + uint8 numChannels; /* Number of scan channels in the list (minimum */ + /* (minimumis 1, maximum is 30).*/ + + uint8 padding; /* for alignment to 32 bits boundry*/ +} 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; + +/* 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/sta_dk/pform/linux/src/wlan_driver_inc/public_descriptors.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_descriptors.h new file mode 100644 index 0000000..87b41f5 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_descriptors.h @@ -0,0 +1,384 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 PUBLIC_DESCRIPTORS_H +#define PUBLIC_DESCRIPTORS_H + + +#include "public_types.h" + + +/****************************************************************************** + + TX PATH + + The Tx path uses a double buffer and a TxControl structure, each located at a + fixed address in the device's memory. On startup, the host retrieves the pointers + to these addresses. A double buffer allows for continuous data flow towards the + device. The host keeps track of which buffer is available and alternates between + these two buffers on a per packet basis. + The size of each of the two buffers is large enough to hold the longest 802.3 + packet - maximum size Ethernet packet + header + descriptor. + TX complete indication will be received a-synchronously in a TX done cyclic buffer + (txDoneRing) which is composed of 16 Tx Result Descriptors structures + and is used in a cyclic manner. refer to TxResultDescriptor_t structure. + + The TX (HOST) procedure is as follows: + 1. Read the Tx path status (DataOutCount in TxPathStatus). + 2. goto 1, if not possible. + i.e. if DataInCount - DataOutCount >= HwBuffer size (2 for double buffer)). + 3. Copy the packet (preceded by TxDescriptor), if possible. + i.e. if DataInCount - DataOutCount < HwBuffer size (2 for double buffer). + 4. increment DataInCount. + 5. Inform the firmware by generating a firmware internal interrupt. + 6. FW will increment DataOutCount after it reads the buffer. + + The TX Complete procedure: + 1. To get a TX complete indication the host enables the Tx Complete flag in the + TX Descriptor Structure (Refer to the Ctrl field in TxDescriptor_t). + 2. For each packet with a Tx Complete field set, the firmware adds the transmit + results to the cyclic buffer (txDoneRing) and sets both done1and done2 to 1 to + indicate driver ownership. + 3. The firmware sends a Tx Complete interrupt to the host to trigger the host to + process the new data. Note: interrupt will be send per packet if TX complete + indication was requested in TxDescriptor_t (see 1.) or per crossing Aggregation + threashold. + 4. After receiving the Tx Complete interrupt, the host reads the TxDescriptorDone + information in a cyclic manner and clears both done1 and done2 fields. + +******************************************************************************/ + +/****************************************************************************** + + TxDescriptor_t + + the structure of the transmit Tx descriptor passed from the host, ahead of + the transmitted packet. + +******************************************************************************/ + + +/* Because we are using a bit map, It is safer to enable the exact bits instead of field assignment */ +/* It is IMPORTENT to check that the bit defenitions are alligned to the bit map struct */ +#define TX_COMPLETE_REQUIRED_BIT 0x80 + +/* TX attribute fields (txAttr of TxDesriptor structure)*/ +/* ******************************************************/ +typedef struct +{ + unsigned ratePolicy :3; /* Rate Policy (class) index */ + unsigned ackPolicy :1; /* When set, no ack policy is expected*/ + unsigned pktType :2; /* packet type: */ + /* 0 - 802.11, */ + /* 1 - 802.3,*/ + /* 2 - IP, */ + /* 3 - raw codec */ + unsigned qosFrame :1; /* If set, this is QoS-Null or QoS-Data*/ + unsigned txCmpltRequired :1; /* If set, the FW should trigger the TxComplete*/ + /* interrupt for this packet*/ + unsigned xferPadding :1; /* If set, there is 2 bytes padding before */ + /* packet header*/ + unsigned reserved :7; /* padding*/ +} TxDescCtrl_t; + + +#ifdef HOST_COMPILE +typedef uint16 TxAttr_t; +#else +typedef TxDescCtrl_t TxAttr_t; +#endif + +/**************************************/ +/* Double Buffer Descriptor Fields */ +/**************************************/ + + + +#define DoubleBufferDesc uint16 length; /* Length of payload, including headers. */ \ + TxdRateSet_t rate; /* A bit mask that specifies the initial rate to be */ \ + /* used. Possible values are: */ \ + /* 0x0001 - 1Mbits */ \ + /* 0x0002 - 2Mbits */ \ + /* 0x0004 - 5.5Mbits */ \ + /* 0x0008 - 6Mbits */ \ + /* 0x0010 - 9Mbits */ \ + /* 0x0020 - 11Mbits */ \ + /* 0x0040 - 12Mbits */ \ + /* 0x0080 - 18Mbits */ \ + /* 0x0100 - 22Mbits */ \ + /* 0x0200 - 24Mbits */ \ + /* 0x0400 - 36Mbits */ \ + /* 0x0800 - 48Mbits */ \ + /* 0x1000 - 54Mbits */ \ + uint32 expiryTime; /* Time (in us) the packet can stay in the device */ \ + /* before the packet expires. */ \ + uint8 xmitQueue; /* The index of the Tx queue used for this packet. */ \ + uint8 descID; /* Identifier of the packet. This ID is used by the */ \ + /* host for identifying the Tx Result of packet. */ \ + TxAttr_t txAttr; /* Bitwise fields - see TxDescCtrl_tdefinition above */ \ + uint16 fragThreshold; /* The FW should cut the packet to fragments by */ \ + /* this size. */ \ + uint8 numMemBlks; /* Number of HW queue blocks to allocate for this */ \ + /* packet. */ \ + uint8 reserved; /* for padding to 32 bits boundry. */ \ + + + + +typedef struct +{ + DoubleBufferDesc +}DbTescriptor; + +/****************************************************************************** + + TxResultDescriptor_t + + the structure of the Tx result retrieved from FW upon TX completion. + +******************************************************************************/ + +typedef enum +{ + TX_SUCCESS = 0, + TX_DMA_ERROR = BIT_7, + TX_DISABLED = BIT_6, + TX_RETRY_EXCEEDED = BIT_5, + TX_TIMEOUT = BIT_4, + TX_KEY_NOT_FOUND = BIT_3, + TX_ENCRYPT_FAIL = BIT_2, + TX_UNAVAILABLE_PRIORITY = BIT_1 +} TxDescStatus_enum; + +#ifdef HOST_COMPILE +typedef uint8 TxDescStatus_e; +#else +typedef TxDescStatus_enum TxDescStatus_e; +#endif + +typedef struct +{ + uint8 done1; /* Ownership synchronization between the host and */ + /* the firmware. If done1 and done2 are cleared, */ + /* owned by the FW (no info ready). */ + + uint8 descID; /* Packet Identifier - same value used in the Tx */ + /* descriptor.*/ + + uint16 mediumUsage; /* Total air access duration consumed by this */ + /* packet, including all retrys and overheads.*/ + + uint32 mediumDelay; /* Total media delay (from 1st EDCA AIFS counter until TX Complete). */ + + uint32 fwHandlingTime; /* The time passed from host xfer to Tx-complete.*/ + + uint8 lsbSecuritySequenceNumber; /* The LS-byte of the last TKIP sequence number. */ + /* Saved per queue for recovery.*/ + + uint8 ackFailures; /* Retry count - The number of transmissions */ + /* without successful ACK reception.*/ + + TxdRateSet_t actualRate; /* The rate that succeeded getting ACK - */ + /* Valid only if status=TX_SUCCESS.*/ + + uint16 reserved; + + TxDescStatus_e status; /* The status of the transmission, indicating */ + /* success or one of several possible reasons for */ + /* failure. Refer to TxDescStatus_enum, above.*/ + + uint8 done2; /* Refer to done1.*/ +} TxResultDescriptor_t; + + + +/****************************************************************************** + + RX PATH + + The Rx path uses a double buffer and an RxControl structure, each located at + a fixed address in the device memory. On startup, the host retrieves the + pointers to these addresses. A double buffer allows for continuous data flow + towards the device. The host keeps track of which buffer is available and + alternates between them on a per packet basis. + The size of each of the two buffers is large enough to hold the longest 802.3 + packet. + A dedicated control block is used to manage the flow control between the host + and the device. The procedure is interrupt driven. + + The RX procedure is as follows: + 1. The device generates an interrupt each time a new packet is received and + the corresponding interrupt is enabled in the host. There are two different + interrupt sources, one for each buffer. It is possible that both interrupt + sources are set when both buffers in the double buffer are pending with Rx + data. + 2. Depending on flow control conditions, the host reads a packet from the + appropriate buffer in the double buffer. + 3. The host triggers an interrupt in the device (using the HW mechanism of EOT), + indicating the address of the buffer which has been read. + 4. The device services the complete interrupt and prepares the next Rx packet, + if available. In addition, the device updates the control block and issues + an interrupt to the host. + +******************************************************************************/ + +/****************************************************************************** + + RxPathStatusReg_t + + The structure of the Rx Path Status register. This status register + represents both the status of the double-buffer (xfer protocol) and the + number of the pending packet in receive queue. + +******************************************************************************/ + +#ifdef HOST_COMPILE +#define RX_DESC_VALID_FCS 0x0001 +#define RX_DESC_MATCH_RXADDR1 0x0002 +#define RX_DESC_MCAST 0x0004 +#define RX_DESC_STAINTIM 0x0008 +#define RX_DESC_VIRTUAL_BM 0x0010 +#define RX_DESC_BCAST 0x0020 +#define RX_DESC_MATCH_SSID 0x0040 +#define RX_DESC_MATCH_BSSID 0x0080 +#define RX_DESC_ENCRYPTION_MASK 0x0300 +#define RX_DESC_MEASURMENT 0x0400 +#define RX_DESC_SEQNUM_MASK 0x1800 +#define RX_DESC_MIC_FAIL 0x2000 +#define RX_DESC_DECRYPT_FAIL 0x4000 +typedef uint16 RxFlags_t; +#else +typedef struct +{ + unsigned validFcs : 1; /* Indicates whether a received frame had a valid FCS*/ + + unsigned matchRxAddr1 : 1; /* Indicates whether a received frame contained a */ + /* matching receive address in Address 1.*/ + + unsigned mcast : 1; /* Indicates whether a received frame contains a */ + /* unicast/directed or group receive address, bit 40*/ + /* of Addr1 (0 = individual, 1 = group).*/ + + unsigned StaInTIM : 1; /* Indicates that the TIM in a Beacon frame contained*/ + /* a 1 in the bit position representing this STA */ + /* (i.e. the AP contains one or more buffered frame(s)*/ + /* for this STA).*/ + + unsigned virtualBM : 1; /* If asserted, the VBM in a Beacon frame contained */ + /* more than 1 asserted bit*/ + + unsigned bcast : 1; /* Indicates whether the received frame?s address 1 */ + /* is a broadcast address.*/ + + unsigned matchSSID : 1; /* Indicates whether the received frame containing */ + /* a matching SSID (either broadcast or specific).*/ + + unsigned matchBSSID : 1; /* Indicates whether the received frame containing */ + /* a matching BSSID (either broadcast or specific).*/ + + unsigned encryption : 2; /* This field indicates the encryption type of the */ + /* packet: 00 - None, 01 - WEP, 10 - TKIP, 11 - AES*/ + + unsigned measurement : 1; /* Indicates whether the packet was received during */ + /* measurement process or not*/ + + unsigned seqnum : 2; /* Sequence number of the current frame*/ + + unsigned micFail : 1; /* MIC Fail indication */ + + unsigned decryptFail : 1; /* DECRYPT Fail indication */ + + unsigned reserved2 : 1; +} RxFlags_t; +#endif + +/****************************************************************************** + + RxIfDescriptor_t + + the structure of the Rx Descriptor recieved by HOST. + +******************************************************************************/ + +typedef struct +{ + uint32 timestamp; /* Timestamp in microseconds, */ + + uint16 length; /* Length of payload (including headers)*/ + + RxFlags_t flags; /* See RxFlags_t for details. */ + + uint8 type; /* Protocol type: */ + /* 0 - 802.11*/ + /* 1 - 802.3*/ + /* 2 - IP*/ + /* 3 - Raw Codec*/ + + uint8 rate; /* Recevied Rate:*/ + /* 0x0A - 1MBPS*/ + /* 0x14 - 2MBPS */ + /* 0x37 - 5_5MBPS */ + /* 0x0B - 6MBPS */ + /* 0x0F - 9MBPS */ + /* 0x6E - 11MBPS */ + /* 0x0A - 12MBPS */ + /* 0x0E - 18MBPS */ + /* 0xDC - 22MBPS */ + /* 0x09 - 24MBPS */ + /* 0x0D - 36MBPS */ + /* 0x08 - 48MBPS */ + /* 0x0C - 54MBPS */ + + uint8 modPre; /* Modulation and Preamble of received packet*/ + + uint8 chanNum; /* The received channel*/ + + uint8 band; /* 0 - 2.4Ghz*/ + /* 1 - 5Ghz*/ + + int8 rssi; /* RSSI value in db */ + + uint8 rcpi; /* RCPI value in db */ + + uint8 snr; /* SNR in db*/ + +} RxIfDescriptor_t; + + + +#endif /* PUBLIC_DESCRIPTORS_H*/ + + + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_event_mbox.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_event_mbox.h new file mode 100644 index 0000000..c5f9b26 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_event_mbox.h @@ -0,0 +1,239 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 public_event_mbox.h + * \brief 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" + + + +/************************************************************************* + + Events Enumeration + +**************************************************************************/ +typedef enum +{ + RESERVED1_EVENT_ID = BIT_0, + RESERVED2_EVENT_ID = BIT_1, + MEASUREMENT_START_EVENT_ID = BIT_2, + SCAN_COMPLETE_EVENT_ID = BIT_3, + CALIBRATION_COMPLETE_EVENT_ID = BIT_4, + ROAMING_TRIGGER_LOW_RSSI_EVENT_ID = BIT_5, + PS_REPORT_EVENT_ID = BIT_6, + SYNCHRONIZATION_TIMEOUT_EVENT_ID = BIT_7, + HEALTH_REPORT_EVENT_ID = BIT_8, + ACI_DETECTION_EVENT_ID = BIT_9, + DEBUG_REPORT_EVENT_ID = BIT_10, + MAC_STATUS_EVENT_ID = BIT_11, + DISCONNECT_EVENT_COMPLETE_ID = BIT_12, + JOIN_EVENT_COMPLETE_ID = BIT_13, + CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT_14, + BSS_LOSE_EVENT_ID = BIT_15, + ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID = BIT_16, + MEASUREMENT_COMPLETE_EVENT_ID = BIT_17, + AP_DISCOVERY_COMPLETE_EVENT_ID = BIT_18, + SCHEDULED_SCAN_COMPLETE_EVENT_ID = BIT_19, + PSPOLL_DELIVERY_FAILURE_EVENT_ID = BIT_20, + RESET_BSS_EVENT_ID = BIT_21, + REGAINED_BSS_EVENT_ID = BIT_22, + ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID = BIT_23, + ROAMING_TRIGGER_LOW_SNR_EVENT_ID = BIT_24, + ROAMING_TRIGGER_REGAINED_SNR_EVENT_ID = BIT_25, + + DBG_EVENT_ID = BIT_26, + SOFT_GEMINI_SENSE_EVENT_ID = BIT_27, + SOFT_GEMINI_PREDICTION_EVENT_ID = BIT_28, + SOFT_GEMINI_AVALANCHE_EVENT_ID = BIT_29, + + PLT_RX_CALIBRATION_COMPLETE_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; + + + +/************************************************************************* + + The Event Mailbox structure in memory + +**************************************************************************/ +typedef struct EventMailBox_t +{ + /* Events Bit Mask */ + uint32 eventsVector; + uint32 eventsMask; + uint32 reserved1; + uint32 reserved2; + + /* Events Data */ + int8 averageRssiLevel; /* Average RSSI value. */ + /* [ROAMING_TRIGGER_LOW_RSSI_EVENT_ID].*/ + + uint8 psStatus; /* refer to EventsPowerSave_enum.*/ + /* [PS_REPORT_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]*/ + + uint16 scheduledScanAttendedChannels; /* Channels scanned by the Scheduled Scan. */ + /* [SCHEDULED_SCAN_COMPLETE_EVENT_ID]*/ + + uint16 healthReport; /* Bit 0 is set in case of a fatal error in the device.*/ + /* [HEALTH_REPORT_EVENT_ID].*/ + + uint16 badFFTCorrelationCounter; /* [ACI_DETECTION_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]*/ + + uint32 reserved; + uint32 debugReport[2]; /* [DBG_EVENT_ID]*/ + + /* 16 Header + 24 data = 40 bytes till here include new fields */ + + uint32 consFcsErrCnt; /* The number of FCS errors since the last event. */ + /* If this number is larger then the last recorded */ + /* number plus a threshold (20, by default), and no Rx*/ + /* packet has been received in the last 500 ms, than the*/ + /* MAC Rx module is reset. After 2 such resets (by */ + /* default), the driver performs a full recovery */ + /* process. */ + /* [MAC_STATUS_EVENT_ID]*/ + + dbgEventRep_t dbgEventRep; /* refer to dbgEventRep_t*/ + /* [DBG_EVENT_ID]*/ + + uint8 averageSNRLevel; /* [ROAMING_TRIGGER_LOW_SNR_EVENT_ID]*/ + uint8 padding[19]; /* for alignment to 32 bits boundry*/ +} EventMailBox_t; + +#endif /* PUBLIC_EVENT_MBOX_H*/ + + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_host_int.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_host_int.h new file mode 100644 index 0000000..a7a4211 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_host_int.h @@ -0,0 +1,105 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 PUBLIC_HOST_INT_H +#define PUBLIC_HOST_INT_H + +#include "public_types.h" + + +/************************************************************************* + + Host Interrupt Register (WiLink -> Host) + +**************************************************************************/ + +#define ACX_INTR_RX0_DATA BIT_0 /* RX packet is ready in Xfer buffer #0*/ +#define ACX_INTR_TX_RESULT BIT_1 /* TX result(s) are in the TX complete buffer */ +#define ACX_INTR_TX_XFR BIT_2 /* OBSOLETE*/ +#define ACX_INTR_RX1_DATA BIT_3 /* RX packet is ready in Xfer buffer #1*/ +#define ACX_INTR_EVENT_A BIT_4 /* Event was entered to Event MBOX #A*/ +#define ACX_INTR_EVENT_B BIT_5 /* Event was entered to Event MBOX #B */ +#define ACX_INTR_WAKE_ON_HOST BIT_6 /* OBSOLETE */ +#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_CMD_COMPLETE BIT_9 /* Command processing completion*/ +#define ACX_INTR_INIT_COMPLETE BIT_14 /* Init sequence is done*/ + +#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 /* The host sets this bit to inform the Wlan */ + /* FW that a TX packet is in the XFER */ + /* Buffer #0.*/ + +#define INTR_TRIG_RX_PROC0 BIT_3 /* The host sets this bit to inform the FW */ + /* that it read a packet from RX XFER */ + /* Buffer #0.*/ + +#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 /* The host sets this bit to inform the FW */ + /* that it read a packet from RX XFER */ + /* Buffer #1. */ + +#define INTR_TRIG_TX_PROC1 BIT_18 /* The host sets this bit to inform the Wlan */ + /* hardware that a TX packet is in the XFER */ + /* Buffer #1.*/ + +#endif + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_infoele.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_infoele.h new file mode 100644 index 0000000..ccd8003 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_infoele.h @@ -0,0 +1,2392 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 public_infoele.h + * \brief 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_QUEUE_HEAD = 0x0005, /* for MASTER mode only!!!*/ + ACX_AC_CFG = 0x0007, + ACX_MEM_MAP = 0x0008, + ACX_AID = 0x000A, + ACX_RADIO_PARAM = 0x000B, /* Not in use !!! */ + ACX_CFG = 0x000C, /* Not in use !!!*/ + ACX_FW_REV = 0x000D, + ACX_FCS_ERROR_CNT = 0x000E, /* OBSOLETE (replaced by ACX_ERROR_CNT) !!!*/ + ACX_MEDIUM_USAGE = 0x000F, + ACX_RX_CFG = 0x0010, + ACX_TX_QUEUE_CFG = 0x0011, + ACX_BSS_IN_PS = 0x0012, /* for AP only (OBSOLETE???) */ + ACX_STATISTICS = 0x0013, /* Debug API*/ + ACX_PWR_CONSUMPTION_STATISTICS = 0x0014, + ACX_FEATURE_CFG = 0x0015, + ACX_MISC_CFG = 0x0017, /* Not in use !!!*/ + ACX_TID_CFG = 0x001A, + ACX_CAL_ASSESSMENT = 0x001E, /* OBSOLETE !!!*/ + ACX_BEACON_FILTER_OPT = 0x001F, + ACX_LOW_RSSI = 0x0020, + ACX_NOISE_HIST = 0x0021, + ACX_HDK_VERSION = 0x0022, /* ???*/ + ACX_PD_THRESHOLD = 0x0023, + ACX_DATA_PATH_PARAMS = 0x0024, /* WO*/ + ACX_DATA_PATH_RESP_PARAMS = 0x0024, /* RO*/ + ACX_CCA_THRESHOLD = 0x0025, + ACX_EVENT_MBOX_MASK = 0x0026, +#ifdef FW_RUNNING_AS_AP + ACX_DTIM_PERIOD = 0x0027, /* for AP only !!!*/ +#else + ACX_WR_TBTT_AND_DTIM = 0x0027, /* STA only*/ +#endif + ACX_ACI_OPTION_CFG = 0x0029, /* OBSOLETE !!! (for 1251)*/ + ACX_GPIO_CFG = 0x002A, /* Not in use !!!*/ + ACX_GPIO_SET = 0x002B, /* Not in use !!!*/ + ACX_PM_CFG = 0x002C, /* ??? (To Be Documented)*/ + ACX_CONN_MONIT_PARAMS = 0x002D, + ACX_AVERAGE_RSSI = 0x002E, /* Not in use !!!*/ + ACX_CONS_TX_FAILURE = 0x002F, + ACX_BCN_DTIM_OPTIONS = 0x0031, + ACX_SG_ENABLE = 0x0032, + ACX_SG_CFG = 0x0033, + ACX_ANTENNA_DIVERSITY_CFG = 0x0035, /* ??? (To Be Documented)*/ + ACX_LOW_SNR = 0x0037, /* To Be Documented*/ + 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_FW_GEN_FRAME_RATES = 0x0042, + 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_POWER_LEVEL_TABLE = 0x004D, + ACX_BET_ENABLE = 0x0050, + DOT11_STATION_ID = 0x1001, + DOT11_RX_MSDU_LIFE_TIME = 0x1004, + DOT11_CUR_TX_PWR = 0x100D, + DOT11_DEFAULT_KEY = 0x1010, + DOT11_RX_DOT11_MODE = 0x1012, + DOT11_RTS_THRESHOLD = 0x1013, + DOT11_GROUP_ADDRESS_TBL = 0x1014, + + MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL, + + 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; + + +#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 + +******************************************************************************/ + +/* Host Bus/Memory Mode - The following table specifies the possible host bus modes and */ +/* memory organizations that the Wilink should use during operation. */ +typedef enum{ + HOSTIF_PCI_MASTER_HOST_INDIRECT, + HOSTIF_PCI_MASTER_HOST_DIRECT, + HOSTIF_SLAVE, + HOSTIF_PKT_RING, + HOSTIF_DONTCARE = 0xFF +} HostIFConfig_enum; + +#ifdef HOST_COMPILE +typedef uint8 HostIFConfig_e; +#else +typedef HostIFConfig_enum HostIFConfig_e; +#endif + +typedef struct +{ + INFO_ELE_HDR + uint16 numStations; /* specifies the number of STAs to be supported. */ + /* The FW uses this field to allocate memory */ + /* for STA context data such as security keys*/ + uint16 reserved1; + 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 Reserved2; + uint8 numTxQueues; /* specifies the number of descriptor queues */ + /* that are to be used for transmit operations. */ + /* Valid values are 1 to 16*/ + + HostIFConfig_e hostifOptions; /* specifies the memory configuration options */ + /* for the adaptor. The format of this field */ + /* is shown in HostIFConfig_enum.*/ + + 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 numSsidProfiles; /* specifies the number of SSID profiles used */ + /* in the AP. Enables working with different */ + /* profiles for different stations.*/ + + uint16 debugBufferSize; /* This field specifies the number of words */ + /* allocated for each debug buffer if the */ + /* FW trace is enabled.*/ +#ifndef HOST_COMPILE + uint8 variableData; /* contents vary starting here - should be */ + uint8 pedding[3]; /* aligned to 32 bits boundry*/ +#endif +} ACXConfigMemory_t; + +typedef struct +{ + uint8 numDescs; + uint8 Reserved; + uint8 Type; + uint8 Priority; + uint32 dmaAddress; +} ACXrxQueueConfig; + +typedef struct +{ + uint8 numDescs; + uint8 reserved1[2]; + uint8 attributes; /* QPriority_e qPriority;*/ +} ACXtxQueueConfig; + +#define QUEUE_CONFIG_MAX_TX_QUEUES 5 + +typedef struct +{ + ACXConfigMemory_t memConfig; + ACXrxQueueConfig RxQueueConfig; + ACXtxQueueConfig TxQueueConfig[QUEUE_CONFIG_MAX_TX_QUEUES]; +} ACXConfigMemoryStruct_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_QUEUE_HEAD + Type: Configuration + Access: Read Only + Length: 56 + Note: for MASTER mode only!!! + +******************************************************************************/ + +typedef struct +{ + uint32 addr; + uint8 priority; + uint8 padding[3]; +} ACXoneQueueHead; + +#define NUM_ACCESS_CATEGORIES_QUEUES 5 /* This takes into account the */ + /* broadcast AC queue*/ +typedef struct +{ + INFO_ELE_HDR + uint32 *txMemBlkQ; + uint32 *rxMemBlkQ; + ACXoneQueueHead rxQueueHead; + ACXoneQueueHead txQueueHead[NUM_ACCESS_CATEGORIES_QUEUES]; +} ACXQosQueueHead_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*/ + NUM_ACCESS_CATEGORIES = 4 +} AccessCategory_enum; + +#define AC_FAST_TEMPLATE 4 /* Access Category for SG2.0 Fast CTS Tx */ +#define AC_REQUEST 0xfe /* Special access category type for */ + /* requests*/ +#define AC_INVALID 0xff /* Empty Access category in scheduler */ + /* Access Category DB*/ + +#define AC_ANY_TID 0xFF /* Any TID/AC for the Split Scan */ + +/* 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 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 18 + +typedef struct +{ + INFO_ELE_HDR + void *codeStart; + void *codeEnd; + void *wepDefaultKeyStart; + void *wepDefaultKeyEnd; + void *staTableStart; + void *staTableEnd; + void *packetTemplateStart; + void *packetTemplateEnd; + 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. */ +} 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_CFG + Type: Configuration + Access: Write Only + Length: 25 + Note: Not in use !!! + +******************************************************************************/ + +typedef struct ACXConfig_variableEntry_t +{ + uint8 dot11_ID; + uint8 num_supported; + uint8 dot11_Table; /*cast and deref this as array of Sizeof-dot11_ID-Type.*/ + uint8 padding; /* alignment to 32bits boundry */ +} ACXConfig_variableEntry_t; + + +typedef struct ACXConfigOptionsStruct_t +{ + INFO_ELE_HDR + char nvsVer[8]; + uint32 endMemLoc; + uint16 VendorSpecificArea; + uint8 dot11CCAModeSupported; + uint8 dot11DiversitySupport; + uint8 dot11ShortPreambleOptionImplemented; + uint8 dot11PBCCOptionImplemented; + uint8 dot11ChanneAgilityPresent; + uint8 dot11PHYType; + uint8 dot11TempType; + uint8 numVarEntries; + uint8 padding[2]; /* alignment to 32bits boundry */ + + ACXConfig_variableEntry_t vardata; + /**/ + /*Begin variable portion of Config data...*/ + /**/ +} ACXConfigOptionsStruct_t; + +/****************************************************************************** + + Name: ACX_FW_REV + Type: Configuration + Access: Write Only + Length: 24 + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + 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 brench */ + /* 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. */ +} ACXRevision_t; + +/****************************************************************************** + + Name: ACX_FCS_ERROR_CNT + Type: Operation + Access: Read Only + Length: 4 + Note: OBSOLETE (replaced by ACX_ERROR_CNT) !!! + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint32 FCSErrorCount; +} ACXFCSErrorCount_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_ARP_IP_FILTER + Type: Filtering Configuration + Access: Write Only + Length: 20 + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint8 ipVersion; /* The IP version of the IP address: 4 - IPv4, 6 - IPv6.*/ + uint8 arpFilterEnable; /* 1 - ARP filtering is enabled. */ + /* 0 - ARP filtering is disabled.*/ + 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_BSS_IN_PS + Type: Configuration + Access: Write Only + Length: 1 + Note: for AP only (OBSOLETE???) + +******************************************************************************/ + +typedef enum +{ + AP_POWER_ACTIVE_MODE = FALSE, + AP_POWER_SAVE_MODE = TRUE +} APPowerMgmtMode_enum; + +#ifdef HOST_COMPILE +typedef uint8 APPowerMgmtMode_e; +#else +typedef APPowerMgmtMode_enum APPowerMgmtMode_e; +#endif + + +typedef struct +{ + INFO_ELE_HDR + APPowerMgmtMode_e BSSinPowerSave; + uint8 padding[3]; /* alignment to 32bits boundry */ +} ACXBSSPowerSave_t; + + + +/****************************************************************************** + + Name: ACX_STATISTICS + Type: Statistics + Access: Write Only + Length: + Note: Debug API + +******************************************************************************/ + +typedef struct +{ + uint32 TxInternalDescOverflow; +} TxStatistics_t; + + +typedef struct +{ + uint32 RxOutOfMem; + uint32 RxHdrOverflow; + uint32 RxHWStuck; + uint32 RxDroppedFrame; + uint32 RxFcsErr; + uint32 RxXfrHintTrig; + uint32 RxPathReset; + uint32 RxResetCounter; +} RxStatistics_t; + + +typedef struct +{ + uint32 RxDMARequested; + uint32 RxDMAErrors; + uint32 TxDMARequested; + uint32 TxDMAErrors; +} DMAStatistics_t; + + +typedef struct +{ + uint32 Cmd_Cmplt; /* Host command complete */ + uint32 FIQs; /* fiqisr() */ + uint32 RxHeaders; /* (INT_STS_ND & INT_TRIG_RX_HEADER) */ + uint32 RxCompletes; /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */ + uint32 RxMemOverflow; /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */ + uint32 RxRdys; /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */ + uint32 IRQs; /* irqisr() */ + uint32 ACXTxProcs; /* (INT_STS_ND & INT_TRIG_TX_PROC) */ + uint32 DecryptDone; /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */ + uint32 DMA0Done; /* (INT_STS_ND & INT_TRIG_DMA0) */ + uint32 DMA1Done; /* (INT_STS_ND & INT_TRIG_DMA1) */ + uint32 ACXTxExchComplete; /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */ + uint32 ACXCommands; /* (INT_STS_ND & INT_TRIG_COMMAND) */ + uint32 ACXRxProcs; /* (INT_STS_ND & INT_TRIG_RX_PROC) */ + uint32 HwPMModeChanges; /* (INT_STS_ND & INT_TRIG_PM_802) */ + uint32 HostAcknowledges; /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */ + uint32 PCI_PM; /* (INT_STS_ND & INT_TRIG_PM_PCI) */ + uint32 ACMWakeups; /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */ + uint32 LowRssi; /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */ +} IsrStatistics_t; + + +typedef struct WepStatistics_t +{ + uint32 WepAddrKeyCount; /* Count of WEP address keys configured*/ + uint32 WepDefaultKeyCount; /* Count of default keys configured*/ + uint32 reserved; + 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 WepPackets; /* WEP Packets Decrypted*/ + uint32 WepInterrupt; /* WEP Decrypt Interrupts*/ +} WepStatistics_t; + + +#define PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD 10 +typedef struct PwrStatistics_t +{ + uint32 PSEnterCnt; /* Count the amount of enters into power save mode (both PD & ELP)*/ + uint32 ELPEnterCnt; /* Count the amount of enters into ELP mode.*/ + uint32 MissingBcnsCnt; /* Count the amount of missing beacon interrupts to the host.*/ + uint32 WakeOnHostCnt; /* Count the amount of wake on host-access times.*/ + uint32 WakeOnTimerExpCnt; /* Count the amount of wake on timer-expire.*/ + uint32 TxWithPSCnt; /* Count the number of packets that were transmitted with PS bit set*/ + uint32 TxWithoutPSCnt; /* Count the number of packets that were transmitted with PS bit clear*/ + uint32 RcvdBeaconsCnt; /* Count the number of received beacons.*/ + uint32 PowerSaveOffCnt; /* Count the number of entering into PowerOn (power save off).*/ + uint16 EnablePSCnt; /* Count the number of entries into power save mode.*/ + uint16 DisablePSCnt; /* Count the number of exits from power save (not including the PS_FAIL route.*/ + uint32 FixTsfPSCnt; /* Count the number of times the TSF counter was adjusted because of drift.*/ + 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 EventStatistics_t +{ + uint32 heartbeat; + uint32 calibration; + uint32 rxMismatch; + uint32 rxMemEmpty; + uint32 rxPool; + uint32 oomLate; + uint32 phyTransmitError; + uint32 txStuck; +} EventStatistics_t; + + +typedef struct PsPollUpsdStatistics_t +{ + uint32 psPollTimeOuts; + uint32 upsdTimeOuts; + uint32 upsdMaxSPTime; + uint32 upsdMaxAPturn; + uint32 psPollMaxAPturn; + uint32 psPollUtilization; + uint32 upsdUtilization; +} PsPollUpsdStatistics_t; + + +typedef struct +{ + uint32 RxPrepBeaconDrop; + uint32 DescrHostIntTrigRxData; + uint32 BeaconBufferThresHostIntTrigRxData; + uint32 MissedBeaconHostIntTrigRxData; + uint32 TxXfrHostIntTrigRxData; +} RxPipeStatistics_t; + + +typedef struct ACXStatisticsStruct +{ + INFO_ELE_HDR + 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; +#ifdef FW_RUNNING_AS_STA + PsPollUpsdStatistics_t ps; + RxPipeStatistics_t rxp; +#endif +} 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 snr; /* The current average SNR in db*/ + int8 rssi; /* The current average RSSI*/ + uint8 padding[2]; /* alignment to 32bits boundry */ +}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 + + +/* rxTimeout values */ +#define NO_RX_TIMEOUT 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_LOW_RSSI + Desc: This information element configures the Low and Regained RSSI interrupt + indicators. Low RSSI calculates the average RSSI by giving higher weight + to the old samples than to the current sample. + The triggering of the Regained RSSI Event cannot be configured and + is always an "Edge" indication. + The RSSI is reset on JoinBSS - the filter history CurrentRSSI is reset. + The average RSSI is calculated as follows: + averageRssi = ((int32)((100-roamingTriggerParameters.lowRssi.rssiFilterWeight) * averageRssi) + + (int32)(roamingTriggerParameters.lowRssi.rssiFilterWeight * (int8)rxInfo->rxLevel)) / 100; + Type: Configuration + Access: Write Only + Length: 4 + +******************************************************************************/ + +typedef enum +{ + LOW_RSSI_EVENT_LEVEL = 0, /* The event is a "Level" indication which keeps */ + /* triggering as long as the average RSSI is below*/ + /* the threshold.*/ + + LOW_RSSI_EVENT_EDGE = 1 /* The event is an "Edge" indication which triggers*/ + /* only when the RSSI threshold is crossed from above.*/ +} LowRSSIEventType_enum; + +#ifdef HOST_COMPILE +typedef uint8 LowRSSIEventType_e; +#else +typedef LowRSSIEventType_enum LowRSSIEventType_e; +#endif + + +typedef struct +{ + INFO_ELE_HDR + int8 rssiThreshold; /* The threshold (in dBm) below (or above */ + /* after low rssi indication) which the */ + /* firmware generates an interrupt to the host. */ + /* This parameter is signed.*/ + + uint8 rssiFilterWeight; /* The weight of the current RSSI sample, */ + /* before adding the new sample, that is used */ + /* to calculate the average RSSI.*/ + + uint8 rssiFilterDepth; /* The number of Beacons/Probe response frames */ + /* that will be received before issuing the */ + /* Low or Regained RSSI event*/ + + LowRSSIEventType_e LowRSSIEventType; /* This parameter configures how the Low RSSI */ + /* Event is triggered. */ + /* Refer to LowRSSIEventType_enum.*/ +} ACXLowRSSITriggerParameters_t; + +/****************************************************************************** + + Name: ACX_AVERAGE_RSSI + Type: Configuration + Access: Read Only + Length: 8 + Note: Not in use !!! + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + int8 avaregeRSSI; /* in DBM*/ + uint8 padding[3]; /* alignment to 32bits boundry */ +} ACXAvaregeRSSI_t; + +/****************************************************************************** + + 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_DATA_PATH_PARAMS + Desc: configure Data path and Tx complete parameters + Type: Configuration + Access: Write Only + Length: 12 + +******************************************************************************/ +typedef struct +{ + INFO_ELE_HDR + uint16 rxPacketRingChunkSize; /* size in bytes of each buffer in a */ + /* multi-buffers transfer mechanism (size of */ + /* largest possible packet).*/ + + uint16 txPacketRingChunkSize; /* size in bytes of each buffer in a */ + /* multi-buffers transfer mechanism (size of */ + /* largest possible packet).*/ + + uint8 rxPacketRingChunkNum; /* number of buffers in a multi-buffers */ + /* transfer mechanism (2 for double buffer).*/ + + uint8 txPacketRingChunkNum; /* number of buffers in a multi-buffers */ + /* transfer mechanism (2 for double buffer).*/ + + uint8 txCompleteThreshold; /* maximum number of packets that can be */ + /* gathered in the TX complete ring before */ + /* interrupt is generated.*/ + + uint8 txCompleteRingDepth; /* number of pending (waiting to be read by*/ + /* the Host) TX complete entries in cyclic ring.*/ + + uint32 txCompleteTimeOut; /* the maximum time in micro-seconds since a */ + /* packet enters the TX complete ring until */ + /* interrupt is generated.*/ +} ACXDataPathParams_t; + +/****************************************************************************** + + Name: ACX_DATA_PATH_RESP_PARAMS + Desc: Get data path specific parameters. + Type: Configuration + Access: Read Only + Length: 28 + Note: The interrogation of this IE can be done only after the configuration + of the corresponding Data Path parameters IE. + +******************************************************************************/ +typedef struct +{ + INFO_ELE_HDR + uint16 rxPacketRingChunkSize; /* actual size in bytes of each buffer */ + /* in a multi-buffers transfer mechanism.*/ + + uint16 txPacketRingChunkSize; /* actual size in bytes of each buffer */ + /* in a multi-buffers transfer mechanism.*/ + + uint8 rxPacketRingChunkNum; /* actual number of buffers in a */ + /* multi-buffers transfer mechanism. */ + + uint8 txPacketRingChunkNum; /* actual number of buffers in a */ + /* multi-buffers transfer mechanism.*/ + + uint8 padding[2]; /* alignment to 32bits boundry */ + uint32 rxPacketRingAddr; /* base address of the the multi-buffer space.*/ + + uint32 txPacketRingAddr; /* base address of the the multi-buffer space.*/ + + uint32 rxControlAddr; /* address of Rx Control register.*/ + + uint32 txControlAddr; /* address of Rx Control register.*/ + + uint32 txCompleteAddr; /* base address of Tx Complete ring.*/ +} ACXDataPathParamsResp_t; + +/****************************************************************************** + + Name: ACX_RATE_POLICY + Type: Configuration + Access: Write Only + Length: 132 + +******************************************************************************/ +typedef enum +{ + RATE_CLASS_54M, + RATE_CLASS_48M, + RATE_CLASS_36M, + RATE_CLASS_24M, + RATE_CLASS_22M, + RATE_CLASS_18M, + RATE_CLASS_12M, + RATE_CLASS_11M, + RATE_CLASS_9M, + RATE_CLASS_6M, + RATE_CLASS_5_5M, + RATE_CLASS_2M, + RATE_CLASS_1M, + RATE_CLASSES_SIZE +} RatePolicy_enum; +#define MAX_RATE_POLICIES (8) + +/* +aflag definition +bit field description +========= =========== +7:3 Reserved +2 Preamble Type - The type of the preamble to be used by the policy. + 0 - long preamble, + 1 - short preamble. +1 Preamble Override - Indicates if the preamble type should be used in TX. +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. +*/ + + +/* definition of single rate policy*/ +typedef struct +{ + uint8 rateClass[RATE_CLASSES_SIZE]; /* The number of attempts for TX */ + /* for each rate class. */ + /* RatePolicy_enum describes the */ + /* indices for the table.*/ + + 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.*/ +}txAttrClass_t; + + +typedef struct +{ + INFO_ELE_HDR + uint32 numOfClasses; /* The number of transmission rate */ + /* fallback policy classes.*/ + + txAttrClass_t rateClasses[MAX_RATE_POLICIES]; /* Rate Policies table*/ +}ACXTxAttrClasses_t; + + +/****************************************************************************** + + Name: ACX_FW_GEN_FRAME_RATES + Desc: FW generated (template) frames rates and modulation. + Type: Configuration + Access: Write Only + Length: 4 + +******************************************************************************/ + +/* +Values for the Frame rate configuration +Value Transmit Rate +===== ============= +0x0A 1 Mbps +0x14 2 Mbps +0x37 5.5 Mbps +0x6E 11 Mbps (CCK) +0xDC 22 Mbps +0x0B 6 Mbps +0x0F 9 Mbps +0x0A 12 Mbps +0x0E 18 Mbps +0x09 24 Mbps +0x0D 36 Mbps +0x08 48 Mbps +0x0C 54 Mbps +*/ + +/* +Values for the modulation configuration +Value Modulation +===== ========== +0 CCK_LONG +1 CCK_SHORT +128 PBCC_LONG +129 PBCC_SHORT +64 OFDM +*/ + +typedef struct +{ + INFO_ELE_HDR + uint8 txCtrlFrmRate; /* This field indicates the rate at which the WiLink */ + /* transmits RTS, CTS, PS Poll and QoS-Null frames. */ + /* Valid values are listed in the above table.*/ + + uint8 txCtrlFrmMod; /* Modultion type for the above template frame. */ + /* Valid values are listed in the above table.*/ + + uint8 txMgmtFrmRate; /* This field indicates the rate at which the WiLink */ + /* transmits beacon, probe response frames. */ + /* If the host is configuring the WiLink as an AP or Ad Hoc */ + /* STA, you must configure the beacon template before the */ + /* START/JOIN command is issued. */ + /* Valid values are listed in the above table.*/ + + uint8 txMgmtFrmMod; /* Modultion type for the above template frame.*/ + /* Valid values are listed in the above table.*/ +}ACXFwGeneratedFrameRates_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; + +/****************************************************************************** + + 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_PREAMBLE_TYPE + Type: Configuration + Access: Write Only + Length: 1 + +******************************************************************************/ + +typedef enum +{ + ACX_PREAMBLE_LONG = 0, + ACX_PREAMBLE_SHORT = 1, + ACX_DEFAULT_PREAMBLE = ACX_PREAMBLE_LONG +} 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; + 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_WR_TBTT_AND_DTIM + Type: Configuration + Access: Write Only + Length: 3 + Note: STA Only + +******************************************************************************/ +#ifdef FW_RUNNING_AS_STA +typedef struct +{ + INFO_ELE_HDR + uint16 tbtt; /* Time in TUs between two consecutive Beacons*/ + uint8 dtimInterval; /* DTIM interval: */ + /* For BSS: Number of TBTTs in a DTIM period (range: 1-10).*/ + /* For IBSS: value shall be set to 1.*/ + uint8 padding; /* alignment to 32bits boundry */ +} ACXDtimPeriodCfg_t; +#endif + +/****************************************************************************** + + Name: ACX_DTIM_PERIOD + Type: Configuration + Access: Write Only + Length: 2 + Note: for AP only !!! + +******************************************************************************/ +#ifdef FW_RUNNING_AS_AP +typedef struct +{ + uint16 dtimPeriod; + uint8 padding[2]; /* alignment to 32bits boundry */ +} ACXDtimPeriodCfg_t; +#endif + + +/****************************************************************************** + + Name: ACX_ACI_OPTION_CFG + Type: Configuration + Access: Write Only + Length: 6 + Note: OBSOLETE !!! (for 1251) + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint8 ACIMode; + uint8 inputCCA; + uint8 txCCA; + uint8 qualifiedCCA; + uint8 stompForRx; + uint8 stompForTx; + uint8 padding[2]; /* alignment to 32bits boundry */ +} ACXConfigACI_t; + + +/****************************************************************************** + + Name: ACX_PM_CFG + Desc: Configure the power managment option. + Type: Configuration + Access: Write Only + Length: 16 + Note: ??? (To Be Documented) + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + Bool32 ELPEnable; + Bool32 WakeOnGPIOenable; + uint32 BBWakeUpTime; + uint32 PLLlockTime; +} ACXConfigPM_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_LOW_SNR + Desc: This information element configures the Low/Regained SNR interrupt + indicator. + Type: Configuration + Access: Write Only + Length: 4 + Note: To Be Documented + +******************************************************************************/ + +typedef enum +{ + LOW_SNR_EVENT_LEVEL = 0, + LOW_SNR_EVENT_EDGE = 1 +} LowSNREventType_enum; + + +#ifdef HOST_COMPILE +typedef uint8 LowSNREventType_e; +#else +typedef LowSNREventType_enum LowSNREventType_e; +#endif + + +typedef struct +{ + INFO_ELE_HDR + uint8 SNRThreshold; + uint8 SNRFilterWeight; + uint8 SNRFilterDepth; + LowSNREventType_e LowSNREventType; +} ACXLowSNRTriggerParameters_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 Enable; /* specifies whether the SG feature will be enabled (0), */ + /* disabled(1), in a "sense not active" (3) mode in which */ + /* upon seeing BT activity a host interrupt will be sent or*/ + /* in a "sense active" (4) mode which specifies the device */ + /* should switch on the SG in response to the driver receiving */ + /* the host interrupt. */ + uint8 padding[3]; /* alignment to 32bits boundry */ +} ACXBluetoothWlanCoEnableStruct; + +/****************************************************************************** + + Name: ACX_ANTENNA_DIVERSITY_CFG + Desc: Set antenna diversity parameters + Type: Configuration + Access: Write Only + Length: 7 + Note: ??? (To Be Documented) + +******************************************************************************/ + +/* Antenna Diversity Tx definitions*/ +typedef enum +{ + DIVS_TX_START_ANT1 = 0, /* Start TX antenna 1.*/ + DIVS_TX_START_ANT2 = 1, /* Start TX antenna 2.*/ + DIVS_TX_START_SWITCH = 2 /* Switch starting Tx Antenna. */ +} TxAntDivsStartOption_enum; + + +/* Antenna Diversity Rx definitions*/ +typedef enum +{ + DIVS_RX_START_ANT1 = 0, /* Start RX antenna 1.*/ + DIVS_RX_START_ANT2 = 1, /* Start RX antenna 2.*/ + DIVS_RX_START_LAST_RX = 2, /* Start RX Last RX Antenna mode.*/ + DIVS_RX_START_SWITCH = 3 /* Switch starting Rx Antenna. */ +} RxAntDivsStartOption_enum; + +#ifdef HOST_COMPILE +typedef uint8 RxAntDivsStartOption_e; +typedef uint8 TxAntDivsStartOption_e; +#else +typedef RxAntDivsStartOption_enum RxAntDivsStartOption_e; +typedef TxAntDivsStartOption_enum TxAntDivsStartOption_e; +#endif + +typedef struct +{ + INFO_ELE_HDR + uint8 enableRxDiversity; + RxAntDivsStartOption_e rxSelectedAntenna; + uint8 enableTxDiversity; + TxAntDivsStartOption_e txSelectedAntenna; + uint8 rxAntNum; + uint8 txAntNum; + uint8 rxTxSharedAnts; + uint8 padding; /* alignment to 32bits boundry */ +} AcxSetAntennaDiversityOptions_t; + + + +/****************************************************************************** + + 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 Only + Length: 1 + +******************************************************************************/ +typedef struct + +{ + INFO_ELE_HDR + RateIndex_e wlanRxMinConvertedRateToRespectBtHp; /* Range: 802.11 b,g Rates*/ + /* The minimum rate of a received WLAN packet in the STA, */ + /* during protective mode, of which a new BT-HP request */ + /* during this Rx will always be respected and gain the antenna*/ + + uint16 btHpMaxTime; /* the maximum length of time the BT HP */ + /* will be respected (Limitation on BT */ + /* HP time, afterwards will switch to LP).*/ + + uint16 wlanHpMaxTime; /* the maximum length of time the WLAN HP*/ + /* will be respected (Limitation on WLAN */ + /* HP time, afterwards will switch to LP).*/ + + uint16 senseDisableTimer; /* The time after the last BT activity */ + /* when the sense mode will return the */ + /* SG state to "SENSE_INACTIVE"*/ + + uint16 protectiveRxTimeBeforeBtHp; /* The time before the next BT HP */ + /* instance in which to send the fast */ + /* CTS.*/ + + uint16 protectiveTxTimeBeforeBtHp; /* The time before the next BT HP */ + /* instance in which to suspend the */ + /* WLAN TX*/ + + uint16 protectiveRxTimeBeforeBtHpFastAp; /* range: 10-20000 default: 1500*/ + uint16 protectiveTxTimeBeforeBtHpFastAp; /* range: 10-20000 default: 3000*/ + uint16 protectiveWlanCycleTimeForFastAp; /* range: 2000-65535 default: 8700*/ + uint16 btAntiStarvationPeriod; /* range: 0 - 15000 (Msec) default: 1000 */ + uint16 timeoutNextBtLpPacket; /* range 400-10000(Usec) default: 3000 */ + + uint16 wakeUpTimeBeforeBeacon; /* The default value is worse case of */ + /* BT DH5 traffic */ + uint16 hpdmMaxGuardTime; /* range: 0-50000(Usec) default: 1050*/ + + uint16 timeoutNextWlanPacket; /* Range: 100-50000(Usec) default:2550*/ + /* This timeout purpose is to prevent both BT & WLAN */ + /* antenna starvation. */ + + uint8 sgAntennaType; /* "0" - shared antenna ; */ + /* "1" - dual antenna.*/ + + uint8 signalingType; /* "0" - TI legacy signaling ; */ + /* "1" - Palau signaling */ + + uint8 afhLeverageOn; /* How to receive information regarding */ + /* the AFH status of the BT. */ + /* "0" - no AFH;*/ + /* "1" - from dedicated GPIO.*/ + /* "2" - AFH on (from host).*/ + + uint8 numberQuietCycle; /* the number of cycles during which no*/ + /* TX will be sent after 1 cycle of RX */ + /* transaction in protective mode*/ + + uint8 maxNumCts; /* The maximum number of CTSs that will*/ + /* be sent for receiving RX packet in */ + /* protective mode*/ + + uint8 numberOfWlanPackets; /* The number of WLAN packets */ + /* transferred in common mode before */ + /* switching to the BT.*/ + + uint8 numberOfBtPackets; /* The number of BT packets transferred*/ + /* in common mode before switching to */ + /* the WLAN.*/ + + uint8 numberOfMissedRxForAvalancheTrigger; /* range: 1-255 default: 5*/ + uint8 wlanElpHpSupport; /* range: 0-1 default: 1*/ + + uint8 btAntiStarvationNumberOfCyclesWithinThePeriod; /* range: 0 - 15 default: 4 */ + + uint8 ackModeDuringBtLpInDualAnt; /* 0 or 1 */ + + + Bool_e allowPaSdToggleDuringBtActivityEnable; /* Allow PA_SD assertion/de-assertion */ + /* during enabled BT activity */ + + Bool_e sgAutoModeNoCts; /* Enable/Disable SG2.0 in auto mode: */ + /* Support Both Active & P.S modes */ + + uint8 numOfBtHpRespectedReq; /*range: 0 - 20 default: 1*/ + +} ACXBluetoothWlanCoParamsStruct; + + + +/****************************************************************************** + + 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_GPIO_CFG + Type: Board Configuration + Access: Write Only + Length: 2 + Note: Not in use !!! + +******************************************************************************/ + +#ifndef _WINDOWS +#define GPIO_DIR_OUTPUT 0 +#define GPIO_DIR_INPUT 1 +#endif /* ifndef _WINDOWS */ + +typedef struct +{ + INFO_ELE_HDR + uint8 number; + uint8 direction; + uint8 padding[2]; /* alignment to 32bits boundry */ +} ACXConfigGPIO_t; + + +/****************************************************************************** + + Name: ACX_GPIO_SET + Type: Board Configuration + Access: Write Only + Length: 2 + Note: Not in use !!! + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint8 number; + uint8 value; + uint8 padding[2]; /* alignment to 32bits boundry */ +} ACXSetGPIO_t; + +/****************************************************************************** + + Name: ACX_MISC_CFG + Type: Board Configuration + Access: Read/Write + Length: 8 + Note: GPIO_OUT bits to be used for LEDs are defined in the + NVS Miscellaneous table. An API to NVS is used by the + LED-Init routine to fill this table with the LED bit values. + Not in use !!! + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint16 txActivityLed; /* GPIO_OUT bit for this LED*/ + uint16 fwInitLed; /* GPIO_OUT bit for this LED*/ + uint16 diagnosticLed; /* GPIO_OUT bit for this LED*/ + uint16 faaRadioOffGpio; /* GPIO_OUT bit for the FAA Radio Off feature*/ +} ACXMisc_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_STATION_ID + Desc: This information element specifies the MAC Address assigned to the STA. + This default value is the permanent MAC address that is stored in the + adaptor's non volatile memory. The host can change the MAC address; + however, the WiLink always reverts to the default value after power up + or reset. + Type: Configuration + Access: Read / Write + Length: 6 + Note: The byte order of the MAC address must be reversed in this field. + For example, if the MAC address is 00 7E 99 11 22 33, this field must + read 33 22 11 99 7E 00. + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint8 dot11StationID[6]; /* The MAC address for the STA.*/ + uint8 padding[2]; /* alignment to 32bits boundry */ +} dot11StationIDStruct; + + +/****************************************************************************** + + 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_DEFAULT_KEY + Desc: This information element indicates the default key to use to encrypt + transmit frames. + Type: Configuration + Access: Write Only + Length: 1 + +******************************************************************************/ + +typedef enum +{ + DEFAULT_KEY_0 = 0, + DEFAULT_KEY_1, + DEFAULT_KEY_2, + DEFAULT_KEY_3, + MAX_NUM_WEP_DEFAULT_KEY +} DefaultKey_enum; + +#ifdef HOST_COMPILE +typedef uint8 DefaultKey_e; +#else +typedef DefaultKey_enum DefaultKey_e; +#endif + +typedef struct +{ + INFO_ELE_HDR + DefaultKey_e DefaultKeyId; /* refer to DefaultKey_enum*/ + uint8 padding[3]; /* alignment to 32bits boundry */ +} dot11WEPDefaultKeyId_t; + + +/****************************************************************************** + + 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 + Bool32 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. */ +} IEConfigPsWmm_t; + +/****************************************************************************** + + ACX_SET_RX_DATA_FILTER + +******************************************************************************/ +/* data filter action */ + +#ifdef HOST_COMPILE + +#define FILTER_DROP 0 +#define FILTER_SIGNAL 1 +#define FILTER_FW_HANDLE 2 + +#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 +#define ADD_FILTER 1 + +/* limitation */ +#define MAX_DATA_FILTERS 4 +#define MAX_DATA_FILTER_SIZE 90 + +typedef struct +{ + INFO_ELE_HDR + uint8 command; // 0-remove, 1-add + uint8 index; + filter_e action; + uint8 numOfFields; + uint8 FPTable; //filter fields starts here. unknown size. +} DataFilterConfig_t; + +/****************************************************************************** + + ACX_ENABLE_RX_DATA_FILTER + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint8 enable; + filter_e action; +} DataFilterDefault_t; + + +/****************************************************************************** + + ACX_GET_DATA_FILTER_STATISTICS + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint32 unmatchedPacketsCount; + uint32 matchedPacketsCount[MAX_DATA_FILTERS]; +} ACXDataFilteringStatistics_t; + + +/****************************************************************************** + +Name: ACX_POWER_LEVEL_TABLE +Desc: Retrieve Maximum Dbm per power level and sub-band. +Type: Configuration +Access: Read Only +Length: 20 + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + + uint8 txPowerTable[NUM_OF_SUB_BANDS][NUM_OF_POWER_LEVEL]; /* Maximun Dbm in Dbm/10 units */ +} PowerLevelTable_t; + + +/****************************************************************************** + +Name: ACX_PWR_CONSUMPTION_STATISTICS +Desc: Retrieve time statistics of the different power states. +Type: Configuration +Access: Read Only +Length: 20 + +******************************************************************************/ + +typedef struct +{ + INFO_ELE_HDR + uint32 activeTimeCnt_Low; + uint32 activeTimeCnt_Hi; + uint32 powerDownTimeCnt_Low; + uint32 powerDownTimeCnt_Hi; + uint32 elpTimeCnt_Low; + uint32 elpTimeCnt_Hi; +}ACXPowerConsumptionTimeStat_t; + +#endif // PUBLIC_INFOELE_H + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_radio.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_radio.h new file mode 100644 index 0000000..94f4afc --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_radio.h @@ -0,0 +1,173 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 public_radio.h + * \brief Contains information element defines/structures used by the TNETxxxx and host and Radio Module. + * + */ + +/* +======================================================================================================================= + 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 + +// 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_SUB_BANDS 5 +#define NUM_OF_POWER_LEVEL 4 + +#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; + + +/****************************************************************************** + + 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 */ +/* */ +/************************************************************************/ + + +/****************************************************************************** + + 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 + +******************************************************************************/ +#define NVS_RESULTS_MAX_NUM_OF_TABLES 4 +#define NVS_RESULTS_MAX_UPDATE_TABLE_SIZE 100 + +typedef struct resultsBuffer_t +{ + uint16 size; /* size of table*/ + uint16 offset; /* offset in the binary image of the NVS file*/ + uint8 data[NVS_RESULTS_MAX_UPDATE_TABLE_SIZE];/* the actual table data */ +}resultsBuffer_t; + + +typedef struct PltNvsResultsBuffer_t +{ + resultsBuffer_t tables[NVS_RESULTS_MAX_NUM_OF_TABLES]; /* array of structures of type containing the tables*/ + uint8 numOfTables; /* number of tables needed to be updated*/ + uint8 padding[3]; +}PltNvsResultsBuffer_t; + + +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; + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/public_types.h b/sta_dk/pform/linux/src/wlan_driver_inc/public_types.h new file mode 100644 index 0000000..71b62c9 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/public_types.h @@ -0,0 +1,320 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 public_types.h + * \brief 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 int8 +typedef signed char int8; +#endif +#ifndef int16 +typedef short int16; +#endif +#ifndef int32 +typedef long int int32; +#endif + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#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 MAC_ADDR_SIZE 6 +#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 = 0xFE, + MAX_RADIO_BANDS = 0xFF +} RadioBand_enum; + +#ifdef HOST_COMPILE +typedef uint8 RadioBand_e; +#else +typedef RadioBand_enum RadioBand_e; +#endif + + +typedef enum +{ + NO_RATE = 0, + RATE_1MBPS = 0x0A, + RATE_2MBPS = 0x14, + RATE_5_5MBPS = 0x37, + RATE_6MBPS = 0x0B, + RATE_9MBPS = 0x0F, + RATE_11MBPS = 0x6E, + RATE_12MBPS = 0x0A, + RATE_18MBPS = 0x0E, + RATE_22MBPS = 0xDC, + RATE_24MBPS = 0x09, + RATE_36MBPS = 0x0D, + RATE_48MBPS = 0x08, + RATE_54MBPS = 0x0C +} Rate_enum; + +#ifdef HOST_COMPILE +typedef uint8 Rate_e; +#else +typedef Rate_enum Rate_e; +#endif + +typedef enum +{ + RATE_INDEX_1MBPS = 0, + RATE_INDEX_2MBPS = 1, + RATE_INDEX_5_5MBPS = 2, + RATE_INDEX_6MBPS = 3, + RATE_INDEX_9MBPS = 4, + RATE_INDEX_11MBPS = 5, + RATE_INDEX_12MBPS = 6, + RATE_INDEX_18MBPS = 7, + RATE_INDEX_22MBPS = 8, + RATE_INDEX_24MBPS = 9, + RATE_INDEX_36MBPS = 10, + RATE_INDEX_48MBPS = 11, + RATE_INDEX_54MBPS = 12, + RATE_INDEX_MAX = RATE_INDEX_54MBPS, + MAX_RATE_INDEX, + INVALID_RATE_INDEX = MAX_RATE_INDEX, + RATE_INDEX_ENUM_MAX_SIZE = 0x7FFFFFFF +} RateIndex_e; + +#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... + +Define a new "Rate-Set" for TX path that incorporates the +Rate & Modulation info into a single 16-bit field. + +TxdRateSet_t: + b15 - Indicates Preamble type (1=SHORT, 0=LONG). + Notes: + Must be LONG (0) for 1Mbps rate. + Does not apply (set to 0) for RevG-OFDM rates. + b14 - Indicates PBCC encoding (1=PBCC, 0=not). + Notes: + Does not apply (set to 0) for rates 1 and 2 Mbps. + Does not apply (set to 0) for RevG-OFDM rates. + b13 - Unused (set to 0). + b12-b0 - Supported Rate indicator bits as defined below. + +******************************************************************************/ + +typedef uint16 TxdRateSet_t; + + +/****************************************************************************** + + 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 IS_CHIP_PG_LESS_THEN_PG12() ((CHIP_ID == TNETW1251_CHIP_ID_PG1_0) || (CHIP_ID == TNETW1251_CHIP_ID_PG1_1)) + +/****************************************************************************** +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/sta_dk/pform/linux/src/wlan_driver_inc/ratesTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/ratesTypes.h new file mode 100644 index 0000000..634abe9 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/ratesTypes.h @@ -0,0 +1,138 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 RATES_TYPES_H +#define RATES_TYPES_H + +typedef enum +{ + DRV_RATE_AUTO = 0, + DRV_RATE_1M = 1, + DRV_RATE_2M = 2, + DRV_RATE_5_5M = 3, + DRV_RATE_11M = 4, + DRV_RATE_22M = 5, + DRV_RATE_6M = 6, + DRV_RATE_9M = 7, + DRV_RATE_12M = 8, + DRV_RATE_18M = 9, + DRV_RATE_24M = 10, + DRV_RATE_36M = 11, + DRV_RATE_48M = 12, + DRV_RATE_54M = 13, + DRV_RATE_MAX = 13, + DRV_RATE_INVALID= 0xFF +} rate_e; + + +typedef enum +{ + DRV_RATE_MASK_AUTO = DRV_RATE_AUTO, /*0x0000,*/ + DRV_RATE_MASK_1_BARKER = (1<<(DRV_RATE_1M - 1)), /*0x0001,*/ + DRV_RATE_MASK_2_BARKER = (1<<(DRV_RATE_2M - 1)), /*0x0002,*/ + DRV_RATE_MASK_5_5_CCK = (1<<(DRV_RATE_5_5M - 1)), /*0x0004,*/ + DRV_RATE_MASK_11_CCK = (1<<(DRV_RATE_11M - 1)), /*0x0008,*/ + DRV_RATE_MASK_22_PBCC = (1<<(DRV_RATE_22M - 1)), /*0x0010,*/ + DRV_RATE_MASK_6_OFDM = (1<<(DRV_RATE_6M - 1)), /*0x0020,*/ + DRV_RATE_MASK_9_OFDM = (1<<(DRV_RATE_9M - 1)), /*0x0040,*/ + DRV_RATE_MASK_12_OFDM = (1<<(DRV_RATE_12M - 1)), /*0x0080,*/ + DRV_RATE_MASK_18_OFDM = (1<<(DRV_RATE_18M - 1)), /*0x0100,*/ + DRV_RATE_MASK_24_OFDM = (1<<(DRV_RATE_24M - 1)), /*0x0200,*/ + DRV_RATE_MASK_36_OFDM = (1<<(DRV_RATE_36M - 1)), /*0x0400,*/ + DRV_RATE_MASK_48_OFDM = (1<<(DRV_RATE_48M - 1)), /*0x0800,*/ + DRV_RATE_MASK_54_OFDM = (1<<(DRV_RATE_54M - 1)), /*0x1000*/ +} rateMask_e; + +/*GWSI_RATE*/ +#define GWSI_1Mbits 0x00000001 +#define GWSI_2Mbits 0x00000002 +#define GWSI_5_5Mbits 0x00000004 +#define GWSI_6Mbits 0x00000008 +#define GWSI_9Mbits 0x00000010 +#define GWSI_11Mbits 0x00000020 +#define GWSI_12Mbits 0x00000040 +#define GWSI_18Mbits 0x00000080 +#define GWSI_22Mbits 0x00000100 +#define GWSI_24Mbits 0x00000200 +#define GWSI_36Mbits 0x00000800 +#define GWSI_48Mbits 0x00001000 +#define GWSI_54Mbits 0x00002000 + +/*HW_RATE*/ +#define HW_RATE_1M (0x0A) +#define HW_RATE_2M (0x14) +#define HW_RATE_5_5M (0x37) +#define HW_RATE_5_5M_PBCC (0xB7) +#define HW_RATE_11M (0x6E) +#define HW_RATE_11M_PBCC (0xEE) +#define HW_RATE_22M_PBCC (0xDC) +#define HW_RATE_6M (0x0B) +#define HW_RATE_9M (0x0F) +#define HW_RATE_12M (0x0A) +#define HW_RATE_18M (0x0E) +#define HW_RATE_24M (0x09) +#define HW_RATE_36M (0x0D) +#define HW_RATE_48M (0x08) +#define HW_RATE_54M (0x0C) + +#define HW_BIT_RATE_1MBPS 0x00000001 +#define HW_BIT_RATE_2MBPS 0x00000002 +#define HW_BIT_RATE_5_5MBPS 0x00000004 +#define HW_BIT_RATE_6MBPS 0x00000008 +#define HW_BIT_RATE_9MBPS 0x00000010 +#define HW_BIT_RATE_11MBPS 0x00000020 +#define HW_BIT_RATE_12MBPS 0x00000040 +#define HW_BIT_RATE_18MBPS 0x00000080 +#define HW_BIT_RATE_22MBPS 0x00000100 +#define HW_BIT_RATE_24MBPS 0x00000200 +#define HW_BIT_RATE_36MBPS 0x00000400 +#define HW_BIT_RATE_48MBPS 0x00000800 +#define HW_BIT_RATE_54MBPS 0x00001000 + + +#define SHORT_PREAMBLE_BIT BIT_0 /*CCK or Barker depending on the rate*/ +#define OFDM_MOD_TYPE BIT_6 +#define PBCC_MOD_TYPE BIT_7 + +typedef enum +{ + MOD_PBCC = 1, + MOD_CCK, + MOD_OFDM +}Modulation_e; + + +#endif + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/report.h b/sta_dk/pform/linux/src/wlan_driver_inc/report.h new file mode 100644 index 0000000..6d46196 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/report.h @@ -0,0 +1,185 @@ +/** \file report.h + * \brief Report module API + * + * \see report.c + */ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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__ + +#include "osTIType.h" +#include "commonTypes.h" +#include "osApi.h" +#include "utils.h" + +/* report handle */ + +#define MAX_STRING_LEN 128 + +typedef struct +{ + TI_HANDLE hOs; + tiUINT8 SeverityTable[WLAN_MAX_SEVERITIES]; + tiUINT8 ModuleTable[WLAN_MAX_LOG_MODULES]; + char moduleDesc[WLAN_MAX_LOG_MODULES][MAX_STRING_LEN]; +} report_t; + + +/* The report mechanism is like that: + Each module ahas 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 + + +#define WLAN_REPORT_INIT(hReport, module, msg) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_INIT]) && (((report_t *)hReport)->ModuleTable[module])) \ + { os_report ("$B%c%s,INIT:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_INFORMATION(hReport, module, msg) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_INFORMATION]) && (((report_t *)hReport)->ModuleTable[module])) \ + { os_report ("$C%c%s,INFORMATION:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_WARNING(hReport, module, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_WARNING]) \ + { os_report ("$D%c%s,WARNING:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_ERROR(hReport, module, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_ERROR]) \ + { os_report ("$E%c%s,ERROR:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_FATAL_ERROR(hReport, module, msg) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_FATAL_ERROR]) && (((report_t *)hReport)->ModuleTable[module])) \ + { os_report ("$F%c%s,FATAL ERROR:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_SM(hReport, module, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_SM]) \ + { os_report ("$G%c%s,SM:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_CONSOLE(hReport, module, msg) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_CONSOLE]) && (((report_t *)hReport)->ModuleTable[module])) \ + { os_report ("$H%c%s,CONSOLE:", ((char)module + 'A'), ((report_t *)hReport)->moduleDesc[module]); os_report msg; } } while(0) +#define WLAN_REPORT_DEBUG_RX(hReport, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_DEBUG_RX]) \ + { os_report ("$AA,DEBUG RX:"); os_report msg; } } while(0) +#define WLAN_REPORT_DEBUG_TX(hReport, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_DEBUG_TX]) \ + { os_report ("$AA,DEBUG TX:"); os_report msg; } } while(0) +#define WLAN_REPORT_DEBUG_CONTROL(hReport, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_DEBUG_CONTROL]) \ + { os_report ("$AA,DEBUG CONTROL:"); os_report msg; } } while(0) +#define WLAN_REPORT_GWSI_RECORDING(hReport, msg) \ + do { if (hReport && ((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_GWSI_RECORDING]) \ + { os_report ("$AA,GWSI RECORDING:"); os_report msg; } } while(0) +#define WLAN_REPORT_HEX_INFORMATION(hReport, module, data, datalen) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_INFORMATION]) && (((report_t *)hReport)->ModuleTable[module])) \ + { HexDumpData(data, datalen); } } while(0) +#define WLAN_REPORT_MSDU_INFORMATION(hReport, module, pMsdu, title) \ + do { if (hReport && (((report_t *)hReport)->SeverityTable[WLAN_SEVERITY_INFORMATION]) && (((report_t *)hReport)->ModuleTable[module])) \ + { msduContentDump(pMsdu, title); } } while(0) +#define WLAN_OS_REPORT(msg) \ + do { os_report("$AA"); os_report msg;} while(0) + +#ifdef INIT_MESSAGES +#define WLAN_INIT_REPORT(msg) \ + do { os_report("$AA"); os_report msg;} while(0) +#else +#define WLAN_INIT_REPORT(msg) +#endif + +#else /* REPORT_LOG */ + + +/* NOTE: Keep a dummy report function call to treat compilation warnings */ + + +#define WLAN_REPORT_INIT(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_INFORMATION(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_WARNING(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_ERROR(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_FATAL_ERROR(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_SM(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_CONSOLE(hReport,module,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_HEX_INFORMATION(hReport,module,data,datalen) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_DEBUG_RX(hReport,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_DEBUG_TX(hReport,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_DEBUG_CONTROL(hReport,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_GWSI_RECORDING(hReport,msg) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_REPORT_MSDU_INFORMATION(hReport,module,pMsdu,title) \ + do { if (hReport == NULL) { } } while (0) +#define WLAN_OS_REPORT(msg) \ + do { } while (0) +#define WLAN_INIT_REPORT(msg) \ + do { } while (0) + +#endif /* REPORT_LOG */ + + +/* report module prototypes */ +TI_HANDLE report_create (TI_HANDLE hOs); +TI_STATUS report_config (TI_HANDLE hReport, TI_HANDLE hOs, reportInitParams_t * init_params); +TI_STATUS report_unLoad (TI_HANDLE hReport); + +void report_setReportModule (TI_HANDLE hReport, tiUINT8 module_index); +void report_clearReportModule (TI_HANDLE hReport, tiUINT8 module_index); +void report_getReportModuleTable (TI_HANDLE hReport, tiUINT8 *pModules); +void report_setReportModuleTable (TI_HANDLE hReport, tiUINT8 *pModules); +void report_setReportSeverity (TI_HANDLE hReport, tiUINT8 severity_index); +void report_clearReportSeverity (TI_HANDLE hReport, tiUINT8 severity_index); +void report_getReportSeverityTable (TI_HANDLE hReport, tiUINT8 *pSeverities); +void report_setReportSeverityTable (TI_HANDLE hReport, tiUINT8 *pSeverities); +TI_STATUS report_setParam (TI_HANDLE hReport, whalParamInfo_t *pParam); +TI_STATUS report_getParam (TI_HANDLE hReport, whalParamInfo_t *pParam); +void report_dummy (const char* fmt, ...); + +#endif /* __REPORT_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/roamingMngrTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/roamingMngrTypes.h new file mode 100644 index 0000000..1651278 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/roamingMngrTypes.h @@ -0,0 +1,103 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 roamingMngrTypes.h + * \brief Internal Roaming Manager Types API + * + * \see roamingMngr.c + */ + +/**************************************************************************** + * * + * MODULE: Roaming Manager * + * PURPOSE: Roaming Manager Module Types * + * * + ****************************************************************************/ + +#ifndef _ROAMING_MNGR_TYPES_H_ +#define _ROAMING_MNGR_TYPES_H_ + + +/* Constants */ + +/* Enumerations */ + +/* Typedefs */ +/* configuration of Roaming manager */ +#define ROAMING_ENABLED 1 +#define ROAMING_DISABLED 0 + +#pragma pack(1) +typedef struct +{ + UINT16 enableDisable; /* ROAMING_ENABLED, ROAMING_DISABLED - BOOL is not used, + beacuse of misdefinition between the Driver and CU */ + UINT16 lowPassFilterRoamingAttempt; /* Time to wait in sec, before roaming due to the low connection quality */ + INT8 apQualityThreshold; /* Quality indicator (RSSI) to be used when comparing AP List matching quality */ + +} roamingMngrConfig_t; +#pragma pack() + +#pragma pack(1) +typedef struct +{ + /* Roaming trigger thresholds */ + /* Note - It's the applicatio's responsibility to chage the threshold when Voice is On */ + UINT8 dataRetryThreshold; /* Consecutive number of TX retries */ + UINT8 numExpectedTbttForBSSLoss; /* number of expected TBTTs for BSS Loss event */ + UINT8 txRateThreshold; /* TX rate (fallback) threshold */ + INT8 lowRssiThreshold; /* low RSSI threshold */ + UINT8 lowSnrThreshold; /* low SNR threshold */ + INT8 lowQualityForBackgroungScanCondition; /* Indicator used to increase the background scan period when quality is low. */ + INT8 normalQualityForBackgroungScanCondition; /* Indicator used to reduce the background scan period when quality is normal. */ + UINT8 rssiFilterWeight; /* last RSSI weight in the AVG calculation */ + UINT8 snrFilterWeight; /* last SNR weight in the AVG calculation */ +} roamingMngrThresholdsConfig_t; +#pragma pack() + + + +#pragma pack(1) +typedef struct +{ + roamingMngrConfig_t roamingMngrConfig; + roamingMngrThresholdsConfig_t roamingMngrThresholdsConfig; +} roamingMngrConfigParams_t; +#pragma pack() + + + +#endif /* _ROAMING_MNGR_TYPES_H_*/ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/rxXfer_api.h b/sta_dk/pform/linux/src/wlan_driver_inc/rxXfer_api.h new file mode 100644 index 0000000..c64db5c --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/rxXfer_api.h @@ -0,0 +1,86 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" +#include "commonTypes.h" +#include "public_infoele.h" + +/* Public Function Definitions */ + + +TI_HANDLE rxXfer_Create(TI_HANDLE hOs); + +void rxXfer_Destroy(TI_HANDLE hRxXfer); + +void rxXfer_Config( TI_HANDLE hRxXfer, + TI_HANDLE hFwEvent, + TI_HANDLE hMemMgr, + TI_HANDLE hReport, + TI_HANDLE hTNETWIF); + +TI_STATUS rxXfer_RxEvent(TI_HANDLE hRxXfer); + +void rxXfer_Register_CB(TI_HANDLE hRxXfer,tiUINT32 CallBackID,void *CBFunc,TI_HANDLE CBObj); + +void rxXfer_SetDoubleBufferAddr(TI_HANDLE hRxXfer, ACXDataPathParamsResp_t *pDataPathParams); + +#ifdef TI_DBG + +void rxXfer_ClearStats( TI_HANDLE hRxXfer ); + +void rxXfer_PrintStats( TI_HANDLE hRxXfer ); + + +#endif /* TI_DBG */ +VOID RxXfer_ReStart(TI_HANDLE hRxXfer); + + +#endif /* _RX_XFER_API_H */ + + + + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/scanMngrTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/scanMngrTypes.h new file mode 100644 index 0000000..92f31c3 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/scanMngrTypes.h @@ -0,0 +1,209 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 scanMngrTypes.h + * \brief This file include public type definitions for the scan manager application level module, + * \brief to be included both by driver and user-mode. + * \author Ronen Kalish + * \date 01-Mar-2005 + */ + +#ifndef __SCAN_MNGR_TYPES_API_H__ +#define __SCAN_MNGR_TYPES_API_H__ + +#include "scanTypes.h" + +/* + *********************************************************************** + * Constant definitions. + *********************************************************************** + */ + +/* AMximal number of channels per band policy */ +#define MAX_BAND_POLICY_CHANNLES 30 + +/* + *********************************************************************** + * Enums. + *********************************************************************** + */ + +/* + *********************************************************************** + * Typedefs. + *********************************************************************** + */ + +/* + *********************************************************************** + * Structure definitions. + *********************************************************************** + */ + +/** \struct scan_probReqParams_t + * \brief This structure contains all information needed for probe request transmission. + */ +typedef struct +{ + UINT8 numOfProbeReqs; /**< number of probe requests to send */ + UINT8 txPowerDbm; /**< TX power at which to transmit */ + rateMask_e bitrate; /**< Bit rate at which to transmit */ +} scan_probReqParams_t; + +/** \struct scan_basicMethodParams_t + * \brief This structure contains parameters for basic scan operation + */ +typedef struct +{ + UINT32 maxChannelDwellTime; /**< Maximum time to spend on each channel */ + UINT32 minChannelDwellTime; /**< + * Minimum time to spend on each channel + * (if no activity at all was discovered + */ + scan_ETCondition_e earlyTerminationEvent; /**< The cause for early termination */ + UINT8 ETMaxNumberOfApFrames; /**< + * Number of frames from the above type after which + * scan is early terminated. + */ + scan_probReqParams_t probReqParams; /**< Parameters for probe request transmission */ +} scan_basicMethodParams_t; + +/** \struct scan_TidTriggeredMethodParams_t + * \brief This structure contains parameters for Tid-Triggered scan operation + */ +typedef struct +{ + scan_basicMethodParams_t basicMethodParams; /**< Basic scan parameters */ + UINT8 triggeringTid; /**< + * Tid triggering the basic scan, + * one channel at a time. + */ +} scan_TidTriggeredMethodParams_t; + +/** \struct scan_SPSMethodParams_t + * \brief This structure contains parameters for SPS scan operation + */ +typedef struct +{ + scan_ETCondition_e earlyTerminationEvent; /**< The cause for early termination */ + UINT8 ETMaxNumberOfApFrames; /**< + * Number of frames from the above type after which + * scan is early terminated. + */ + UINT32 scanDuration; /**< Time to spend on each channel (in usec) */ +} scan_SPSMethodParams_t; + +/** \struct scan_Method_t + * \brief This structure contains scan type, and accompanying parameters + */ +typedef struct +{ + scan_Type_e scanType; /**< + * scan type (normal - active or passive), + * Tid-Triggered (active or passive), or SPS + */ + union + { + scan_basicMethodParams_t basicMethodParams; /**< scan parameters for normal scan */ + scan_TidTriggeredMethodParams_t TidTriggerdMethodParams; /**< scan parameters for Tid-Triggered scan */ + scan_SPSMethodParams_t spsMethodParams; /**< scan parameters for SPS scan */ + } method; +} scan_Method_t; + +/** \struct scan_bandPolicy_t + * \brief This structure contains parameters comprising a scan policy for a single band + */ +typedef struct +{ + radioBand_e band; /**< the band (2.4 / 5 GHz) */ + scan_Method_t discoveryMethod; /**< scan method used to discover new BSS'es */ + scan_Method_t trackingMethod; /**< + * scan method used to track previously + * discovered AP's + */ + scan_Method_t immediateScanMethod; /**< scan method used for immediate scan */ + INT8 rxRSSIThreshold; /**< quality threshold for received frames */ + UINT8 numOfChannlesForDiscovery; /**< + * number of channels to scan at each discovery + * attempt + */ + UINT8 numOfChannles; /**< number of channels to use on this band */ + UINT8 channelList[ MAX_BAND_POLICY_CHANNLES ]; + /**< all possible channels */ +} scan_bandPolicy_t; + +/** \struct scan_Policy_t + * \brief This structure contains parameters comprising scan policies on all bands + */ +typedef struct +{ + UINT32 normalScanInterval; /**< + * time interval (im msec) at which to perform + * continuous scan, when current BSS quality is + * considered "normal". + */ + UINT32 deterioratingScanInterval; /**< + * time interval (in msec) at which to perform + * continuous scab, when current BSS quality is + * considered "deteriorating" + */ + UINT8 maxTrackFailures; /**< + * the max number of track failures to keep + * an AP in the BSS list + */ + UINT8 BSSListSize; /**< the number of APs in the BSS list */ + UINT8 BSSNumberToStartDiscovery; /**< + * the number of APs in the BSS list at which + * discovery process is initiated + */ + UINT8 numOfBands; /**< number of bands to scan */ + scan_bandPolicy_t bandScanPolicy[ RADIO_BAND_NUM_OF_BANDS ];/**< bands' policies */ +} scan_Policy_t; + +/* + *********************************************************************** + * External data definitions. + *********************************************************************** + */ + +/* + *********************************************************************** + * External functions definitions + *********************************************************************** + */ + + +#endif /* __SCAN_MNGR_TYPES_API_H__ */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/scanTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/scanTypes.h new file mode 100644 index 0000000..0862c2c --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/scanTypes.h @@ -0,0 +1,180 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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_TYPES_H +#define _SCAN_TYPES_H + +#include "osTIType.h" +#include "ratesTypes.h" +#include "osDot11.h" +#include "commonTypes.h" + +/***************************************************************************************** + Scan Definitions + --------------- +This file is included by the whalCtrl_api.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 + + /* + *********************************************************************** + * Enums. + *********************************************************************** + */ + + +/** \enum scan_Type_e + * \brief enumerates the different scan types + */ +typedef enum +{ + SCAN_TYPE_NORMAL_PASSIVE = 0, /**< normal passive scan */ + SCAN_TYPE_NORMAL_ACTIVE, /**< normal active scan */ + SCAN_TYPE_SPS, /**< scheduled passive scan */ + SCAN_TYPE_TRIGGERED_PASSIVE, /**< triggered passive scan */ + SCAN_TYPE_TRIGGERED_ACTIVE, /**< triggered active scan */ + SCAN_TYPE_NO_SCAN /**< no scan to perform */ +} scan_Type_e; + +/** \enum scan_ETCondition_e + * \brief enumerates the different early termination conditions + */ +typedef enum +{ + SCAN_ET_COND_DISABLE = 0x00, /**< no early termination */ + SCAN_ET_COND_BEACON = 0x10, /**< early termination on beacons */ + SCAN_ET_COND_PROBE_RESP = 0x20, /**< early termination on probe responses */ + SCAN_ET_COND_ANY_FRAME = 0x30, /**< early termination on beacons and probe responses */ + SCAN_ET_COND_NUM_OF_CONDS= 0x4 /**< number of early termination conditions */ +} scan_ETCondition_e; + +/*********************************************************************** + * Structure definitions. + *********************************************************************** + */ + +/** \struct scan_normalChannelEntry_t + * \brief This structure contains single channel parameters for normal scan operation (inc. triggered) + */ +typedef struct +{ + macAddress_t bssId; /**< BSS Id to filter with */ + UINT32 maxChannelDwellTime; /**< + * maximum time to dwell on the channel, in microseconds + * (if something was received) + */ + UINT32 minChannelDwellTime; /**< + * minimum time to dwell on the channel, in microseconds + * (if nothing was received) + */ + scan_ETCondition_e earlyTerminationEvent; /**< the event triggering early termination */ + UINT8 ETMaxNumOfAPframes; /**< + * the number of frames to receive + * to activate early termination + */ + + UINT8 txPowerDbm ; /**< + * the tx power to use for probe requests (for active scan) + */ + UINT8 channel; /**< the channel to scan */ +} scan_normalChannelEntry_t; + +/** \struct scan_SPSChannelEntry_t + * \brief This structure contains single channel parameters for an SPS scan operation + */ +typedef struct +{ + macAddress_t bssId; /**< BSS Id to filter with */ + UINT32 scanDuration; /**< time to dwell on the channel in microseconds */ + UINT32 scanStartTime; /**< exact time to start scan in 4 lower bytes of the TSF */ + scan_ETCondition_e earlyTerminationEvent; /**< the event triggering early termination */ + UINT8 ETMaxNumOfAPframes; /**< + * the number of frames to receive + * to activate early termination + */ + UINT8 channel; /**< the channel to scan */ +} scan_SPSChannelEntry_t; + +/** \union scan_channelEntry_u + * \brief This union holds single channel parameters either for normal scan or for SPS scan + */ +typedef union +{ + scan_normalChannelEntry_t normalChannelEntry; /**< normal scan parameters */ + scan_SPSChannelEntry_t SPSChannelEntry; /**< SPS scan parameters */ +} scan_channelEntry_u; + +/** \struct scan_Params_t + * \brief This structure contains parameters for a scan operation + */ +typedef struct +{ + ssid_t desiredSsid; /**< the SSID to search (optional) */ + scan_Type_e scanType; /**< + * scan type (normal - active or passive, + * SPS, triggered - active or passive) + */ + radioBand_e band; /**< band to scan (A / BG) */ + UINT8 probeReqNumber; /**< number of probe requests to send (for active scan) */ + rateMask_e probeRequestRate; /**< the rate at which to send the probe requests */ + UINT8 Tid; /**< the Tid triggering the scan (for triggered scan) */ + UINT64 latestTSFValue; /**< + * for SPS scan - the latest TSF at which a frame was + * received. Used to detect TSF error (AP recovery). + */ + UINT32 SPSScanDuration; /**< + * for SPS scan ONLY - the time duration of the scan (in + * milliseconds), used to set timer according to. + */ + UINT8 numOfChannels; /**< number of channels */ + + scan_channelEntry_u channelEntry[ MAX_NUMBER_OF_CHANNELS_PER_SCAN ]; /**< channels array */ +} scan_Params_t; + +#endif + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/srcApi.h b/sta_dk/pform/linux/src/wlan_driver_inc/srcApi.h new file mode 100644 index 0000000..b16a2e9 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/srcApi.h @@ -0,0 +1,149 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: srcApi.h */ +/* PURPOSE: Header file of config Manager module */ +/* */ +/**************************************************************************/ + +#ifndef __SRC_API_H__ +#define __SRC_API_H__ + +#include "osTIType.h" +#include "paramOut.h" +#include "memMngrEx.h" + +#define DRIVER_SHUTDOWN_SME_STOPPED 0x1 +#define DRIVER_SHUTDOWN_COMPLETE (DRIVER_SHUTDOWN_SME_STOPPED) + +TI_HANDLE configMgr_create(TI_HANDLE hOs,void *pWLAN_Images, + initTable_t *pInitTable, + macAddress_t *pMac); + +TI_HANDLE configMgr_init (TI_HANDLE hOs,TI_HANDLE hConfigManager,void *pWLAN_Images, + initTable_t *pInitTable, + macAddress_t *pMac); + + +/* Unload for windows */ +TI_STATUS configMgr_unLoad(TI_HANDLE hConfigMgr); + +/* Start unload process (stop SME) */ +TI_STATUS configMgr_InitiateUnload(TI_HANDLE hConfigMgr); + +/* Unload all modules (free memory etc) */ +TI_STATUS configMgr_UnloadModules (TI_HANDLE hConfigMgr); + +/* Return internal shutdown status */ +UINT8 configMgr_DriverShutdownStatus(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_start(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_stop(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_setParam(TI_HANDLE hConfigMgr, + paramInfo_t *pParam); + +TI_STATUS configMgr_getParam(TI_HANDLE hConfigMgr, + paramInfo_t *pParam); + +TI_STATUS configMgr_sendMsdu(TI_HANDLE hConfigMgr, + mem_MSDU_T *pMsdu, + UINT8 packet_DTag); + +TI_STATUS configMgr_PollApPackets(TI_HANDLE hConfigMgr); + + +TI_STATUS configMgr_checkTxQueueSize(TI_HANDLE hConfigMgr,UINT8 qIndex); + +/* Event Handler wrapper */ +UINT32 configMgr_RegisterEvent(TI_HANDLE hConfigMgr, PUCHAR pData, ULONG Length); + +UINT32 configMgr_UnRegisterEvent(TI_HANDLE hConfigMgr, TI_HANDLE uEventID); + +UINT32 configMgr_MaskEvent(TI_HANDLE hConfigMgr, UINT32 uEventID); + +UINT32 configMgr_UnMaskEvent(TI_HANDLE hConfigMgr, UINT32 uEventID); + +/* Initiated from User Space to fetch event data*/ +UINT32 configMgr_GetEventData (TI_HANDLE hConfigMgr, PUCHAR pData, ULONG* pLength); + +/* Memory manager wrapper */ +TI_STATUS configMgr_allocBDs(TI_HANDLE hConfigMgr, + UINT32 bdNumber, + mem_BD_T** bdPtr); + +TI_STATUS configMgr_allocMSDU(TI_HANDLE hConfigMgr, + mem_MSDU_T** MSDUPtr, + UINT32 len, + allocatingModule_e module); + +TI_STATUS configMgr_allocMSDUBufferOnly(TI_HANDLE hConfigMgr, + mem_MSDU_T** MSDUPtr, + allocatingModule_e module); + +TI_STATUS configMgr_memMngrFreeMSDU(TI_HANDLE hConfigMgr, + UINT32 handle); + +/* HAL wrapper */ +TI_STATUS configMgr_HandleBusTxn_Complete(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_handleInterrupts(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_enableInterrupts(TI_HANDLE hConfigMgr); + +TI_STATUS configMgr_disableInterrupts(TI_HANDLE hConfigMgr); + +UINT32 configMgr_checkInterrupts(TI_HANDLE hConfigMgr); + +BOOL configMgr_isCardExist(TI_HANDLE hConfigMgr); + +BOOL configMgr_areInputsFromOsDisabled(TI_HANDLE hConfigMgr); + +UINT32 configMgr_ReadMacRegister(TI_HANDLE hConfigMgr, UINT32 addr); +void configMgr_WriteMacRegister(TI_HANDLE hConfigMgr, UINT32 addr, UINT32 val); +UINT32 configMgr_ReadPhyRegister(TI_HANDLE hConfigMgr, UINT32 addr); +void configMgr_WritePhyRegister(TI_HANDLE hConfigMgr, UINT32 addr, UINT32 val); + +UINT32 configMgr_getPacketHeaderLength(TI_HANDLE hConfigMgr, void *pData, UINT32 txFlags); + +void configMgr_SlaveAckMaskNotification(TI_HANDLE hConfigMgr); + +void configMgr_GetInitParams (TI_HANDLE hConfigMgr, UINT8* ioBuffer, UINT16 *outBufLen); + +#endif /* __SRC_API_H__ */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/systemGeneralParam.h b/sta_dk/pform/linux/src/wlan_driver_inc/systemGeneralParam.h new file mode 100644 index 0000000..843cc16 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/systemGeneralParam.h @@ -0,0 +1,48 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: SYSTEM_GENERAL_PARAM.H*/ +/**/ +/* Purpose: This module contains All the system definisions.*/ +/**/ +/*--------------------------------------------------------------------------*/ +#ifndef __SYSTEM_GENERAL_PARAM_H__ +#define __SYSTEM_GENERAL_PARAM_H__ + + + + +#endif /* __SYSTEM_GENERAL_PARAM_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/tiQosTypes.h b/sta_dk/pform/linux/src/wlan_driver_inc/tiQosTypes.h new file mode 100644 index 0000000..c22ce99 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/tiQosTypes.h @@ -0,0 +1,272 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: */ +/**/ +/*--------------------------------------------------------------------------*/ + +#if !defined TI_QOS_TYPES_H +#define TI_QOS_TYPES_H + + +#define TI_WLAN_QOS_RETURN_CODES \ + NOT_CONNECTED,\ + TRAFIC_ADM_PENDING,\ + NO_QOS_AP,\ + ADM_CTRL_DISABLE,\ + AC_ALREADY_IN_USE,\ + USER_PRIORITY_NOT_ADMITTED\ +/* + NOT_CONNECTED - Not connected to AP + TRAFIC_ADM_PENDING - TSPEC request sent - awaiting response + NO_QOS_AP - primary AP does not support QOS (WME) + ADM_CTRL_DISABLE - Admission control disabled + AC_ALREADY_IN_USE - A TSPEC has already been sent on this specific AC + USER_PRIORITY_NOT_ADMITTED - User priority is not admitted (TSPEC not sent) +*/ + + +typedef enum{ + QOS_AC_BE = 0, + QOS_AC_BK, + QOS_AC_VI, + QOS_AC_VO, + QOS_HIGHEST_AC_INDEX = QOS_AC_VO, + +}acTrfcType_e; /* for TI_HANDLE hAcTrfcCtrl */ + +#define MAX_NUM_OF_AC ( QOS_HIGHEST_AC_INDEX+1 ) +#define FIRST_AC_INDEX QOS_AC_BE +#define MAX_NUM_OF_802_1d_TAGS 8 + +#define AC_PARAMS_MAX_TSID 15 +#define MAX_APSD_CONF 0xffff + + +/* + * this enum defines FW PS policing modes + */ +typedef struct _OS_802_11_QOS_PARAMS +{ + tiUINT32 acID; + tiUINT32 MaxLifeTime; + tiUINT32 VoiceDeliveryProtocol; + tiUINT32 PSDeliveryProtocol; +} OS_802_11_QOS_PARAMS; + +typedef struct { + tiUINT32 psPoll; + tiUINT32 UPSD; +} OS_802_11_QOS_RX_TIMEOUT_PARAMS; + +typedef struct _OS_802_11_AC_QOS_PARAMS +{ + tiUINT32 uAC; + tiUINT32 uAssocAdmissionCtrlFlag; + tiUINT32 uAIFS; + tiUINT32 uCwMin; + tiUINT32 uCwMax; + tiUINT32 uTXOPLimit; +} OS_802_11_AC_QOS_PARAMS; + +typedef struct _OS_802_11_AP_QOS_CAPABILITIES_PARAMS +{ + tiUINT32 uQOSFlag; + tiUINT32 uAPSDFlag; +} OS_802_11_AP_QOS_CAPABILITIES_PARAMS; + +typedef struct _OS_802_11_QOS_TSPEC_PARAMS +{ + tiUINT32 uUserPriority; + tiUINT32 uNominalMSDUsize; /* in bytes */ + tiUINT32 uMeanDataRate; /* bits per second */ + tiUINT32 uMinimumPHYRate; /* 1,2,5,6,9,11,12,18,......*/ + tiUINT32 uSurplusBandwidthAllowance; + tiUINT32 uAPSDFlag; + tiUINT32 uMediumTime; + tiUINT32 uReasonCode; +} OS_802_11_QOS_TSPEC_PARAMS; + +typedef struct _OS_802_11_QOS_DELETE_TSPEC_PARAMS +{ + tiUINT32 uUserPriority; + tiUINT32 uReasonCode; +} OS_802_11_QOS_DELETE_TSPEC_PARAMS; + +typedef struct _OS_802_11_QOS_DESIRED_PS_MODE +{ + tiUINT32 uDesiredPsMode; + tiUINT32 uDesiredWmeAcPsMode[MAX_NUM_OF_AC]; +} 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, - according to the standard*/ + ADDTS_RESPONSE_AP_PARAM_INVALID = 253, + ADDTS_RESPONSE_TIMEOUT = 254, + TSPEC_DELETED_BY_AP = 255, +} tspec_status_e; + +typedef struct _OS_802_11_AC_UPSD_STATUS_PARAMS +{ + tiUINT32 uAC; + tiUINT32 uCurrentUAPSDStatus; + tiUINT32 pCurrentAdmissionStatus; +} OS_802_11_AC_UPSD_STATUS_PARAMS; + +typedef struct _OS_802_11_THRESHOLD_CROSS_PARAMS +{ + tiUINT32 uAC; + tiUINT32 uHighThreshold; + tiUINT32 uLowThreshold; +} OS_802_11_THRESHOLD_CROSS_PARAMS; + +typedef struct OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS +{ + tiUINT32 uAC; + tiUINT32 uHighOrLowThresholdFlag; /* According to thresholdCross_e enum */ + tiUINT32 uAboveOrBelowFlag; /* According to thresholdCrossDirection_e enum */ +} OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS; + +typedef enum{ + HIGH_THRESHOLD_CROSS, + LOW_THRESHOLD_CROSS, +} thresholdCross_e; + +typedef enum{ + CROSS_ABOVE, + CROSS_BELOW, +} thresholdCrossDirection_e; + +typedef struct _STREAM_TRAFFIC_PROPERTIES{ + UINT32 dstIpAddress; + UINT32 dstPort; + UINT32 PktTag; + UINT32 userPriority; +} STREAM_TRAFFIC_PROPERTIES; + + +typedef enum{ + AC_NOT_ADMITTED, + AC_WAIT_ADMISSION, + AC_ADMITTED +} trafficAdmState_e; + +typedef enum{ + UPLINK_DIRECTION = 0, + DOWNLINK_DIRECTION = 1, + RESERVED_DIRECTION = 2, + BI_DIRECTIONAL = 3, +} streamDirection_e; + + +/* 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_TYPE_MAX = IPPORT_CLSFR, +} clsfr_type_e; + +typedef struct clsfrTypeAndSupport +{ + ULONG ClsfrType; + UINT8 oldVersionSupport; +} clsfrTypeAndSupport; + + +/*************************/ +/* classifier params */ +/*************************/ + +/* This type represents a pair of +destination IP address and destination port number. */ +typedef struct +{ + UINT32 DstIPAddress; + UINT16 DstPortNum; +} IP_Port_t; + +/* Classification mapping + table. +*/ +typedef struct +{ + union + { + IP_Port_t DstIPPort; /* for destination IP&Port classifier*/ + UINT16 DstPortNum; /* for destination Port classifier*/ + UINT8 CodePoint; /* for DSCP classifier*/ + }Dscp; + UINT8 DTag; +} clsfr_tableEntry_t; + +/* Classifier parameters */ + +/* number of classifier entries in the classification table */ +#define NUM_OF_CLSFR_TABLE_ENTRIES 16 + +typedef struct +{ + clsfr_type_e clsfrType; /* The type of the classifier: D-tag, DSCP, Port or IP&Port */ + UINT8 NumOfActiveEntries; /* The number of active entries in the classification table */ + clsfr_tableEntry_t + ClsfrTable[NUM_OF_CLSFR_TABLE_ENTRIES]; /* Classification table - size changed from 15 to 16*/ +} clsfr_Params_t; + +/* This type is use by setParam to insert classifier table entries */ +typedef struct +{ + UINT8 EntriesNum; + UINT32 *BufferPtr; +} clsfr_insertEntry_t; + +#endif /* TI_QOS_TYPES_H */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/ti_types.h b/sta_dk/pform/linux/src/wlan_driver_inc/ti_types.h new file mode 100644 index 0000000..aa461b0 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/ti_types.h @@ -0,0 +1,125 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _TYPES_H +#define _TYPES_H +#define TYPES_H + +/*typedef unsigned char uint8;*/ +/*typedef unsigned short uint16;*/ +/*typedef unsigned int uint32;*/ +/*typedef tiULONGLONG uint64;*/ + +/*typedef char int8;*/ +/*typedef short int16;*/ +/*typedef int int32;*/ + +/*typedef uint8 MACAddress[6];*/ + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#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 + +#endif /*_TYPES_H*/ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/tiioctl.h b/sta_dk/pform/linux/src/wlan_driver_inc/tiioctl.h new file mode 100644 index 0000000..14eb0ef --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/tiioctl.h @@ -0,0 +1,1331 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 __TIIOCTL_H__ +#define __TIIOCTL_H__ + +/* OID Mode*/ +#define IOCTRL_SET 0 +#define IOCTRL_GET 1 +#define IOCTRL_SET_GET 2 + +#ifndef FILE_DEVICE_UNKNOWN + +/**/ +/* Macro definition for defining IOCTL and FSCTL function control codes. Note*/ +/* that function codes 0-2047 are reserved for Microsoft Corporation, and*/ +/* 2048-4095 are reserved for customers.*/ +/**/ + +#define CTL_CODE( DeviceType, Function, Method, Access ) ( \ + ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \ +) + +#define FILE_DEVICE_UNKNOWN 0x00000022 +#define METHOD_BUFFERED 0 +#define FILE_ANY_ACCESS 0 + +#endif /* FILE_DEVICE_UNKNOWN */ + +/* IOCTL info, needs to be visible for application. Should be in a custom range (0x800..)*/ +#define SHELLDRV_IOCTL_INDEX 0x00800 + +/* Offsets for IOTCLS bases*/ +#define D11BASIC_IOCTLS_OFFSET 0x0 +#define D11PACKET_PARAMS_IOCTLS_OFFSET 0x100 +#define RATES_IOCTLS_OFFSET 0x200 +#define CHANNEL_IOCTLS_OFFSET 0x300 +#define POWER_IOCTLS_OFFSET 0x400 +#define SECURITY_IOCTLS_OFFSET 0x500 +#define MISC_IOCTLS_OFFSET 0x600 +#define DEBUG_IOCTLS_OFFSET 0x700 +#define SCAN_IOCTLS_OFFSET 0x800 +#define VOICE_QOS_IOCTLS_OFFSET 0x900 +#define ROAMING_IOCTLS_OFFSET 0xa00 +#define MEASUREMENT_IOCTLS_OFFSET 0xa80 +#define PLT_IOCTLS_OFFSET 0xb00 + +#ifdef _WINDOWS // Windows Mobile specific IOCTL's +#endif /* ifdef _WINDOWS */ +/********************************************/ + +typedef struct tagDeviceInfo +{ +char csKeyName[260]; +char csDriverKey[260]; +char csDescription[260]; +} TIWLNDEVINFO, *PTIWLNDEVINFO; + + +/********************** Basic dot11 Functionality ****************************************/ + +#define TIWLN_802_11_BSSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_BSSID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_BSSID_LIST CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SSID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DESIRED_SSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DISASSOCIATE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_ASSOCIATION_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_NETWORK_TYPES_SUPPORTED CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_NETWORK_TYPE_IN_USE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_NETWORK_TYPE_IN_USE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_INFRASTRUCTURE_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_INFRASTRUCTURE_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DESIRED_INFRASTRUCTURE_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_AUTHENTICATION_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_AUTHENTICATION_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CONFIGURATION_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CONFIGURATION_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_FULL_BSSID_LIST CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/********************** Rates Functionality ****************************************/ + +#define TIWLN_802_11_SUPPORTED_RATES CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DESIRED_RATES_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SUPPORTED_RATES_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CURRENT_RATES_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_EXT_RATES_IE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_EXT_RATES_IE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/********************** Channel Functionality ****************************************/ + +#define TIWLN_802_11_DESIRED_CHANNEL_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DESIRED_CHANNEL_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CHANNEL_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_CURRENT_REGDOMAIN_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_CURRENT_REGDOMAIN_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REGDOMAIN_TABLE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_ROAM_PROFILE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_ROAM_PROFILE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11D CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11H CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_GET_802_11D CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_GET_802_11H CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_GET_COUNTRY_2_4 CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_SET_COUNTRY_2_4 CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_GET_COUNTRY_5 CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_SET_COUNTRY_5 CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_SET_DFS_RANGE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REG_DOMAIN_GET_DFS_RANGE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +/********************** Power Functionality ****************************************/ + +#define TIWLN_802_11_POWER_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TX_POWER_LEVEL_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TX_POWER_DBM_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_NUMBER_OF_ANTENNAS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RX_ANTENNA_SELECTED_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RX_ANTENNA_SELECTED_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TX_ANTENNA_SELECTED_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TX_ANTENNA_SELECTED_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLAN_802_11_ANTENNA_DIVERSITY_PARAM_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RSSI CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RSSI_TRIGGER_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RSSI_TRIGGER_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SLEEP_CMD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TX_POWER_DBM_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_MGR_PROFILE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_BOUNDARY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_PERODIC_WAKEUP_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_PERODIC_WAKEUP_TIMEOUT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_DEFAULT_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 20, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_DEFAULT_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 21, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_PS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 22, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_PS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 23, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 24, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + + +#define TIWLN_802_11_SNR CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 25, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 26, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 27, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 28, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/********************** dot11 Network Packet Parameters ****************************************/ + +#define TIWLN_802_11_FRAGMENTATION_THRESHOLD_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_FRAGMENTATION_THRESHOLD_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RTS_THRESHOLD_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RTS_THRESHOLD_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SHORT_PREAMBLE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SHORT_PREAMBLE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SHORT_RETRY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SHORT_RETRY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_LONG_RETRY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_LONG_RETRY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SHORT_SLOT_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SHORT_SLOT_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_IBSS_PROTECTION_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_IBSS_PROTECTION_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/************************** Security **************************************/ + +#define TIWLN_802_11_ADD_WEP CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_REMOVE_WEP CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_WEP_STATUS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_WEP_STATUS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_PRIVACY_FILTER_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_PRIVACY_FILTER_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_ADD_KEY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_REMOVE_KEY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_OPEN_EAPOL_INTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_CLOSE_EAPOL_INTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SEND_EAPOL_PACKET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_MIXED_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_MIXED_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_SECURITY_TYPE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 20, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_SECURITY_TYPE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 21, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +/* Supplicant use only*/ +#define TIWLN_SUPPL_INIT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 22, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_SUPPL_TERMINATE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 23, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_PSK_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 24, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_EAP_TYPE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 25, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_USER_ID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 26, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_USER_PASSWORD_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 27, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_CERT_PARAMS_SHA1_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 28, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_ROGUE_AP_DETECTED CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 29, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_REPORT_ROGUE_APS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 30, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_CCKM_REQUEST CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 31, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_CCKM_RESULT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 32, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_PMKID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 33, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_KEY_TYPE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 34, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_CONFIGURATION_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 35, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_CONFIGURATION_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 36, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_NETWORK_EAP_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 37, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_NETWORK_EAP_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 38, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +/* Supplicant use only*/ +#define TIWLN_802_11_CERT_PARAMS_FILE_NAME_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 39, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EXC_AUTH_SUCCESS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 40, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_PMKID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 41, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_WPA_OPTIONS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 42, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_WPA_OPTIONS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 43, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CAPABILITY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 44, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_AVAILABLE_OPTIONS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 45, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_EAP_TYPE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 46, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_EAP_TYPE_DRIVER_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 47, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +/************************** Misc **************************************/ + +#define TIWLN_IOCTL_OID_QUERY_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_IOCTL_OID_SET_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_MEDIUMUSAGE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_RELOAD_DEFAULTS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_DRIVER_STATUS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_DRIVER_STATUS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_HW_READ_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_HW_WRITE_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_HW_RESET_HW CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_ENABLE_EVENT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DISABLE_EVENT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SET_INIT_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_3_CURRENT_ADDRESS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_APIP_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_4XACTIVESTATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_SW_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_EVENT_DATA CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_DRIVER_SUSPEND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define SET_IPC_EVENT_HANDLE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 20, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define DESTROY_IPC_EVENT_HANDLE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 21, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CONFIG_EVENTS_RSSI CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 22, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_DRIVERS_CAPABILITIES CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 23, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_SELECTED_BSSID_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 24, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_DRIVER_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 25, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define BT_COEXSISTANCE_SET_ENABLE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 26, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define BT_COEXSISTANCE_SET_RATE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 27, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define BT_COEXSISTANCE_SET_CONFIG CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 28, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define BT_COEXSISTANCE_GET_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 29, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_TX_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 30, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_DISPATCH_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 31, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_GET_INIT_TABLE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 32, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_INITIALIZE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 33, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_CONFIGURE_TABLE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 34, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_RELEASE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 36, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define GWSI_DISPATCH_GET_CMD_LEN(_p_cmd) (*((tiUINT16 *)_p_cmd + 1)) + +#define TIWLN_802_11_SET_TRAFFIC_INTENSITY_THRESHOLDS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 37, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_TRAFFIC_INTENSITY_THRESHOLDS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 38, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 39, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_PRIMARY_BSSID_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 40, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_EARLY_WAKEUP_IE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 41, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_EARLY_WAKEUP_IE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 42, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 43, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_ADD_RX_DATA_FILTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 44, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REMOVE_RX_DATA_FILTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 45, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_RX_DATA_FILTERS_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 46, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_POWER_CONSUMPTION_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 47, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/************************** Debug **************************************/ + +#ifdef TI_DBG + + +#define TIWLN_GET_DBG_BUFFER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SET_MODULE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_MODULE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SET_DEBUG_FLAG CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_DEBUG_FLAG CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_DISPLAY_STATS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_SET_SEVERITY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_GET_SEVERITY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REPORT_MODULE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REPORT_MODULE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REPORT_SEVERITY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REPORT_SEVERITY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) +#define TIWLN_DRIVER_DEBUG_PRINT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_REPORT_PPMODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_OS_DBG_STATE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_OS_DBG_STATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#ifdef DRIVER_PROFILING + +#define TIWLAN_PROFILING_REPORT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_START 0x01 +#define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_STOP 0x02 +#define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_RESET 0x03 + +#endif /* DRIVER_PROFILING */ + +#endif /* TI_DBG*/ + + +/************************************** Scan ********************************************/ + +#define TIWLN_802_11_START_APP_SCAN_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 1,\ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_STOP_APP_SCAN_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 2,\ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SCAN_POLICY_PARAM_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 3,\ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SCAN_BSS_LIST_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 4,\ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +/*************************************** Voice & QOS ********************************************/ + +#define TIWLN_802_11_SET_QOS_PARAMS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POLL_AP_PACKETS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_CONFIG_TX_CLASS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_REMOVE_CLSFR_ENTRY CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_CLSFR_TYPE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_AP_QOS_PARAMS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_AP_QOS_CAPABILITIES CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_ADD_TSPEC CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_TSPEC_PARAMS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_DELETE_TSPEC CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_CURRENT_AC_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SET_MEDIUM_USAGE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SET_PHY_RATE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_MEDIUM_USAGE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_PHY_RATE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_GET_USER_PRIORITY_OF_STREAM CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_POLL_AP_PACKETS_FROM_AC CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_DESIRED_PS_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SET_RX_TIMEOUT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 20, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SET_DTAG_TO_AC_MAPPING_TABLE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 21, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_SET_VAD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 22, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_GET_VAD CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 23, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +/*****************************************************************************************************/ +/*** Roaming Manager Configuration Parameters ***/ + +#define TIWLN_802_11_ROAMING_CONFIG_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + ROAMING_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_802_11_ROAMING_CONFIG_PARAMS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + ROAMING_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +/*****************************************************************************************************/ +/*** measurement Manager Configuration Parameters ***/ + +#define TIWLN_802_11_MEASUREMENT_ENABLE_DISABLE_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MEASUREMENT_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + +#define TIWLN_802_11_MEASUREMENT_MAX_DURATION_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + MEASUREMENT_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + + + + + +/*************************************** PLT ********************************************/ + +#define TIWLN_PLT_WRITE_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_READ_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_PER_START CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_PER_STOP CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_PER_CLEAR CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_PER_GET_RESULTS CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_TX_CW CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_TX_CONTINUES CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_TX_STOP CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_MIB_WRITE CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_MIB_READ CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_TX_CAL CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_CAL CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define TIWLN_PLT_RX_CAL_RESULT CTL_CODE(FILE_DEVICE_UNKNOWN, \ + SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#ifdef _WINDOWS +#endif /* ifdef _WINDOWS */ + +#endif + + + + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/tiwlnif.h b/sta_dk/pform/linux/src/wlan_driver_inc/tiwlnif.h new file mode 100644 index 0000000..ebad92a --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/tiwlnif.h @@ -0,0 +1,421 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 "osTIType.h" +#endif + +#define REGDOMAIN_TABLE_SIZE 16 + +#define MAX_NUM_OF_TX_QUEUES 4 + + +typedef enum _tiwlnOSVersion +{ + tiwlnIsWin95 = 1, + tiwlnIsWin98 = 2, + tiwlnIsWinNT = 3, + tiwlnIsWin98SE = 4, + tiwlnIsWinME = 5, + tiwlnIsWin2K = 6, + tiwlnIsWinXP = 7 +} TIWLN_OS_VERSION; + +typedef enum _TIWLN_PRIVACY_MODE +{ + TIWLN_PRIVACY_NONE = 0, + TIWLN_PRIVACY_WEP, + TIWLN_PRIVACY_ZCU, + TIWLN_PRIVACY_EXC +}TIWLN_PRIVACY_MODE; + +PACKED_STRUCT( _dbgBufferHdr , + + tiCHAR* pBuff; + tiUINT32* puIndex; + tiUINT32 uSize; +); +typedef _dbgBufferHdr DBG_BUFFER_HDR; + +PACKED_STRUCT( _TIWLN_REG_RW , + + tiUINT32 regSize; + tiUINT32 regAddr; + tiUINT32 regValue; +); +typedef _TIWLN_REG_RW TIWLN_REG_RW; + +PACKED_STRUCT( _ACX_VERSION_DEF , + + tiUINT8 major; + tiUINT8 minor; + tiUINT8 bugfix; + tiUINT8 subld; + tiUINT8 build; +); +typedef _ACX_VERSION_DEF acxVersionDef, *pacxVersionDef; + +PACKED_STRUCT( _TIWLN_VERSION , + + acxVersionDef AppVersion; + acxVersionDef DrvVersion; + acxVersionDef FWVersion; + acxVersionDef HWVersion; + tiUINT32 osNdisVersion; /* for OS Windows - Ndis, for Linux - WirelessExt ver.*/ +); +typedef _TIWLN_VERSION TIWLN_VERSION, *PTIWLN_VERSION; + +PACKED_STRUCT( _TIWLN_VERSION_EX , + + acxVersionDef AppVersion; + acxVersionDef DrvVersion; + acxVersionDef FWVersion; + acxVersionDef HWVersion; + tiUINT32 osNdisVersion; /* for OS Windows - Ndis, for Linux - WirelessExt ver.*/ + tiUINT32 extVerSign; /* Extended version signature*/ + acxVersionDef NVVersion; +); +typedef _TIWLN_VERSION_EX TIWLN_VERSION_EX, *PTIWLN_VERSION_EX; + +typedef enum _TIWLN_RATES +{ + TIWLN_RATE_1 = 0x0A, + TIWLN_RATE_2 = 0x14, + TIWLN_RATE_5_5 = 0x37, + TIWLN_RATE_5_5_PBCC = 0xB7, + TIWLN_RATE_11 = 0x6E, + TIWLN_RATE_11_PBCC = 0xEE, + TIWLN_RATE_22_PBCC = 0xDC +} TIWLN_RATES; + +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; + +PACKED_STRUCT( _OS_802_11_DRIVER_CAPABILITIES , + + tiUINT8 EXCVersion; +); +typedef _OS_802_11_DRIVER_CAPABILITIES OS_802_11_DRIVER_CAPABILITIES; + + +/* SME SM definitions - Need to update this whenever the SME SM states change */ +/* Table is used for "translating" SME SM states into more "simple" states reported by the TI_GetDriverState API call */ +typedef enum +{ + SM_STATE_IDLE = 0, + SM_STATE_SCANNING = 1, + SM_STATE_SELECTING = 2, + SM_STATE_CONNECTING = 3, + SM_STATE_CONNECTED = 4, + SM_STATE_QUIET_SCAN = 5, + SM_STATE_INTER_SCAN_TIMEOUT = 6, + SM_STATE_ROAMING_QUIET_SCAN = 7, + SM_STATE_RADIO_STAND_BY = 8, + SM_STATE_MEASUREMENT = 9, + SM_STATE_POWER_MNGR_PENDS_QUIET_SCAN = 10 +} stateDrvSme_e; + +typedef enum +{ + DRIVER_STATE_IDLE = 0, + DRIVER_STATE_SCANNING = 1, + DRIVER_STATE_SELECTING = 2, + DRIVER_STATE_CONNECTING = 3, + DRIVER_STATE_CONNECTED = 4, + DRIVER_STATE_DISCONNECTED = 5, +} driverState_e; + +PACKED_STRUCT( _TIWLAN_CONFIG_SCAN_PARAMS , + + UINT32 uMaxChanScanTime; + UINT32 uMinChanScanTime; + UINT32 uEarlyTerminationMode; + UINT32 uETMaxNumOfAPframes; + UINT32 uScanInterval; + UINT32 uNumOfProbeReq; +); +typedef _TIWLAN_CONFIG_SCAN_PARAMS TIWLAN_CONFIG_SCAN_PARAMS; + + +/* The Tx path delay histogram ranges in msec. */ +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; + +#define TX_RETRY_HISTOGRAM_SIZE 16 + +PACKED_STRUCT( txDataCounters_t , + + UINT32 XmitOk; /* the number of frames that were transferred to TNET without errors */ + UINT32 DirectedBytesXmit; /* the number of bytes in directed packets that are transmitted without errors */ + UINT32 DirectedFramesXmit; /* the number of directed packets that are transmitted without errors */ + UINT32 MulticastBytesXmit; /* the number of bytes in multicast/functional packets that are transmitted without errors.*/ + UINT32 MulticastFramesXmit; /* the number of multicast/functional packets that are transmitted without errors.*/ + UINT32 BroadcastBytesXmit; /* the number of bytes in broadcast packets that are transmitted without */ + UINT32 BroadcastFramesXmit; /* the number of broadcast packets that are transmitted without errors */ + + UINT32 RetryHistogram[ TX_RETRY_HISTOGRAM_SIZE ]; + /* Histogram counting the number of packets xfered with any retry number */ + UINT32 RetryFailCounter; /* Number of packets that failed transmission due to retry number exceeded */ + UINT32 TxTimeoutCounter; /* Number of packets that failed transmission due to lifetime expiry */ + UINT32 NoLinkCounter; /* Number of packets that failed transmission due to link failure */ + UINT32 OtherFailCounter; /* Number of packets that failed transmission due to other reasons */ + UINT32 MaxConsecutiveRetryFail;/* Maximum consecutive packets that failed transmission due to retry limit exceeded */ + + /* TX path delay statistics */ + UINT32 txDelayHistogram[TX_DELAY_RANGES_NUM];/* Histogram of Tx path delay (host + MAC). */ + UINT32 NumPackets; /* For average calculation - Total packets counted. */ + UINT32 SumTotalDelayMs; /* For average calculation - the sum of packets total delay. */ + UINT32 SumFWDelayUs; /* For average calculation - The sum of packets FW delay. */ + UINT32 SumMacDelayUs; /* For average calculation - the sum of packets MAC delay. */ +); + +typedef struct +{ + txDataCounters_t txCounters[ MAX_NUM_OF_TX_QUEUES ]; +} TIWLN_TX_STATISTICS; + +PACKED_STRUCT( TIWLN_COUNTERS , + + UINT32 RecvOk; /* num of frames that the NIC receives without errors*/ + UINT32 RecvError; /* num of frames that a NIC receives but does not indicate to the protocols due to errors*/ + UINT32 RecvNoBuffer; /* num of frames that the NIC cannot receive due to lack of NIC receive buffer space */ + UINT32 DirectedBytesRecv; /* num of bytes in directed packets that are received without errors */ + UINT32 DirectedFramesRecv; /* num of directed packets that are received without errors */ + UINT32 MulticastBytesRecv; /* num of bytes in multicast/functional packets that are received without errors */ + UINT32 MulticastFramesRecv; /* num of multicast/functional packets that are received without errors */ + UINT32 BroadcastBytesRecv; /* num of bytes in broadcast packets that are received without errors. */ + UINT32 BroadcastFramesRecv; /* num of broadcast packets that are received without errors. */ + + UINT32 FragmentsRecv; + UINT32 FrameDuplicates; + UINT32 FcsErrors; + + UINT32 BeaconsXmit; + UINT32 BeaconsRecv; + UINT32 AssocRejects; + UINT32 AssocTimeouts; + UINT32 AuthRejects; + UINT32 AuthTimeouts; +); + +PACKED_STRUCT( _TIWLN_STATISTICS , + + /**/ + /* config info*/ + /**/ + tiUINT32 dot11CurrentTxRate; + tiUINT32 dot11CurrentChannel; + OS_802_11_MAC_ADDRESS currentMACAddress; + OS_802_11_SSID dot11DesiredSSID; + OS_802_11_NETWORK_MODE dot11BSSType; + OS_802_11_AUTHENTICATION_MODE AuthenticationMode; + tiBOOL bShortPreambleUsed; + tiUINT32 RTSThreshold; + tiUINT32 FragmentationThreshold; + tiBOOL bDefaultWEPKeyDefined; + OS_802_11_WEP_STATUS WEPStatus; + tiUINT32 TxAntenna; + tiUINT32 RxAntenna; + tiUINT32 TxPowerDbm; + tiUINT32 PowerMode; + tiINT32 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*/ + /**/ + tiUINT32 dwSecuritySuit; /* Security suit bitmask (see defines)*/ + tiUINT32 dwSecurityState; /* 802.1x security protocol state*/ + tiUINT32 dwSecurityAuthStatus; /* Security suit authentication status*/ + tiUINT32 dwFeatureSuit; /* Additional features suit bitmask (see defines)*/ + +); +typedef _TIWLN_STATISTICS TIWLN_STATISTICS; + +/* Statistics security suit bitmasks*/ +#define TIWLN_STAT_SECURITY_RESERVE_1 0x0001 +#define TIWLN_STAT_SECURITY_SSN 0x0002 + +/* Features suit bitmasks*/ +#define TIWLN_FEATURE_4XENABLED 0x0001 +#define TIWLN_FEATURE_4XACTIVE 0x0002 + +PACKED_STRUCT( _TIWLN_REGDOMAINS , + + tiUINT8 Length; + tiUINT8 Table[REGDOMAIN_TABLE_SIZE]; +); +typedef _TIWLN_REGDOMAINS TIWLN_REGDOMAINS; + +PACKED_STRUCT( _TIWLN_MEDIUM_USAGE , + + tiUINT32 MediumUsage; + tiUINT32 Period; +); +typedef _TIWLN_MEDIUM_USAGE TIWLN_MEDIUM_USAGE; + +typedef struct _RADIO_RX_QUALITY +{ + tiINT32 Snr; + tiINT32 Rssi; +}TIWLN_RADIO_RX_QUALITY; + +#define MAX_NUM_DATA_FILTERS 4 + +PACKED_STRUCT( _TIWLAN_DATA_FILTER_STATISTICS , + + tiUINT32 UnmatchedPacketsCount; + tiUINT32 MatchedPacketsCount[MAX_NUM_DATA_FILTERS]; +); +typedef _TIWLAN_DATA_FILTER_STATISTICS TIWLAN_DATA_FILTER_STATISTICS; + +#define MAX_DATA_FILTER_MASK_LENGTH 8 +#define MAX_DATA_FILTER_PATTERN_LENGTH 64 + +PACKED_STRUCT ( _TIWLAN_DATA_FILTER_REQUEST , + + tiUINT8 Offset; + tiUINT8 MaskLength; + tiUINT8 Mask[MAX_DATA_FILTER_MASK_LENGTH]; + tiUINT8 PatternLength; + tiUINT8 Pattern[MAX_DATA_FILTER_PATTERN_LENGTH]; +); +typedef _TIWLAN_DATA_FILTER_REQUEST TIWLAN_DATA_FILTER_REQUEST; + + +#define MAX_NUM_PROFILES 4 + +PACKED_STRUCT( _TIWLN_PROFILE , + + tiBOOL bPresent; + OS_802_11_SSID dot11DesiredSSID; + OS_802_11_NETWORK_MODE dot11BSSType; + OS_802_11_AUTHENTICATION_MODE AuthenticationMode; + OS_802_11_WEP WepDefaultKey[4]; + tiUINT32 WepDefaultKeyID; + tiBOOL bWepDefaultKeySet; + OS_802_11_WEP_STATUS WEPStatus; + + /**/ + /* Which one should be included???*/ + /**/ + tiUINT32 dot11TxRate; + tiUINT32 dot11Channel; + tiBOOL bShortPreambleUsed; + tiBOOL bHighSpeed; + tiUINT32 RTSThreshold; + tiUINT32 FragmentationThreshold; + + tiUINT32 TxAntenna; + tiUINT32 RxAntenna; + tiUINT32 TxPowerDbm; + tiUINT32 PowerMode; +); +typedef _TIWLN_PROFILE TIWLN_PROFILE, *PTIWLN_PROFILE; + + +/* SHA1 hash (of certificate)*/ +typedef struct _TI_SHA1_HASH +{ + tiUINT8 aHash[20]; +} TI_SHA1_HASH; + +PACKED_STRUCT( _TIWLAN_ANT_DIVERSITY , + + tiUINT8 enableRxDiversity; + tiUINT8 rxSelectedAntenna; + tiUINT8 enableTxDiversity; + tiUINT8 txSelectedAntenna; + tiUINT8 rxTxSharedAnts; +); +typedef _TIWLAN_ANT_DIVERSITY TIWLAN_ANT_DIVERSITY, *PTIWLAN_ANT_DIVERSITY; + +#define TI_NUM_OF_SUB_BANDS 5 +#define TI_NUM_OF_POWER_LEVEL 4 + +typedef struct +{ + tiUINT8 uTxPower[TI_NUM_OF_SUB_BANDS][TI_NUM_OF_POWER_LEVEL]; /* Maximun Dbm in Dbm/10 units */ +} TIWLAN_POWER_LEVEL_TABLE; + +#endif /* __TIWLNIF_H__*/ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/tnetwCommon.h b/sta_dk/pform/linux/src/wlan_driver_inc/tnetwCommon.h new file mode 100644 index 0000000..dbb86d7 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/tnetwCommon.h @@ -0,0 +1,430 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: whalHwRegs.h + * PURPOSE: Contains Wlan hardware registers defines/structures + * + ****************************************************************************/ + +#ifndef _TNETW_COMMON_H +#define _TNETW_COMMON_H + +#include "TnetwRegisters.h" + +#define IS_MASK_ON( field, bitmask ) ( (bitmask) == ( (field) & (bitmask) ) ) +#define IS_MASK_OFF( field, bitmask ) ( ~(bitmask) == ( (field) | ~(bitmask) ) ) + +#define IS_ANY_BIT_ON( field, bitmask ) ( (field) & (bitmask) ) +#define ARE_ALL_BITS_ON( field, bitmask ) IS_MASK_ON( field, bitmask ) + +#define MASK_BITS_ON( field, bitmask ) ( (field) |= (bitmask) ) +#define MASK_BITS_OFF( field, bitmask ) ( (field) &= ~(bitmask) ) + +#define MASK_BITS_TOGGLE( field, bitmask ) ( (field) ^= (bitmask) ) + +#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 ( 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_PRSP_EN |*/ /*CFG_RX_PREQ_EN |*/ CFG_RX_MGMT_EN | CFG_RX_DATA_EN | CFG_RX_CTL_EN | 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_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_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 /* _TNETW_COMMON_H */ + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/utils.h b/sta_dk/pform/linux/src/wlan_driver_inc/utils.h new file mode 100644 index 0000000..6b6163c --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/utils.h @@ -0,0 +1,290 @@ +/** \file utils.h + * \brief utils API + * + * \see utils.c + */ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: utils.h */ +/* PURPOSE: utilities API, contains some utilites function to be used */ +/* by the COre & HAL */ +/* */ +/***************************************************************************/ +#ifndef __UTILS_H__ +#define __UTILS_H__ + +#include "osTIType.h" +#include "commonTypes.h" +#include "memMngrEx.h" +#include "802_11Defs.h" + +/* TODO: replace the following macros with a faster code. */ +#define MAC_COPY(pOsContext,pDstMac,pSrcMac) \ + os_memoryCopy(pOsContext, (void *)((pDstMac)->addr), (void *)((pSrcMac)->addr), MAC_ADDR_LEN) +#define MAC_EQUAL(pDstMac,pSrcMac) \ + ((pDstMac)->addr[0] == (pSrcMac)->addr[0] && \ + (pDstMac)->addr[1] == (pSrcMac)->addr[1] && \ + (pDstMac)->addr[2] == (pSrcMac)->addr[2] && \ + (pDstMac)->addr[3] == (pSrcMac)->addr[3] && \ + (pDstMac)->addr[4] == (pSrcMac)->addr[4] && \ + (pDstMac)->addr[5] == (pSrcMac)->addr[5]) +#define MAC_BROADCAST(pMac) \ + ((pMac)->addr[0] == 0xFF && \ + (pMac)->addr[1] == 0xFF && \ + (pMac)->addr[2] == 0xFF && \ + (pMac)->addr[3] == 0xFF && \ + (pMac)->addr[4] == 0xFF && \ + (pMac)->addr[5] == 0xFF) +#define MAC_MULTICAST(pMac) ((pMac)->addr[0] & 0x01) +#define MAC_NULL(pMac) \ + ((pMac)->addr[0] == 0x00 && \ + (pMac)->addr[1] == 0x00 && \ + (pMac)->addr[2] == 0x00 && \ + (pMac)->addr[3] == 0x00 && \ + (pMac)->addr[4] == 0x00 && \ + (pMac)->addr[5] == 0x00) + + +#ifndef offsetof +#define offsetof(type, field) ((unsigned int) (&(((type *)(0))->field))) +#endif + + +/* NOTE - Network byte order is BIG endian. */ + +static __inline unsigned short int __byte_swap_16 (unsigned short int __bsx) { + return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); +} + +static __inline unsigned int __byte_swap_32 (unsigned int __bsx) { + return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | + (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); +} + + +#ifdef __BYTE_ORDER_BIG_ENDIAN + + +#define wlan_ntohl(x) (x) +#define wlan_ntohs(x) (x) +#define wlan_htonl(x) (x) +#define wlan_htons(x) (x) + +#define ENDIAN_HANDLE_WORD(x) __byte_swap_16 (x) +#define ENDIAN_HANDLE_LONG(x) __byte_swap_32 (x) + +/* int64 handling macros */ +#define INT64_LOWER(x) *(((UINT32*)&(x))+1) +#define INT64_HIGHER(x) *((UINT32*)&(x)) + +#else + +#ifdef __BYTE_ORDER_LITTLE_ENDIAN + +#define wlan_ntohl(x) __byte_swap_32 (x) +#define wlan_ntohs(x) __byte_swap_16 (x) +#define wlan_htonl(x) __byte_swap_32 (x) +#define wlan_htons(x) __byte_swap_16 (x) + +#define ENDIAN_HANDLE_WORD(x) (x) +#define ENDIAN_HANDLE_LONG(x) (x) + +/* int64 handling macros */ +#define INT64_HIGHER(x) *(((UINT32*)&(x))+1) +#define INT64_LOWER(x) *((UINT32*)&(x)) + +/*#define COPY_UNALIGNED_WORD(srcWord, destWord) ((UINT8 *)&destWord)[0] = ((UINT8 *)&srcWord)[0]; ((UINT8 *)&destWord)[1] = ((UINT8 *)&srcWord)[1]; +#define COPY_UNALIGNED_LONG(srcLong, destLong) ((UINT8 *)&destWord)[0] = ((UINT8 *)&srcWord)[0]; ((UINT8 *)&destWord)[1] = ((UINT8 *)&srcWord)[1];((UINT8 *)&destWord)[2] = ((UINT8 *)&srcWord)[2]; ((UINT8 *)&destWord)[3] = ((UINT8 *)&srcWord)[3]; +*/ +#else + +#error "MUST define byte order (BIG/LITTLE ENDIAN)" + +#endif +#endif + +#define COPY_UNALIGNED_WORD(pDest, pSrc) {((UINT8 *)(pDest))[0] = ((UINT8 *)(pSrc))[0];\ + ((UINT8 *)(pDest))[1] = ((UINT8 *)(pSrc))[1];} + +#define COPY_UNALIGNED_LONG(pDest, pSrc) {((UINT8 *)(pDest))[0] = ((UINT8 *)(pSrc))[0];\ + ((UINT8 *)(pDest))[1] = ((UINT8 *)(pSrc))[1];\ + ((UINT8 *)(pDest))[2] = ((UINT8 *)(pSrc))[2];\ + ((UINT8 *)(pDest))[3] = ((UINT8 *)(pSrc))[3];} + +void utils_nullMemoryFree(void* pOsContext, + void* pMemPtr, + unsigned long size); + +void utils_nullTimerDestroy(void* pOsContext, + void* pTimerHandle); + +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) + +#ifndef min +# define min MIN +#endif + +#ifndef max +# define max MAX +#endif + + +#define MAKE_BASIC_RATE(rate) rate |= 0x80 + +#define IS_BASIC_RATE(rate) rate & 0x80 + +#define IS_ACTIVE_RATE(rate) !(rate & 0x80) + +rate_e networkToHostRate(UINT8 rate); + +UINT8 hostToNetworkRate(rate_e rate); + + +UINT8 getMaxBasicRatefromString(UINT8 *ratesString, UINT8 len, UINT8 maxRate); + +rate_e getMaxRatefromBitmap(UINT32 ratesBitMap); + +UINT8 getMaxActiveRatefromString(UINT8 *ratesString, UINT8 len, UINT8 maxRate); + +TI_STATUS validateNetworkRate(UINT8 rate); + +UINT8 hostToUtilityRate(rate_e rate); + +rate_e utilityToHostRate(UINT8 rate); + +UINT8 hostRateToNumber(rate_e rate); +rate_e RateNumberToHost(UINT8 rateIn); + +void bitMapToNetworkStringRates(UINT32 suppRatesBitMap, UINT32 basicRatesBitMap, + UINT8 *string, UINT32 *len, + UINT32 *firstOFDMrateLoc); + +void networkStringToBitMapSuppRates(UINT32 *bitMap, UINT8 *string, UINT32 len); +void networkStringToBitMapBasicRates(UINT32 *bitMap, UINT8 *string, UINT32 len); + +UINT32 translateBasicRateValueToMask(UINT32 value, BOOL dot11a); +UINT32 translateSupportedRateValueToMask(UINT32 value, BOOL dot11a); +void validateRates(UINT32 *pBasicRateMask, UINT32 *pSuppRateMask, UINT32 *pTxRate, modulationType_e *modulation, BOOL dot11a); +rate_e calculateMaxSupportedRate(UINT32 *pSuppRateMask); +rate_e findMaxActiveRate(UINT32 ratesBitMap); +void validateRatesVsBand(UINT32 *supportedMask, UINT32 *basicMask, BOOL dot11a); + +BOOL utils_isAnySSID(ssid_t *pSsid); +BOOL utils_isJunkSSID(ssid_t *pSsid); +BOOL utils_isIESSID_Broadcast(dot11_SSID_t *pIESsid); /* routinte to check for Junk SSID in SSID IE */ +void MsduContentDump (mem_MSDU_T* pMsdu, char *str); + + +void HexDumpData (UINT8 *data, int datalen); +void msduContentDump (mem_MSDU_T* pMsdu, char *str); + + +BOOL parseIeBuffer(TI_HANDLE hOs, UINT8 *pIeBuffer, UINT16 length, UINT8 desiredIeId, UINT8 **pDesiredIe, UINT8 *pMatchBuffer, UINT8 matchBufferLen); +void TiWlanIntToStr(UINT8 number , char *string, UINT8 radix); + +UINT32 getBasicRateMaskForSpecialBGchannel(void); +UINT32 getSupportedRateMaskForSpecialBGchannel(void); + +int ConvertHwBitRateToAppRate(UINT32 HwRate,rate_e *AppRate); + + +void getMaxRate(UINT32 ratesBitMap, rate_e *rate, modulationType_e *modulation, dot11mode_e operationMode); +void getMinRate(UINT32 ratesBitMap, rate_e *rate, modulationType_e *modulation, dot11mode_e operationMode); + +UINT32 reminder64( UINT64 dividee, UINT32 divider ); +int ConvertHwBitRateToAppRate(UINT32 HwRate,rate_e *AppRate); +int ConvertAppRatesToBitmap(UINT16 AppRatesBitmap, UINT32 *HwRatesBitmap); +int ConvertAppRateToHwBitMapRate(UINT32 AppRate, UINT32 *HwRate); +void convert_hex_to_string(tiUINT8 *pBuffer, char *pString, tiUINT8 Size); +rate_e ConvertHwRateToDrvRate(UINT8 HwRate, BOOL bOFDMMudulation); +UINT8 ConvertDrvRate2HwRate(rate_e eRate); +RateIndex_e rateNumberToIndex(UINT8 uRate); + +/* returns TI_STATUS as string */ +char* convertTI_STATUS_toString(TI_STATUS status); + +/* +++++++++ Profiling code ++++++++ +*/ +#define UTIL_DEBUG_PROFILE (0) + +void convert_hex_to_string(tiUINT8 *pBuffer, char *pString, tiUINT8 Size); + +/* +* 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) + +#if UTIL_DEBUG_PROFILE +typedef struct +{ + UINT32 TIWlanModuleLogName; + UINT32 Event; + UINT32 Param_1; + UINT32 Param_2; + UINT32 timeStamp; +} profileInfoElement_t; + +enum +{ + PROFILE_BUFFER_SIZE = 10000 +}; + +typedef struct +{ + profileInfoElement_t profileInfoElement[PROFILE_BUFFER_SIZE]; + UINT32 currentInfoElement; + BOOL overlap; +} profileInfo_t; + +void util_initProfile(void); + +void util_recordProfile(UINT32 theTIWlanModuleLogName, + UINT32 theEvent, + UINT32 theParam_1, + UINT32 theParam_2); + +void util_printProfile(void); +#endif /* UTIL_DEBUG_PROFILE */ + + +#endif /* __UTILS_H__ */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Api.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Api.h new file mode 100644 index 0000000..b389a86 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Api.h @@ -0,0 +1,192 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: whalBus_Api.h + * PURPOSE: Bus access component API + * + ****************************************************************************/ + +#ifndef _WHAL_BUS_API_H +#define _WHAL_BUS_API_H + +#include "whalCtrl_api.h" +#include "whalCommon.h" +#include "whalHwDefs.h" +#include "whalBus_Defs.h" +#include "memMngrEx.h" +#include "commonTypes.h" + +/* + * -------------------------------------------------------------- + * Creation/Configuration API + * -------------------------------------------------------------- + */ +TI_HANDLE whalBus_Create (TI_HANDLE hOs); +int whalBus_Destroy (TI_HANDLE hWhalBus); +TI_STATUS whalBus_Config (TI_HANDLE hWhalBus, + TI_HANDLE hWhalCtrl, + UINT8 AccessMode, + UINT32 RegBaseAddr, + UINT32 MemBaseAddr, + TI_HANDLE hReport, + TI_HANDLE hMemMgr, + fnotify_t fCb, + TI_HANDLE hCb); +TI_HANDLE whalBus_GetTnentwifHandle (TI_HANDLE hWhalBus); +int whalBus_ExitFromInitMode (TI_HANDLE hWhalBus); +int whalBus_ReConfig (TI_HANDLE hWhalBus); + +/* + * -------------------------------------------------------------- + * Registers/Memory access API + * -------------------------------------------------------------- + */ +UINT32 whalBus_MacRegRead (TI_HANDLE hWhalBus, UINT32 RegAddr); +void whalBus_MacRegWrite (TI_HANDLE hWhalBus, UINT32 RegAddr, UINT32 Val); +void whalBus_PhyRegWrite (TI_HANDLE hWhalBus, UINT32 PhyRegAddr, UINT32 DataVal); +UINT32 whalBus_PhyRegRead (TI_HANDLE hWhalBus, UINT32 PhyRegAddr); +void whalBus_MemWrite (TI_HANDLE hWhalBus, UINT32 Addr, char *data, int Len); +void whalBus_MemRead (TI_HANDLE hWhalBus, UINT32 Addr, char *data, int Len); + +/* + * -------------------------------------------------------------- + * Firmware control API + * -------------------------------------------------------------- + */ +typedef struct +{ + UINT32 radioType; + UINT8 MacClock; + UINT8 ArmClock; + BOOL FirmwareDebug; + UINT32 minorE2Ver; + UINT32 majorE2Ver; + UINT32 bugfixE2Ver; +} BootAttr_T; + + +TI_STATUS whalBus_FwCtrl_Boot (TI_HANDLE hWhalBus, TI_HANDLE hHwCtrl, BootAttr_T *pBootAttr); +int whalBus_FwCtrl_Reset (TI_HANDLE hWhalBus); +int whalBus_FwCtrl_isCardIn (TI_HANDLE hWhalBus); +void whalBus_FwCtrl_Halt (TI_HANDLE hWhalBus); +UINT32 whalBus_FwCtrl_GetRadioStandByState + (TI_HANDLE hWhalBus); + +/* + * -------------------------------------------------------------- + * Interrupt handler API + * -------------------------------------------------------------- + */ + +/* states */ +typedef enum +{ + STATE_INIT = 0, + STATE_DPC , + STATE_OPERATIONAL , + STATE_WAIT_FOR_DPC , +}whalHwIntr_states; + +/* Callback template */ +typedef void (*whal_hwIntrCB)(void *pObj); + +/*Power Ctrl Callback template */ +#define PWRCTRL_CB_TYPE_INTR_WAS_ISSUE 0 +#define PWRCTRL_CB_TYPE_INTR_STARTED 1 +typedef void (*whal_PwrCtrlCB)(TI_HANDLE pObj, int CbType); + + +void whalBus_TNETWIF_HandleBusTxn_Complete (TI_HANDLE hWhalBus); + +/* + * -------------------------------------------------------------- + * TNETWIF API + * -------------------------------------------------------------- + */ +int whalBus_TNETWIF_ElpCtrl_SetMode(TI_HANDLE hWhalBus, elpCtrl_Mode_e mode); + +/* + * -------------------------------------------------------------- + * Debug API + * -------------------------------------------------------------- + */ +void whalBus_performHealthMonitorTest(TI_HANDLE hWhalBus, UINT32 TEST); +/* + * General + */ + +#define BUS_PRINT_ALL 1 + +/* + * Control + */ +#define BUS_PRINT_MBOX_INFO 10 +#define BUS_PRINT_INTR_INFO 11 +#define BUS_PRINT_ACCESS_INFO 12 +#define BUS_PRINT_EEPROM 13 +#define BUS_PRINT_TRACE_A_B 14 +#define BUS_PRINT_ARBITER 15 + +/* + * Tx + */ +#define BUS_PRINT_TX_INFO 20 +#define BUS_PRINT_TX 21 +#define BUS_PRINT_TX_QUEUE 22 + +/* + * Rx + */ +#define BUS_PRINT_RX_INFO 30 +#define BUS_CLEAR_RX_INFO 31 + +/* + * Debug + */ +#define BUS_PRINT_REG_DUMP 40 +#define BUS_PRINT_RX_REGS 41 +#define BUS_PRINT_TX_REGS 42 +#define BUS_PRINT_SCR_PAD_REGS 43 +#define BUS_PRINT_LIST_REGS 44 +#define BUS_PRINT_MEM 45 + +void whalBus_PrintInfo(TI_HANDLE hWhalBus, UINT32 funcType, void *pParam); +/*************************************************************************************************** +************************************* New Hal ****************************************************** +***************************************************************************************************/ + +#endif /* _WHAL_BUS_API_H */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Defs.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Defs.h new file mode 100644 index 0000000..858b440 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalBus_Defs.h @@ -0,0 +1,207 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: whalBus_Defs.h + * PURPOSE: Bus access component structures definitions + * + ****************************************************************************/ + +#ifndef _WHAL_BUS_DEFS_H +#define _WHAL_BUS_DEFS_H + +#include "public_types.h" +#include "osTIType.h" +#include "ratesTypes.h" +#include "commonTypes.h" +#include "public_host_int.h" +#include "public_descriptors.h" + +/* Typedefs */ + +typedef struct +{ + rxPacketType_e packetType; + UINT8 rxLevel; + INT8 rssi; + UINT8 SNR; + UINT8 band; + UINT32 TimeStamp; +} rxXfer_Reserved_t; + +typedef struct +{ + rxPacketType_e packetType; + TI_STATUS status; + rate_e Rate; + UINT8 SNR; + INT8 Rssi; + UINT8 channel; + UINT32 packetInfo; + UINT8 band; + UINT32 TimeStamp; +}Rx_attr_t; + + + +/* Callback for rx packet */ +typedef void (*packetReceiveCB_t)(TI_HANDLE hObj, + TI_STATUS aStatus, + const void *aFrame, + UINT16 aLength, + UINT32 aRate, + UINT8 aChannel, + UINT8 aRCPI, + void *Reserved, + UINT32 aFlags); + +/* CallBack for Buffer request */ +typedef const void *(*requestForBufferCB_t)(TI_HANDLE hObj, UINT16 aLength, UINT32 uEncryptionFlag); + + +/* Scan complete Callback - This routine is called from the HAL upon TNET scan complete */ +typedef void (*scanCompleteCB_t)(TI_HANDLE hScanSrv, char* str, UINT32 strLen); + +/* Disassociation sent - This function is called by the HAL's Tx to indicate that dissasociation frame has been sent.*/ +typedef void (*disassocSentCB_t)(TI_HANDLE Hobj); + +/* Incoming Info Callback */ +typedef void (*InfoCB_t)(TI_HANDLE handle, char* buf, UINT32 bufSize); +/* Device Error Callback */ +typedef void (*deviceErrorCB_t)(TI_HANDLE siteMgr); + +/* Mac status Callback */ +typedef void (*MacStatusCB_t)(TI_HANDLE handle, char* str , UINT32 strLen); + +/* Health Report Callback */ +typedef void (*HealthReportCB_t)(TI_HANDLE handle, char* str , UINT32 strLen); + +/* Aci Indication Callback */ +typedef void (*AciIndicationCB_t)(TI_HANDLE handle, char* str , UINT32 strLen); + +/* Failure Event Callback */ +typedef void (*failureEventCB_t)(TI_HANDLE handle, failureEvent_e failureEvent); + +/* + * -------------------------------------------------------------- + * DmaParams_T - Rx/Tx Queues and Bufffers params + * -------------------------------------------------------------- + */ + + +typedef struct +{ + int NumTxQueues; + int NumRxQueues; + UINT32 BlockSize; + int NumTxBlocks; + int NumRxBlocks; + int TxNumDesc[MAX_NUM_OF_TX_QUEUES]; + int RxNumDesc; + int TxQPriority[MAX_NUM_OF_TX_QUEUES]; + int RxQPriority; + + UINT16 NumStations; + UINT8 RxQueue_Priority; + UINT8 RxQueue_Type; + + UINT32 TraceBufferSize; + BOOLEAN TraceBufferDoPrint; + + UINT8 rxMemBlkNumber; + UINT8 txMinMemBlkNumber; + +} DmaParams_T; + + +/* + * -------------------------------------------------------------- + * Internal hal attributes + * -------------------------------------------------------------- + */ + + + +typedef enum +{ + SW_DIVS_TX_RESET = 0, /* reset, i.e. invalid value */ + SW_DIVS_TX_ANT2 = BIT_2, /* defined to match TX_PING0 & CFG_ANT_SEL*/ + SW_DIVS_TX_ANT1 = BIT_3, /* defined to match TX_PING0 & CFG_ANT_SEL*/ + SW_DIVS_RX_W_LAST_TX = BIT_4, + SW_DIVS_TOGGLE_DISABLE = BIT_5, + SW_DIVS_TOGGLE_COUNT_MASK = BIT_6+BIT_7 +} SwAntDivs_enum; + + +#define CTRL_NO_TX_COMPLETE 0x40 + + +#define RX_PACKET_FLAGS_MATCH_RXADDR1 0x00000001 +#define RX_PACKET_FLAGS_GROUP_ADDR 0x00000002 +#define RX_PACKET_FLAGS_BCAST 0x00000004 +#define RX_PACKET_FLAGS_STAINTIM 0x00000008 +#define RX_PACKET_FLAGS_VIRTUAL_BM 0x00000010 +#define RX_PACKET_FLAGS_MATCH_SSID 0x00000020 +#define RX_PACKET_FLAGS_MATCH_BSSID 0x00000040 +#define RX_PACKET_FLAGS_ENCRYPTION 0x00030000 +#define RX_PACKET_FLAGS_MORE_PACKETS 0x00040000 +#define RX_PACKET_FLAGS_MEASURMENT 0x00080000 + +#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) + +/* 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_PACKETID_SHIFT 11 +#define RX_MAX_PACKET_ID 3 + + +/* Cal backs */ + +/* Callback for rx compleate */ + + +typedef void (*WhalSendPacketTranferCB_t)(TI_HANDLE hWhalTx, + TI_STATUS TxStatus, + UINT32 aPacketId, + void *reserved); + +#endif /* _WHAL_BUS_DEFS_H */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalCommon.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalCommon.h new file mode 100644 index 0000000..95c76e3 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalCommon.h @@ -0,0 +1,97 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: whalCommon.h + * PURPOSE: common whal definitions + * + ****************************************************************************/ + +#ifndef WHAL_COMMON_H +#define WHAL_COMMON_H + +#include "osTIType.h" +/*#include "osApi.h"*/ +/*#include "paramIn.h"*/ +/*#include "paramOut.h"*/ +#include "report.h" +#include "utils.h" +/*#include "ti_types.h"*/ + +/* + * hal reports + */ +#define WLAN_REPORT_REPLY WLAN_REPORT_CONSOLE +#define HAL_HW_CTRL_MODULE_LOG HAL_CTRL_MODULE_LOG +#define HAL_HW_RX_MODULE_LOG HAL_RX_MODULE_LOG +#define HAL_HW_TX_MODULE_LOG HAL_TX_MODULE_LOG +#define HAL_HW_DATA_MODULE_LOG HAL_TX_MODULE_LOG +#define HAL_TEST_MODULE_LOG HAL_CTRL_MODULE_LOG + + +#if defined(HAL_ON_WIN) + +#ifdef HAL_ON_DRIVER +#define os_report DbgPrint +#endif + + +/* whal utilities */ +int whalUtils_ConvertHwRate (UINT8 HwRate, UINT8 HwModulation, rate_e *AppRate, modulationType_e *AppModulation); +int whalUtils_ConvertAppRatesBitmap (UINT32 AppRatesBitmap, UINT32 AppModulation, UINT16 *HwRatesBitmap); +int whalUtils_ConvertAppRate (UINT32 AppRate, UINT32 AppModulation, UINT8 *HwRate); +int whalUtils_ConvertHwRatesBitmap (UINT8 HwRatesBitmap, UINT8 HwModulation, UINT32 *AppRate, UINT32 *AppModulation); +void whalUtils_ConvertBitmapToMaxRate(UINT16 HwRatesBitmap, UINT8 *HwModulation, UINT8 *HwRate); +int whalUtils_FindHwModulationByDrvRate (UINT32 AppRate, UINT8 *HwModu, UINT8 preamble); +#else +int whalUtils_ConvertAppRate (rate_e AppRate, UINT8 *HwRate); +int whalUtils_FindHwModulationByDrvRate (rate_e AppRate, UINT8 *HwModu, UINT8 preamble); +int whalUtils_ConvertAppRatesBitmap (UINT32 AppRatesBitmap, UINT32 AppModulation, UINT16 *HwRatesBitmap); +#endif /*HAL_ON_WIN*/ + +UINT32 whalUtils_GwsiRate2DRV_RATE (UINT32 gwsiRate); +rateMask_e whalUtils_GwsiRate2DRV_RATE_MASK (UINT32 gwsiRate); +UINT32 whalUtils_DRV_RATE2GwsiRate (UINT32 Rate); +UINT32 whalUtils_DRV_RATE_MASK2GwsiRate (rateMask_e rateMask); + + +/* User Callback for Queue */ +typedef void (*CmdQueue_InterrogateCB_t )(TI_HANDLE objectHandle,UINT16 MboxStatus,void *InterrogateParamsBuf); +typedef void (*CmdQueue_CB_t )(TI_HANDLE objectHandle,UINT16 MboxStatus); +typedef void (*CmdQueue_GenericCB_t )(TI_HANDLE objectHandle, UINT16 CmdType, UINT16 CmdID, UINT32 aStatus); + + +#endif diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl.h new file mode 100644 index 0000000..a39c953 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl.h @@ -0,0 +1,120 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _WHAL_CTRL_H +#define _WHAL_CTRL_H + +#include "whalCommon.h" +#include "whalParams.h" +#include "whalHwCtrl.h" + +#include "rxXfer_api.h" + + +/* CLASS WHAL_CTRL*/ +typedef struct _WHAL_CTRL +{ + WhalParams_T* pWhalParams; + + ReadWriteCommand_t printRegsBuf; + + scanCompleteCB_t ScanCmplt_CB; + void* ScanCmplt_CB_handle; + + MacStatusCB_t MacStatusCB_CB; + void* MacStatusCB_CB_handle; + + HealthReportCB_t HealthReportCB_CB; + void* HealthReportCB_handle; + + AciIndicationCB_t AciIndicationCB_CB; + void* AciIndicationCB_handle; + + failureEventCB_t FailureEvent_CB; + void* FailureEvent_CB_handle; + + + BOOL EncDecEnableFlag; /* flag to designates whether the Hw encrypt and decrypt + facility on WEP options IE already enabled*/ + + TI_HANDLE hOs; + TI_HANDLE hReport; + TI_HANDLE hTNETW_Driver; + + TI_HANDLE hFwEvent; + TI_HANDLE hTxXfer; + TI_HANDLE hTxResult; + TI_HANDLE hTxHwQueue; + TI_HANDLE hRxXfer; + TI_HANDLE hEventMbox; + struct _WHAL_SECURITY* pWhalSecurity; + + struct _HwCtrl_T *pHwCtrl; /* Pointer to the LL_HAL acxCtrl module*/ + TI_HANDLE hWhalBus; /* Pointer to the LL_HAL acxCtrl module*/ + TI_HANDLE hCmdQueue; + + /* Init stage callback function pointer and handle */ + void *fCb; + TI_HANDLE hCb; + + ACXMisc_t misc; + +#ifdef TI_DBG + TI_HANDLE hDebugTrace; +#endif /* TI_DBG */ + +} WHAL_CTRL; + + +WhalParams_T *whalCtrl_GetWhalParamsHandle(WHAL_CTRL *pWhalCtrl); +void whalCtrl_MacStatus_CB(TI_HANDLE hWhalCtrl, char* MacStatus , UINT32 strLen); +void whalCtrl_HealthReoprt_CB(TI_HANDLE hWhalCtrl, char* MacStatus , UINT32 strLen); +void whalCtrl_registerDump(TI_HANDLE hWhalCtrl); +int whalCtrl_RegisterCmdCompleteGenericCB(TI_HANDLE hWhalCtrl, void *CbFunc ,void *CbObj); +int whalCtrl_RegisterErrorsCallbacks(TI_HANDLE hWhalCtrl); +int whalCtrl_ReJoinBss (TI_HANDLE hWhalCtrl); +TI_STATUS whalCtrl_getRadioNumber(TI_HANDLE hWhalCtrl, UINT32 *outRadioType, UINT32 *outRadioNumber); +TI_STATUS whalCtrl_FinalizeDownload(TI_HANDLE hWhalCtrl); +/* Used for Memory or Registers reading/writing*/ +typedef enum +{ + TNETW_INTERNAL_RAM = 0, + TNETW_MAC_REGISTERS = 1, + TNETW_PHY_REGISTERS = 2, +} readWrite_MemoryType_e; + +void whalCtrl_Print_Mem_Regs (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 len, readWrite_MemoryType_e memType); +int whalCtrl_Set_Mem_Regs (TI_HANDLE hWhalCtrl, UINT32 address, UINT32 len, UINT32 aWriteVal, readWrite_MemoryType_e memType); +#endif /* _WHAL_CTRL_H*/ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_api.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_api.h new file mode 100644 index 0000000..16f5859 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_api.h @@ -0,0 +1,900 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _WHAL_CTRL_API_H +#define _WHAL_CTRL_API_H + +#include "whalCtrl_prm.h" +#include "public_infoele.h" +#include "whalBus_Defs.h" +#include "MacServices_api.h" + + +#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 +typedef struct +{ + UINT32 Size; + UINT8 Buffer[MAX_TEMPLATE_SIZE]; +} TemplateParams_T; + +typedef enum +{ + NULL_DATA_TEMPLATE = 0, + BEACON_TEMPLATE, + PROBE_REQUEST_TEMPLATE, + PROBE_RESPONSE_TEMPLATE, + QOS_NULL_DATA_TEMPLATE, + PS_POLL_TEMPLATE, +} whalCtrl_templateType_e; + +typedef enum{ + WHAL_WME = 0, + WHAL_NONE_QOS, +}whalCtrl_qosProtocols_e; + +/* Do not change the order */ +typedef enum +{ + PS_DISABLE = 0, + PS_ENABLE = 1, +} whalCtrl_psState_e; + +typedef enum +{ + PS_POLL_ACCESS_MNGR_GEN= 0, + PS_POLL_HOST_ECPU_GEN, +} whalCtrl_psPollGen_e; + +typedef enum +{ + ENTER_PS_FAIL, + ENTER_PS_SUCCESS, + EXIT_PS_FAIL, + EXIT_PS_SUCCESS, +}Hw_Event_PS_Status; + +/** Available cipher suites for admission control */ +typedef enum +{ + HAL_CTRL_CIPHER_NONE = 0, /**< no chpiher suite */ + HAL_CTRL_CIPHER_WEP = 1, /**< WEP-40 chpiher suite */ + HAL_CTRL_CIPHER_TKIP = 2, /**< TKIP chpiher suite */ + HAL_CTRL_CIPHER_AES_WRAP = 3, /**< AES WRAP chpiher suite */ + HAL_CTRL_CIPHER_AES_CCMP = 4, /**< AES CCMP chpiher suite */ + HAL_CTRL_CIPHER_WEP104 = 5, /**< WEP-104 chpiher suite */ + HAL_CTRL_CIPHER_CKIP = 6, /**< CKIP chpiher suite */ + HAL_CTRL_CIPHER_UNKNOWN = 255 /**< UNKNOWN chpiher suite */ +} halCtrl_CipherSuite_e; + + +/* + * The Event Mail Box ID : Clients That expected an event should + * register,Mask/UnMask Events with this ID + */ + +typedef enum +{ + /*Regular events*/ + HAL_EVENT_MEASUREMENT_START, /*0*/ + HAL_EVENT_SCAN_CMPLT, /*1*/ + HAL_EVENT_CALIB_CMPLT, /*2*/ + HAL_EVENT_RSSI_LEVEL, /*3*/ + HAL_EVENT_PS_REPORT, /*4*/ + HAL_EVENT_SYNCHRONIZATION_TIMEOUT, /*5*/ + HAL_EVENT_HEALTH_REPORT, /*6*/ + HAL_EVENT_ACI, /*7*/ + HAL_EVENT_DEBUG_MESSAGE, /*8*/ + HAL_EVENT_MAC_STATUS, /*9*/ + HAL_EVENT_DISCONNECT_COMPLETE, /*10*/ + HAL_EVENT_JOIN_CMPLT, /*11*/ + HAL_EVENT_SWITCH_CHANNEL_CMPLT, /*12*/ + HAL_EVENT_BSS_LOSE, /*13*/ + HAL_EVENT_MAX_TX_RETRY, /*14*/ + HAL_EVENT_MEASUREMENT_COMPLETE, /*15*/ + HAL_EVENT_AP_DISCOVERY_COMPLETE, /*16*/ + HAL_EVENT_SPS_SCAN_CMPLT, /*17*/ + HAL_EVENT_BSS_REGAIN, /*18*/ + HAL_EVENT_RSSI_LEVEL_REGAIN, /*19*/ + HAL_EVENT_LOW_SNR, /*20*/ + HAL_EVENT_SOFT_GEMINI_SENSE, /*21*/ + HAL_EVENT_SOFT_GEMINI_PREDICTION, /*22*/ + HAL_EVENT_SOFT_GEMINI_AVALANCHE, /*23*/ + HAL_EVENT_PLT_RX_CALIBRATION_COMPLETE, /*24*/ + HAL_EVENT_PSPOLL_DELIVERY_FAILURE, /*25*/ + HAL_EVENT_BSS_RESET, /*26*/ + HAL_EVENT_ALL, /* 27 */ + MAX_NUM_OF_EVENT, /* 28 */ +}Hw_Event_ID; + + +typedef struct +{ + macAddress_t macAddress; + preamble_e preamble; + radioType_e radioType; + radioBand_e radioBand; + UINT8 fwVer[FW_VERSION_LEN]; /* Firmware version - null terminated string*/ + e2Version_t e2Ver; /* EEPROM version*/ +} whalCtrl_chip_t; + +typedef struct +{ + TI_HANDLE hRxXfer; + TI_HANDLE hTxXfer; + TI_HANDLE hTxResult; + TI_HANDLE hTxHwQueue; + TI_HANDLE hReport; + TI_HANDLE hMemMgr; + TI_HANDLE hEventMbox; + TI_HANDLE hFwEvent; + TI_HANDLE hCmdQueue; +#ifdef TI_DBG + TI_HANDLE hDebugTrace; +#endif /* TI_DBG */ +} whalCtrl_config_t; + + + +typedef struct +{ + bssType_e bssType; + UINT16 beaconInterval; + UINT16 dtimInterval; + UINT8 channel; + UINT8* pBSSID; + UINT8* pSSID; + UINT8 ssidLength; + rate_e hwGenCtrlTxRate; + rate_e hwGenMgmtTxRate; /* Beacon and Probe-Response Tx rate (in IBSS). */ + UINT16 basicRateSet; + UINT16 supportedRateSet; + radioBand_e radioBand; + preamble_e preamble; +} whalCtrl_joinBss_t; + +typedef struct +{ + whalCtrl_templateType_e templateType; + UINT8* pTemplate; + UINT32 templateLen; +} whalCtrl_setTemplate_t; + +PACKED_STRUCT( whalCtrl_antennaDiversityOptions_t, + + uint8 enableRxDiversity; + uint8 rxSelectedAntenna; + uint8 enableTxDiversity; + uint8 txSelectedAntenna; + uint8 rxTxSharedAnts; +); + +typedef enum +{ + STOP_NOISE_HIST = 0, + START_NOISE_HIST = 1 +} NoiseHistogramCmd_e; + +typedef struct +{ + NoiseHistogramCmd_e cmd; + UINT16 sampleInterval; + UINT8 ranges[MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES]; +} whalCtrl_noiseHistogram_t; + +/* use this struct when expecting a CB after a CONFIGURE_ACTION */ +PACKED_STRUCT( acxStatisitcs_t, + + UINT32 FWpacketReceived; + UINT32 HALpacketReceived; +); + +PACKED_STRUCT( mediumOccupancy_t, + + interogateCmdHdr_t mediumOccupCmdHdr; + UINT32 MediumUsage; + UINT32 Period; +); + +PACKED_STRUCT( tsf_dtim_mib_t, + + interogateCmdHdr_t tsf_dtim_mibCmdHdr; + uint32 CurrentTSFHigh; + uint32 CurrentTSFLow; + uint32 lastTBTTHigh; + uint32 lastTBTTLow; + uint8 LastDTIMCount; + uint8 Reserved[3]; +); + + +typedef struct +{ + UINT16 BeaconRxTimeout; + UINT16 BroadcastRxTimeout; + UINT8 RxBroadcastInPs; +} BcnBrcOptions_t; + +typedef struct +{ + UINT8 numberOfIEs; + UINT8 IETable[BEACON_FILTER_TABLE_MAX_SIZE]; + UINT8 IETableSize; +} beaconFilterIETable_t; + + +typedef struct +{ + UINT8 beaconListenInterval; + UINT8 beaconFiltering; + UINT8 DTIMListenInterval; + UINT8 NConsecutiveBeaconMiss; + UINT8 hangoverPeriod; + UINT8 HwPsPollResponseTimeout; + UINT32 BaseBandWakeUpTime; + UINT32 beaconReceiveTime; + BOOLEAN beaconMissInterruptEnable; + BOOLEAN rxBroadcast; + BOOLEAN hwPsPoll; + + + /* powerMgmtConfig IE */ + BOOLEAN ps802_11Enable; + UINT8 needToSendNullData; + UINT8 numNullPktRetries; + UINT8 hangOverPeriod; + UINT16 NullPktRateModulation; + + /* PMConfigStruct */ + BOOLEAN ELPEnable; + UINT32 BBWakeUpTime; + UINT32 PLLlockTime; + + /* AcxBcnBrcOptions */ + BcnBrcOptions_t BcnBrcOptions; + + /* ACXWakeUpCondition */ + PowerMgr_TnetWakeOn_e tnetWakeupOn; + UINT8 listenInterval; + + /* No answer after Ps-Poll work-around */ + UINT8 ConsecutivePsPollDeliveryFailureThreshold; +} whalCtrl_powerMgmtConfig_t; + +typedef struct +{ + + /* powerMgmtConfig IE */ + BOOLEAN ps802_11Enable; + UINT8 needToSendNullData; + UINT8 numNullPktRetries; + UINT8 hangOverPeriod; + UINT16 NullPktRateModulation; + void * powerSaveCBObject; + MacServices_powerSaveCmdResponseCB_t powerSavecmdResponseCB; + + +} whalCtrl_powerSaveParams_t; + +/*MULTIPLE QUEUES STRUCTURE */ + +typedef struct +{ + UINT16 txopLimit; + UINT16 rxTimeout; + UINT8 aifsn; + UINT8 cwMin; + UINT16 cwMax; + UINT8 acId; + UINT8 shortRetryLimit; + UINT8 longRetryLimit; + UINT8 retryPreemption; + UINT8 txopContinuation; + UINT8 PsParameters; +} whaCtrl_acTrafficParams_t; + + +typedef struct +{ + UINT8 acId; + UINT8 qId; + UINT16 percentOfBlockHighThreshold; /* Sum of ACs > numTxMemBlks in ~10% */ + UINT16 percentOfBlockLowThreshold; /* Sum of ACs < numTxMemBlks */ +} acQueuesParams_t; + + +typedef enum{ + HAL_CTRL_AC_NOT_ADMITTED, + HAL_CTRL_AC_WAIT_ADMISSION, + HAL_CTRL_AC_ADMITTED +} whalCtrl_trafficAdmState_e; + +typedef enum{ + HAL_CTRL_UNIDIRECTION, + HAL_CTRL_BIDIRECTION, +} whalCtrl_streamDirection_e; + +typedef enum{ + HAL_CTRL_ADDTS_RESPONSE_ACCEPT = 0, +/* HAL_CTRL_ADDTS_RESPONSE_REJECT, - according to the standard*/ + HAL_CTRL_ADDTS_RESPONSE_AP_PARAM_INVALID = 253, + HAL_CTRL_ADDTS_RESPONSE_TIMEOUT = 254, + HAL_CTRL_TSPEC_DELETED_BY_AP = 255, +} whalCtrl_addtsRaeasonCode_e; + +typedef enum{ + HAL_CTRL_HIGH_THRESHOLD_CROSS, + HAL_CTRL_LOW_THRESHOLD_CROSS, +} whalCtrl_thresholdCross_e; + +typedef enum{ + HAL_CTRL_CROSS_ABOVE, + HAL_CTRL_CROSS_BELOW, +} whalCtrl_thresholdCrossDirection_e; + +typedef struct{ + UINT32 acID; + thresholdCross_e thresholdCross; +} tspecRateCross_t; + +typedef struct{ + UINT32 acID; + UINT32 thresholdCross; + UINT32 thresholdCrossDirection; +} mediumTimeCross_t; + +/************************************/ +/* QOS edcf params */ +/************************************/ + +/*=================== Mesurement =====================*/ + +typedef struct + +{ + uint32 ConfigOptions; + uint32 FilterOptions; + uint32 duration; + Channel_e channel; + RadioBand_e band; +} whalCtrl_MeasurementParameters_t; + +typedef struct + +{ + uint32 ConfigOptions; + uint32 FilterOptions; + uint32 scanDuration; + uint16 scanOptions; + uint8 numOfProbRqst; + TxdRateSet_t txdRateSet; + uint8 txPowerDbm; +} whalCtrl_ApDiscoveryParameters_t; + +/*=======================================================*/ + + +typedef struct +{ + /* ACXLowRSSITriggerParameters */ + INT8 rssiThreshold; + UINT8 rssiFilterWeight; + UINT8 rssiFilterDepth; + UINT8 lowRSSIEventType; + + /* ACXLowSNRTriggerParameters */ + UINT8 snrThreshold; + UINT8 snrFilterWeight; + UINT8 snrFilterDepth; + UINT8 lowSNREventType; + + /* ACXConsNackTriggerParameters */ + UINT8 maxTxRetry; + + /* ACXBssLossTsfSynchronize */ + UINT16 TsfMissThreshold; + UINT16 BssLossTimeout; +} whalCtrl_roamingTriggerCmd_t; + + +typedef struct +{ + UINT8 channelNumber; + UINT8 switchTime; + UINT8 txFlag; + UINT8 flush; +} whalCtrl_switchChannelCmd_t; + +typedef scan_Params_t whalCtrl_scan_t; + + +PACKED_STRUCT( whalCtrl_counters_t, + + UINT32 RecvError; /* the number of frames that a NIC receives but does not indicate to the protocols due to errors*/ + UINT32 RecvNoBuffer; /* the number of frames that the NIC cannot receive due to lack of NIC receive buffer space */ + UINT32 FragmentsRecv; + UINT32 FrameDuplicates; + UINT32 FcsErrors; +); + +/* +PACKED_STRUCT(whalCtrl_PLT_TX_Continues_t, + UINT8 rate; + UINT8 chID; + UINT8 preamble; + UINT8 bandID; + UINT8 Modulation; + UINT8 TestMode; +); + +PACKED_STRUCT(whalCtrl_PLT_TX_CW_t, + UINT8 chID; + UINT8 bandID; +); +*/ + +PACKED_STRUCT(whalCtrl_WriteRegister_t, + UINT32 RegAdress; + UINT32 RegData; +); + + +typedef struct +{ + uint8 channel; + int8 maxRegPower; +} whalCtrl_RegulatoryChannelPowerConstraint_t; + +typedef struct +{ + uint8 numberOfChannels; + RadioBand_e band; + whalCtrl_RegulatoryChannelPowerConstraint_t channelListConstraint[MAX_CHANNELS_IN_REG_DOMAIN]; +} whalCtrl_RegulatoryPowerConstraint_t; + +typedef struct +{ + INFO_ELE_HDR + int8 powerConstraintOnBss; /* The attenuation from the regulatory */ + /* power constraint as declared by the AP */ + /* Units: dBm*/ + /* Range: -20 - 30*/ +} whalCtrl_ApPowerConstraint_t; + +typedef struct +{ + INFO_ELE_HDR + uint8 attenuation; /* Attenuation from the maximum radio transmit */ + /* power as declared by the driver/application*/ + /* Units: dB*/ + /* Range: 0 - 20*/ +} whalCtrl_PowerAttenuation_t; + +typedef struct +{ + INFO_ELE_HDR + int8 currentTransmitPower; /* Current transmit power of the radio.*/ + /* Units: dBm*/ +} whalCtrl_GetCurrentTxPower_t; + +/* + * TX Ack Policy + */ +typedef struct +{ + AckPolicy_e AckPolicy; + UINT8 AcId; +}AcAckPolicy_t; + +typedef union +{ + + + /* HAL Control section */ + UINT16 halCtrlRtsThreshold; + UINT8 halCtrlCtsToSelf; + rxTimeOut_t halCtrlRxTimeOut; + UINT16 halCtrlFragThreshold; + UINT16 halCtrlListenInterval; + UINT16 halCtrlCurrentBeaconInterval; + UINT8 halCtrlTxPowerDbm; + txAntenna_e halCtrlTxAntenna; + rxAntenna_e halCtrlRxAntenna; + UINT8 halCtrlAifs; + BOOL halCtrlTxMemPoolQosAlgo; + BOOL halCtrlClkRunEnable; + whalCtrl_counters_t halCtrlCounters; + + PltTxContinues_t PltTxContinues; + TestCmdChannelBand_t PltCW; + PLT_MIB_t PltMib; + + + UINT8 halCtrlCurrentChannel; + + UINT8 earlyWakeup; + + /* tx data qos related parameters */ + txDataQosParams_t txDataQosParams; + + /* + * WME Tx Parameters + */ + + /* ac queues parameters */ + acQueuesParams_t acQueuesParams; + + /* Access Category Ack Policy */ + AcAckPolicy_t AcAckPolicy; + /* Qos Type For Tx Descriptor */ + qosProtocols_e halCtrlTxQosType; + /* ac traffic parameters */ + whaCtrl_acTrafficParams_t acTrafficParams; + /* queue params */ + acQueuesParams_t acQueuesParam; + + /* ac Qos parameters */ + queueTrafficParams_t *pQueueTrafficParams; + + /* Security related parameters */ +#ifdef EXC_MODULE_INCLUDED + BOOL rsnExcSwEncFlag; + BOOL rsnExcMicFieldFlag; +#endif + halCtrl_CipherSuite_e rsnEncryptionStatus; + UINT8 rsnHwEncDecrEnable; /* 0- disable, 1- enable*/ + securityKeys_t *pRsnKey; + UINT8 rsnDefaultKeyID; + + /* + Power Control + */ + + powerAutho_PowerPolicy_e minPowerPolicy; + + /* Measurements section */ + acxStatisitcs_t acxStatisitics; + mediumOccupancy_t mediumOccupancy; + BOOLEAN halTxOpContinuation; + + tsf_dtim_mib_t fwTsfDtimInfo; + + interogateCmdCBParams_t interogateCmdCBParams; + configureCmdCBParams_t configureCmdCBParams; + + txRatePolicy_t *pTxRatePlicy; + + /* Antenna diversity options */ + whalCtrl_antennaDiversityOptions_t antennaDiversityOptions; + UINT8 antennaNum; + + /* WARNING!!! This section is used to set/get internal params only. */ + UINT16 halCtrlAid; + + + SoftGeminiEnableModes_e SoftGeminiEnable; + SoftGeminiParam_t SoftGeminiParam; + + UINT32 halCtrlMaxRxMsduLifetime; + + /* Utils section */ + UINT8 SeverityTable[WLAN_MAX_SEVERITIES]; + UINT8 ModuleTable[WLAN_MAX_LOG_MODULES]; + UINT32 reportPPMode; + UINT32 osDbgState; + + /* Beacon Broadcast options */ + BcnBrcOptions_t BcnBrcOptions; + + /* PLT tests */ + TI_STATUS PltRxCalibrationStatus; + +}whalParamContents; + + +typedef struct{ + + UINT32 paramType; + UINT32 paramLength; + whalParamContents content; +}whalParamInfo_t; + +typedef enum +{ + GWSI_TX_CB_MODULE_OWNER = 0x0100, /* WHAL TX MODULE */ + GWSI_RX_CB_MODULE_OWNER = 0x0200, /* WHAL RX MODULE */ + GWSI_EVENT_IND_CB_MODULE_OWNER = 0x0400, /* WHAL HW EVENT MBOX */ + + /* + Last CB module owner- DO NOT TOUCH! + */ + GWSI_CB_LAST_MODULE_OWNER = 0x0500 + +} GwsiCB_ModuleOwner_e; + +typedef enum +{ + PLT_RX_PER_START, + PLT_RX_PER_STOP, + PLT_RX_PER_CLEAR, + PLT_RX_PER_GETRESULTS, + PLT_RX_PER_START_PH2, + PLT_RX_PER_MAX /* Must be last*/ +}PLT_RxPerCmd_e; + + +typedef enum +{ + /* Tx Data Path Callbacks */ + GWSI_TX_SEND_PACKET_TRANSFER_CB = GWSI_TX_CB_MODULE_OWNER | 0x01, /* WHAL TX MODULE */ + GWSI_TX_SEND_PACKET_COMPLETE_CB = GWSI_TX_CB_MODULE_OWNER | 0x02, /* WHAL TX MODULE */ + GWSI_TX_QUEUE_FREE_EVENT_CB = GWSI_TX_CB_MODULE_OWNER | 0x03, /* WHAL TX MODULE */ + + /* Rx Data Path Callbacks */ + GWSI_RX_REQUEST_FOR_BUFFER_CB = GWSI_RX_CB_MODULE_OWNER | 0x01, /* WHAL RX MODULE */ + GWSI_RX_RECEIVE_PACKET_CB = GWSI_RX_CB_MODULE_OWNER | 0x02, /* WHAL RX MODULE */ + +}GwsiCB_Type_e; + +typedef enum +{ + /* Tx Data Path Callbacks */ + HAL_INT_SEND_PACKET_TRANSFER = 0x00 , /* WHAL TX MODULE */ + HAL_INT_SEND_PACKET_COMPLETE , /* WHAL TX MODULE */ + HAL_INT_QUEUE_FREE_EVENT , /* WHAL TX MODULE */ + + /* Rx Data Path Callbacks */ + HAL_INT_RECEIVE_PACKET = 0x10 , /* WHAL RX MODULE */ + HAL_INT_REQUEST_FOR_BUFFER , /* WHAL RX MODULE */ + + /* Ctrl Callbacks */ + HAL_INT_COMMAND_COMPLETE = 0x20 , + + HAL_INTERNAL_EVENT_FAILURE + +}Hw_RegisterID_e; + +/* + * WHAL CTRL Class API + */ +TI_HANDLE whalCtrl_Create (TI_HANDLE hOs); +int whalCtrl_Stop (TI_HANDLE hWhalCtrl); +TI_STATUS whalCtrl_Config (TI_HANDLE hWhalCtrl, TI_HANDLE hTNETW_Driver, whalCtrl_config_t* pWhalCtrlCfg,UINT32 *pFWImage); +TI_HANDLE whalCtrl_GetTnetwifHandle (TI_HANDLE hWhalCtrl); +TI_HANDLE whalCtrl_GetWhalParams (TI_HANDLE hWhalCtrl); +int whalCtrl_ConfigHw (TI_HANDLE hWhalCtrl, TnetwDrv_InitParams_t* pInitParams, void *fCb, TI_HANDLE hCb); +int whalCtrl_ReConfig (TI_HANDLE hWhalCtrl, int DoReJoin); +void whalCtrl_RecoveryEnded (TI_HANDLE hWhalCtrl); +int whalCtrl_Destroy (TI_HANDLE pWhalCtrl); +void whalCtrl_Register_CB (TI_HANDLE pWhalCtrl,tiUINT32 CallBackID,void *CBFunc,TI_HANDLE CBObj); +void whalCtrl_PreRecoveryProcess(TI_HANDLE hWhalCtrl); +TI_STATUS whalCtrl_FinalizeDownload (TI_HANDLE hWhalCtrl); +TI_STATUS whalCtrl_FinalizeOnFailure (TI_HANDLE hWhalCtrl); + +/* + * Set/Get API + */ +int whalCtrl_setRxFilters (TI_HANDLE hWhalCtrl, UINT32 RxConfigOption, UINT32 RxFilterOption); +int whalCtrl_GetRxFilters (TI_HANDLE hWhalCtrl, UINT32* pRxConfigOption, UINT32* pRxFilterOption); +int whalCtrl_setRxDataFiltersParams(TI_HANDLE hWhalCtrl, BOOL enabled, filter_e defaultAction); +int whalCtrl_setRxDataFilter (TI_HANDLE hWhalCtrl, UINT8 index, UINT8 command, filter_e action, UINT8 numFieldPatterns, UINT8 lenFieldPatterns, UINT8 * fieldPatterns); +int whalCtrl_getRxDataFiltersStatistics(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf); +int whalCtrl_SetMacAddress (TI_HANDLE hWhalCtrl, macAddress_t *macAddr); +int whalCtrl_SetTemplate (TI_HANDLE pWhalCtrl, whalCtrl_setTemplate_t* pTemplateParams); +int whalCtrl_SetTemplateWithCB (TI_HANDLE hWhalCtrl, whalCtrl_setTemplate_t* pTemplateParams,void *CBFunc,TI_HANDLE CBObj); +TemplateParams_T * whalCtrl_GetTemplate(TI_HANDLE hWhalCtrl, whalCtrl_templateType_e templateType); +int whalCtrl_SetSlotTime (TI_HANDLE hWhalCtrl, slotTime_e SlotTimeVal); +int whalCtrl_SetPreamble (TI_HANDLE hWhalCtrl, preamble_e preambleVal); +int whalCtrl_SetFrameRate (TI_HANDLE hWhalCtrl, rate_e txFrmRate, BOOL bCtrlFrame); +int whalCtrl_SetBeaconFiltering (TI_HANDLE hWhalCtrl, UINT8 beaconFilteringStatus, UINT8 numOfBeaconsToBuffer); +int whalCtrl_GetBeaconFiltering (TI_HANDLE hWhalCtrl); + +int whalCtrl_SetBeaconFilterIETable(TI_HANDLE hWhalCtrl, UINT8* numberOfIEs, UINT8 * IETable, UINT8* IETableSize); +int whalCtrl_GetBeaconFilterIETable(TI_HANDLE hWhalCtrl, UINT8* numberOfIEs, UINT8 * IETable, UINT8* IETableSize); +int whalCtrl_SetarpIpAddressesTable(TI_HANDLE hWhalCtrl, IpAddress_t * IP_addr, UINT8 isEnabled , IPver_e IP_ver); +int whalCtrl_SetarpIpFilterEnabled(TI_HANDLE hWhalCtrl,UINT8 isEnabled ); +int whalCtrl_SetGroupAddressesTable(TI_HANDLE hWhalCtrl, UINT8 numGroupAddrs, macAddress_t *Group_addr,UINT8 isEnabled); +int whalCtrl_GetGroupAddressesTable(TI_HANDLE hWhalCtrl, UINT8* pisEnabled, UINT8* pnumGroupAddrs, macAddress_t *Group_addr); + +int whalCtrl_SetCwMin (TI_HANDLE hWhalCtrl, UINT8 CwMin); +int whalCtrl_getSend4xWackInfo (TI_HANDLE hWhalCtrl, UINT8 *Send4xWackInfo); +int whalCtrl_setSend4xWackInfo (TI_HANDLE hWhalCtrl, UINT8 Send4xWackInfo); +void whalCtrl_SetBeaconInterval (TI_HANDLE hWhalCtrl , UINT16 Val); +UINT16 whalCtrl_GetBeaconInterval (TI_HANDLE hWhalCtrl); +void whalCtrl_SetInfoElemEventMask(TI_HANDLE hWhalCtrl,UINT32 eventMask); + +int whalCtrl_getTsf (TI_HANDLE hwHalCtrl, UINT32 *pTsf); +int whalCtrl_setDtimPeriod (TI_HANDLE hWhalCtrl, UINT8 dtimPeriod, UINT16 TBTT); +UINT8 whalCtrl_GetDtimCount (TI_HANDLE hWhalCtrl); + +TI_STATUS whalCtrl_SetParam (TI_HANDLE pWhalCtrl, whalParamInfo_t* pParamInfo); +TI_STATUS whalCtrl_GetParam (TI_HANDLE pWhalCtrl, whalParamInfo_t* pParamInfo); + +int whalCtrl_ElpCtrl_SetMode(TI_HANDLE hWhalCtrl, elpCtrl_Mode_e mode); +int whalCtrl_setBetParams(TI_HANDLE hWhalCtrl, UINT8 Enable, UINT8 MaximumConsecutiveET); + +/* + * Read/Write Reg API + */ +UINT32 whalCtrlReadMacReg (TI_HANDLE hWhalCtrl, UINT32 addr); +void whalCtrlWriteMacReg (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 val); +UINT32 whalCtrlReadPhyReg (TI_HANDLE hWhalCtrl, UINT32 addr); +void whalCtrlWritePhyReg (TI_HANDLE hWhalCtrl, UINT32 addr, UINT32 val); +int whalCtrl_GetRadioStandByState(TI_HANDLE hWhalCtrl); +TI_STATUS whalCtrl_GetFWInfo (TI_HANDLE hWhalCtrl, whalCtrl_chip_t *pChip_Version); + + +/* + * Rx API + */ +int whalCtrl_resetMacRx (TI_HANDLE hWhalCtrl); + +/* + * Tx API + */ + +int whalCtrl_DisableTx (TI_HANDLE hWhalCtrl); +int whalCtrl_EnableTx (TI_HANDLE hWhalCtrl); +UINT32 whalCtrl_GetTime (TI_HANDLE hWhalCtrl); +void whalCtrl_resetTxCounters (TI_HANDLE hWhalCtrl); +void whalCtrl_updateSecuritySeqNum(TI_HANDLE hWhalCtrl, UINT8 securitySeqNumLsByte); +/* + * Radio Handle API + */ +int whalCtrl_SetRadioBand (TI_HANDLE hWhalCtrl, radioBand_e RadioBand); +int whalCtrl_SwitchChannel (TI_HANDLE hWhalCtrl , UINT8 channel); + +/* + * Recovery API + */ +int whalCtrl_CheckMailboxCb (TI_HANDLE hWhalCtrl,UINT16 MboxStatus,char *InterrogateParamsBuf); +int whalCtrl_SetPacketDetectionThreshold (TI_HANDLE hWhalCtrl, UINT8 PDThreshold); +int whalCtrl_SetEnergyDetection (TI_HANDLE hWhalCtrl, BOOL energyDetection); +int whalCtrl_CheckHwStatus (TI_HANDLE hWhalCtrl); +int whalCtrl_InitHwStatus (TI_HANDLE hWhalCtrl); +int whalCtrl_PrintHwStatus (TI_HANDLE hWhalCtrl); +int whalCtrl_PeriodicCheckMailboxCb(TI_HANDLE hWhalCtrl,UINT16 MboxStatus,char *InterrogateParamsBuf); +void whalCtrl_ResetBusAfterHardBoot(TI_HANDLE hWhalCtrl); + +/* + * Event Mail Box API + */ +int whalCtrl_EventMbox_RegisterForEvent(TI_HANDLE hWhalCtrl, int EventBit, void *CbFunc, void *CbObj); +int whalCtrl_EventMbox_Disable (TI_HANDLE hWhalCtrl, int EventBit); +int whalCtrl_EventMbox_Enable (TI_HANDLE hWhalCtrl, int EventBit); + +/* + * LNA API + */ +int whalCtrl_LNAControl (TI_HANDLE hWhalCtrl, UINT8 LNAControlField); + +/* + * HW Interrupt API + */ +void whalCtrl_HandleBusTxn_Complete(TI_HANDLE hWhalCtrl); +int whalCtrl_HandleInterrupts (TI_HANDLE pWhalCtrl); +void whalCtrl_EnableInterrupts (TI_HANDLE pWhalCtrl); +void whalCtrl_DisableInterrupts (TI_HANDLE pWhalCtrl); +UINT32 whalCtrl_CheckInterrupts (TI_HANDLE pWhalCtrl); +void whalCtr_SlaveAckMaskNotification (TI_HANDLE hWhalCtrl); + + + +/* + * Power Ctrl API + */ +TI_STATUS whalCtrl_powerMgmtConfig(TI_HANDLE theWhalCtrlHandle, + whalCtrl_powerSaveParams_t* powerSaveParams); +/* whalCtrl_powerMgmtConfig_t thePowerMgmtConfig);*/ +TI_STATUS whalCtrl_wakeUpCondition(TI_HANDLE theWhalCtrlHandle, + whalCtrl_powerMgmtConfig_t thePowerMgmtConfig); +TI_STATUS whalCtrl_PMConfig(TI_HANDLE theWhalCtrlHandle, + whalCtrl_powerMgmtConfig_t thePowerMgmtConfig); +TI_STATUS whalCtrl_BcnBrcOptions(TI_HANDLE theWhalCtrlHandle, + whalCtrl_powerMgmtConfig_t thePowerMgmtConfig); +TI_STATUS whalCtrl_SetMinPowerLevel(TI_HANDLE theWhalCtrlHandle, + powerAutho_PowerPolicy_e minPowerPolicy); +TI_STATUS whalCtrl_GetMinPowerLevel(TI_HANDLE theWhalCtrlHandle, + powerAutho_PowerPolicy_e* minPowerPolicy); + + +/* + * Measurement API + */ +int whalCtrl_NoiseHistogramCmd (TI_HANDLE hWhalCtrl, whalCtrl_noiseHistogram_t* pNoiseHistParams); +INT8 whalCtrl_convertRSSIToRxLevel(TI_HANDLE hWhalCtrl, INT32 rssiVal); +int whalCtrl_getMaxNumberOfCommandsInQueue (TI_HANDLE hWhalCtrl); +int whalCtrl_InterrogateGwsiStatisitics(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf); +int whalCtrl_InterrogateGwsiCounters(TI_HANDLE hWhalCtrl, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf); +int whalCtrl_InterrogateMbox(TI_HANDLE hWhalCtrl , void *CB_Func, TI_HANDLE CB_handle, void *CB_Buf); +int whalCtrl_JoinBss (TI_HANDLE pWhalCtrl, whalCtrl_joinBss_t* pJoinBssParams); +int whalCtrl_ReJoin (TI_HANDLE hWhalCtrl); +BOOL whalCtrl_isCardIn (TI_HANDLE hWhalCtrl); +int whalCtrl_SendGenCmd (TI_HANDLE hWhalCtrl, char* pBuf, UINT32 Length); +void whalCtrl_exitFromInitMode(TI_HANDLE hWhalCtrl); +void whalCtrl_exitFromInitModePart1(TI_HANDLE hWhalCtrl); +void whalCtrl_exitFromInitModePart2(TI_HANDLE hWhalCtrl); +int whalCtrl_IsCardInstalled (TI_HANDLE hWhalCtrl) ; + +/* ---------------------------------------------------------------------------------- + Scan Functions + ----------------------------------------------------------------------------------*/ +int whalCtrl_StartScan (TI_HANDLE hWhalCtrl, whalCtrl_scan_t* pScanVals, BOOLEAN bHighPriority , void* ScanCommandResponseCB, TI_HANDLE CB_handle); +int whalCtrl_StartSPSScan (TI_HANDLE hWhalCtrl, whalCtrl_scan_t* pScanVals , void* ScanCommandResponseCB, TI_HANDLE CB_handle); +int whalCtrl_StopScan (TI_HANDLE pWhalCtrl ,void* ScanCommandResponseCB, TI_HANDLE CB_handle); +int whalCtrl_StopSPSScan (TI_HANDLE hWhalCtrl , void* ScanCommandResponseCB, TI_HANDLE CB_handle); + +TI_STATUS whalCtrl_SetSplitScanTimeOut (TI_HANDLE hWhalCtrl, UINT32 uTimeOut); + +int whalCtrl_SwitchChannelCmd (TI_HANDLE hWhalCtrl, whalCtrl_switchChannelCmd_t* pSwitchChannelCmd); +int whalCtrl_SwitchChannelCancelCmd (TI_HANDLE hWhalCtrl, UINT8 channel); + +/* ---------------------------------------------------------------------------------- + Roaming Trigger Functions + ----------------------------------------------------------------------------------*/ +int whalCtrl_SetSNRParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +int whalCtrl_SetRSSIParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +int whalCtrl_SetMaxTxRetryParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +int whalCtrl_SetBssLossTsfThresholdParamsCmd (TI_HANDLE hWhalCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +int whalCtrl_GetAverageRSSI (TI_HANDLE hWhalCtrl, INT8* averageRSSI); +int whalCtrl_FwDisconnect(TI_HANDLE hWhalCtrl, UINT32 ConfigOptions, UINT32 FilterOptions); +int whalCtrl_GetAsynRSSI (TI_HANDLE hWhalCtrl,void *CB_Func, TI_HANDLE CB_handle, PUINT8 CB_Buf); + +/* ---------------------------------------------------------------------------------- + Measurement Functions + ----------------------------------------------------------------------------------*/ +int whalCtrl_measurementCmd (TI_HANDLE hWhalCtrl, whalCtrl_MeasurementParameters_t* pMeasurementParams, + void* CommandResponseCB, TI_HANDLE CB_handle); +int whalCtrl_measurementStop (TI_HANDLE hWhalCtrl, void* CommandResponseCB, TI_HANDLE CB_handle); +int whalCtrl_ApDiscoveryCmd (TI_HANDLE hWhalCtrl, whalCtrl_ApDiscoveryParameters_t* pMeasurementParams); +int whalCtrl_ApDiscoveryStop (TI_HANDLE hWhalCtrl); + +/* ---------------------------------------------------------------------------------- + PLT Functions + ----------------------------------------------------------------------------------*/ +int whalCtrl_RxPER(TI_HANDLE hWhalCtrl, PLT_RxPerCmd_e eRxPerCmd, TI_HANDLE CB_Handle, void *CB_Func); +int whalCtrl_TxCW(TI_HANDLE hWhalCtrl, TestCmdChannelBand_t* PltTxCarrier, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf); +int whalCtrl_TxContinues(TI_HANDLE hWhalCtrl, PltTxContinues_t* pPLT_TX_Continues, void * CB_Func, TI_HANDLE CB_handle, void * CB_Buf); +int whalCtrl_WriteRegister(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf); +int whalCtrl_ReadRegister(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf); +int whalCtrl_ReadMib(TI_HANDLE hWhalCtrl, TI_HANDLE CB_Handle, void* CB_Func, void* CB_Buf); +int whalCtrl_WriteMib(TI_HANDLE hWhalCtrl, PLT_MIB_t* pMib); + +#endif /* _WHAL_CTRL_API_H*/ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_prm.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_prm.h new file mode 100644 index 0000000..14f9857 --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalCtrl_prm.h @@ -0,0 +1,52 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _WHAL_CTRL_PRM_H +#define _WHAL_CTRL_PRM_H + +#define MIN_FRAG_THRESHOLD_VAL 256 +#define MAX_FRAG_THRESHOLD_VAL 2346 + +#define MIN_LONG_RETRY_LIMIT_VAL 1 +#define MAX_LONG_RETRY_LIMIT_VAL 255 + +#define MIN_SHORT_RETRY_LIMIT_VAL 1 +#define MAX_SHORT_RETRY_LIMIT_VAL 255 + +#define MIN_RTS_THRESHOLD_VAL 0 +#define MAX_RTS_THRESHOLD_VAL 2347 +#endif /* _WHAL_CTRL_PRM_H*/ + + diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalDefaultParams.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalDefaultParams.h new file mode 100644 index 0000000..32ff4aa --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalDefaultParams.h @@ -0,0 +1,353 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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 _WHAL_DEFAULT_PARAMS_H +#define _WHAL_DEFAULT_PARAMS_H + + +/***************************************************************************** + ** ** + ** ** + ** CONSTANTS ** + ** ** + ** ** + *****************************************************************************/ + +/* PALAU Group Address Default Values */ +#define NUM_GROUP_ADDRESS_VALUE_DEF 0 +#define NUM_GROUP_ADDRESS_VALUE_MIN 0 +#define NUM_GROUP_ADDRESS_VALUE_MAX 8 + +/* Early Wakeup Default Values */ +#define EARLY_WAKEUP_ENABLE_MIN (FALSE) +#define EARLY_WAKEUP_ENABLE_MAX (TRUE) +#define EARLY_WAKEUP_ENABLE_DEF (TRUE) + +/* ARP IP Filter Default Values */ +#define MIN_FILTER_ENABLE_VALUE 0 +#define MAX_FILTER_ENABLE_VALUE 2 +#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 15 +#define MIN_BEACON_FILTER_ENABLE_VALUE 0 +#define MAX_BEACON_FILTER_ENABLE_VALUE 1 +#define BEACON_FILTER_IE_TABLE_DEF_SIZE 35 +#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 + +#define HAL_CTRL_BET_ENABLE_MIN 0 +#define HAL_CTRL_BET_ENABLE_MAX 1 +#define HAL_CTRL_BET_ENABLE_DEF 1 + +#define HAL_CTRL_BET_MAX_CONSC_MIN 1 +#define HAL_CTRL_BET_MAX_CONSC_MAX 50 +#define HAL_CTRL_BET_MAX_CONSC_DEF 8 + +/* TX XFER parameters */ +#define TX_XFER_HW_BUFFER_FULL_DUR_RECOVERY_DEF 50 +#define TX_XFER_HW_BUFFER_FULL_DUR_RECOVERY_MIN 30 +#define TX_XFER_HW_BUFFER_FULL_DUR_RECOVERY_MAX 1000 + +/* Default Value for Atheros time out value */ +#define DEF_TX_POWER_ADJUST_TIME_OUT 5000 + +#define DEF_NUM_STORED_FILTERS 1 +#define MIN_NUM_STORED_FILTERS 1 +#define MAX_NUM_STORED_FILTERS 8 + +#define HAL_CTRL_HW_ACCESS_METHOD_MIN 0 +#define HAL_CTRL_HW_ACCESS_METHOD_MAX 2 +#define HAL_CTRL_HW_ACCESS_METHOD_DEF 1 + +#define HAL_CTRL_SITE_FRAG_COLLECT_MIN 2 +#define HAL_CTRL_SITE_FRAG_COLLECT_MAX 10 +#define HAL_CTRL_SITE_FRAG_COLLECT_DEF 3 + + +#define HAL_CTRL_HOST_RX_DESC_MIN 1 +#define HAL_CTRL_HOST_RX_DESC_MAX 127 +#define HAL_CTRL_HOST_RX_DESC_DEF 32 /* instead of 40 - for a bigger TKIP FW*/ + +#define HAL_CTRL_HOST_TX_DESC_MIN 1 +#define HAL_CTRL_HOST_TX_DESC_MAX 127 +#define HAL_CTRL_HOST_TX_DESC_DEF 32 /* instead of 40 - for a bigger TKIP FW*/ + +#define HAL_CTRL_ACX_RX_DESC_MIN 1 +#define HAL_CTRL_ACX_RX_DESC_MAX 127 +#define HAL_CTRL_ACX_RX_DESC_DEF 32 + +#define HAL_CTRL_ACX_TX_DESC_MIN 1 +#define HAL_CTRL_ACX_TX_DESC_MAX 127 +#define HAL_CTRL_ACX_TX_DESC_DEF 16 + +#define HAL_CTRL_ACX_BLOCK_SIZE_MIN 256 +#define HAL_CTRL_ACX_BLOCK_SIZE_MAX 2000 +#define HAL_CTRL_ACX_BLOCK_SIZE_DEF 256 + +#define HAL_CTRL_RX_BLOCKS_RATIO_MIN 0 +#define HAL_CTRL_RX_BLOCKS_RATIO_MAX 100 +#define HAL_CTRL_RX_BLOCKS_RATIO_DEF 50 + +#define HAL_CTRL_USE_PLCP_HDR_DEF 1 +#define HAL_CTRL_USE_PLCP_HDR_MAX 1 +#define HAL_CTRL_USE_PLCP_HDR_MIN 0 + +#define HAL_CTRL_TX_FLASH_ENABLE_MIN FALSE +#define HAL_CTRL_TX_FLASH_ENABLE_MAX TRUE +#define HAL_CTRL_TX_FLASH_ENABLE_DEF TRUE + +#define HAL_CTRL_USE_INTR_TRHESHOLD_MIN 0 +#define HAL_CTRL_USE_INTR_TRHESHOLD_MAX 1 +#define HAL_CTRL_USE_INTR_TRHESHOLD_DEF 0 + +#define HAL_CTRL_USE_TX_DATA_INTR_MIN 0 +#define HAL_CTRL_USE_TX_DATA_INTR_MAX 1 + +#if (!defined TIWLN_WINCE30) || (defined EMBEDDED_BOARD1) +#define HAL_CTRL_USE_TX_DATA_INTR_DEF 1 +#else +#define HAL_CTRL_USE_TX_DATA_INTR_DEF 0 +#endif + +#define NUM_OF_CHANNELS_24 (14) +#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 HAL_CTRL_CALIBRATION_CHANNEL_2_4_MIN 1 +#define HAL_CTRL_CALIBRATION_CHANNEL_2_4_MAX NUM_OF_CHANNELS_24 +#define HAL_CTRL_CALIBRATION_CHANNEL_2_4_DEF 1 + +#define HAL_CTRL_CALIBRATION_CHANNEL_5_0_MIN 34 +#define HAL_CTRL_CALIBRATION_CHANNEL_5_0_MAX A_5G_BAND_MAX_CHANNEL +#define HAL_CTRL_CALIBRATION_CHANNEL_5_0_DEF 36 + +#define HAL_CTRL_CALIBRATION_CHANNEL_4_9_MIN 8 +#define HAL_CTRL_CALIBRATION_CHANNEL_4_9_MAX 16 +#define HAL_CTRL_CALIBRATION_CHANNEL_4_9_DEF 12 + +#define HAL_CTRL_RTS_THRESHOLD_MIN 0 +#define HAL_CTRL_RTS_THRESHOLD_MAX 4096 +#define HAL_CTRL_RTS_THRESHOLD_DEF 2347 + +#define HAL_CTRL_BCN_RX_TIME_OUT_MIN 10 /* ms */ +#define HAL_CTRL_BCN_RX_TIME_OUT_MAX 1000 /* ms */ +#define HAL_CTRL_BCN_RX_TIME_OUT_DEF 10 /* ms */ + +#define HAL_CTRL_RX_DISABLE_BROADCAST_MIN FALSE +#define HAL_CTRL_RX_DISABLE_BROADCAST_MAX TRUE +#define HAL_CTRL_RX_DISABLE_BROADCAST_DEF FALSE + +/* Indicate if the recovery process is active or not */ +#define HAL_CTRL_RECOVERY_ENABLE_MIN FALSE +#define HAL_CTRL_RECOVERY_ENABLE_MAX TRUE +#define HAL_CTRL_RECOVERY_ENABLE_DEF TRUE + +#define HAL_CTRL_FRAG_THRESHOLD_MIN 256 +#define HAL_CTRL_FRAG_THRESHOLD_MAX 4096 +#define HAL_CTRL_FRAG_THRESHOLD_DEF 2312 + +#define HAL_CTRL_MAX_TX_MSDU_LIFETIME_MIN 0 +#define HAL_CTRL_MAX_TX_MSDU_LIFETIME_MAX 3000 +#define HAL_CTRL_MAX_TX_MSDU_LIFETIME_DEF 512 + +#define HAL_CTRL_MAX_RX_MSDU_LIFETIME_MIN 0 +#define HAL_CTRL_MAX_RX_MSDU_LIFETIME_MAX 0xFFFFFFFF +#define HAL_CTRL_MAX_RX_MSDU_LIFETIME_DEF 512000 + + +#define HAL_CTRL_LISTEN_INTERVAL_MIN 1 +#define HAL_CTRL_LISTEN_INTERVAL_MAX 10 +#define HAL_CTRL_LISTEN_INTERVAL_DEF 3 + +#define HAL_CTRL_MAX_FULL_BEACON_MIN 0 +#define HAL_CTRL_MAX_FULL_BEACON_MAX 10000 +#define HAL_CTRL_MAX_FULL_BEACON_DEF 1000 + +#define HAL_CTRL_BET_ENABLE_THRESHOLD_MIN 0 +#define HAL_CTRL_BET_ENABLE_THRESHOLD_MAX 255 +#define HAL_CTRL_BET_ENABLE_THRESHOLD_DEF 8 + +#define HAL_CTRL_BET_DISABLE_THRESHOLD_MIN 0 +#define HAL_CTRL_BET_DISABLE_THRESHOLD_MAX 255 +#define HAL_CTRL_BET_DISABLE_THRESHOLD_DEF 12 + +/* This field indicates the number of transmit retries to attempt at + the rate specified in the TNETW1130 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 HAL_CTRL_RATE_FB_RETRY_LIMIT_MIN 0 /* => No retries before starting RateFallBack */ +#define HAL_CTRL_RATE_FB_RETRY_LIMIT_MAX 255 /* =>0xff for disabling Rate fallback */ +#define HAL_CTRL_RATE_FB_RETRY_LIMIT_DEF 0 + +#define HAL_CTRL_TX_ANTENNA_MIN TX_ANTENNA_2 +#define HAL_CTRL_TX_ANTENNA_MAX TX_ANTENNA_1 +#define HAL_CTRL_TX_ANTENNA_DEF TX_ANTENNA_1 + +#define HAL_CTRL_RX_ANTENNA_MIN RX_ANTENNA_1 +#define HAL_CTRL_RX_ANTENNA_MAX RX_ANTENNA_PARTIAL +#define HAL_CTRL_RX_ANTENNA_DEF RX_ANTENNA_FULL + +#define HAL_CTRL_TX_CMPLT_THRESHOLD_DEF 0 +#define HAL_CTRL_TX_CMPLT_THRESHOLD_MIN 0 +#define HAL_CTRL_TX_CMPLT_THRESHOLD_MAX 15 + +#define HAL_CTRL_ACI_MODE_MIN 0 +#define HAL_CTRL_ACI_MODE_MAX 255 +#define HAL_CTRL_ACI_MODE_DEF 0 + +#define HAL_CTRL_ACI_INPUT_CCA_MIN 0 +#define HAL_CTRL_ACI_INPUT_CCA_MAX 255 +#define HAL_CTRL_ACI_INPUT_CCA_DEF 1 + +#define HAL_CTRL_ACI_QUALIFIED_CCA_MIN 0 +#define HAL_CTRL_ACI_QUALIFIED_CCA_MAX 255 +#define HAL_CTRL_ACI_QUALIFIED_CCA_DEF 3 + +#define HAL_CTRL_ACI_STOMP_FOR_RX_MIN 0 +#define HAL_CTRL_ACI_STOMP_FOR_RX_MAX 255 +#define HAL_CTRL_ACI_STOMP_FOR_RX_DEF 2 + +#define HAL_CTRL_ACI_STOMP_FOR_TX_MIN 0 +#define HAL_CTRL_ACI_STOMP_FOR_TX_MAX 255 +#define HAL_CTRL_ACI_STOMP_FOR_TX_DEF 0 + +#define HAL_CTRL_ACI_TX_CCA_MIN 0 +#define HAL_CTRL_ACI_TX_CCA_MAX 255 +#define HAL_CTRL_ACI_TX_CCA_DEF 1 + +/************************************/ +/* Rates values */ +/************************************/ + + +#define BASIC_RATE_SET_1_2 0 +#define BASIC_RATE_SET_1_2_5_5_11 1 + + +#define BASIC_RATE_SET_UP_TO_12 2 +#define BASIC_RATE_SET_UP_TO_18 3 +#define BASIC_RATE_SET_1_2_5_5_6_11_12_24 4 +#define BASIC_RATE_SET_UP_TO_36 5 +#define BASIC_RATE_SET_UP_TO_48 6 +#define BASIC_RATE_SET_UP_TO_54 7 +#define BASIC_RATE_SET_UP_TO_24 8 +#define BASIC_RATE_SET_6_12_24 9 + + +/* Keep increasing define values - related to increasing suported rates */ +#define SUPPORTED_RATE_SET_1_2 0 +#define SUPPORTED_RATE_SET_1_2_5_5_11 1 +#define SUPPORTED_RATE_SET_1_2_5_5_11_22 2 +#define SUPPORTED_RATE_SET_UP_TO_18 3 +#define SUPPORTED_RATE_SET_UP_TO_24 4 +#define SUPPORTED_RATE_SET_UP_TO_36 5 +#define SUPPORTED_RATE_SET_UP_TO_48 6 +#define SUPPORTED_RATE_SET_UP_TO_54 7 +#define SUPPORTED_RATE_SET_ALL 8 +#define SUPPORTED_RATE_SET_ALL_OFDM 9 + + +/***************************************************************************** + ** ** + ** ** + ** ENUMS ** + ** ** + ** ** + *****************************************************************************/ + +typedef enum +{ + BSS_INDEPENDENT = 0, + BSS_INFRASTRUCTURE = 1, + BSS_ANY = 2, + BSS_AP = 3 +} bssType_e; + + +typedef enum +{ + PREAMBLE_LONG = 0, + PREAMBLE_SHORT = 1, + PREAMBLE_UNSPECIFIED = 0xFF +} preamble_e; + +typedef enum +{ + PHY_SLOT_TIME_LONG = 0, + PHY_SLOT_TIME_SHORT = 1 +} slotTime_e; + +typedef enum +{ + NULL_KEY = 0, + WEP_KEY, + TKIP_KEY, + AES_KEY, + EXC_KEY, +} keyType_e; + +/* make it same as "rate_e" */ +typedef enum +{ + REG_RATE_AUTO_BIT = 0, /* This value is reserved if this enum is used for MgmtCtrlTxRate - The auto mode is noly valid for data packets */ + REG_RATE_1M_BIT = 1, + REG_RATE_2M_BIT = 2, + REG_RATE_5_5M_CCK_BIT = 3, + REG_RATE_11M_CCK_BIT = 4, + REG_RATE_22M_PBCC_BIT = 5, + REG_RATE_6M_OFDM_BIT = 6, + REG_RATE_9M_OFDM_BIT = 7, + REG_RATE_12M_OFDM_BIT = 8, + REG_RATE_18M_OFDM_BIT = 9, + REG_RATE_24M_OFDM_BIT = 10, + REG_RATE_36M_OFDM_BIT = 11, + REG_RATE_48M_OFDM_BIT = 12, + REG_RATE_54M_OFDM_BIT = 13 +} registryTxRate_e; + + + + + + +#endif /* _WHAL_DEFAULT_PARAMS_H */ diff --git a/sta_dk/pform/linux/src/wlan_driver_inc/whalHwCtrl.h b/sta_dk/pform/linux/src/wlan_driver_inc/whalHwCtrl.h new file mode 100644 index 0000000..0be02ea --- /dev/null +++ b/sta_dk/pform/linux/src/wlan_driver_inc/whalHwCtrl.h @@ -0,0 +1,329 @@ +/**************************************************************************** +**+-----------------------------------------------------------------------+** +**| |** +**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** +**| All rights reserved. |** +**| |** +**| Redistribution and use in source and binary forms, with or without |** +**| modification, are permitted provided that the following conditions |** +**| are met: |** +**| |** +**| * Redistributions of source code must retain the above copyright |** +**| notice, this list of conditions and the following disclaimer. |** +**| * Redistributions in binary form must reproduce the above copyright |** +**| notice, this list of conditions and the following disclaimer in |** +**| the documentation and/or other materials provided with the |** +**| distribution. |** +**| * Neither the name Texas Instruments nor the names of its |** +**| contributors may be used to endorse or promote products derived |** +**| from this software without specific prior written permission. |** +**| |** +**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** +**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** +**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** +**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** +**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** +**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** +**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** +**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** +**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** +**| (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: whalHwCtrl.h + * PURPOSE: Implements action on the Acx card (Reset, Run, SendCmd, Sw Download) + * + ****************************************************************************/ + +#ifndef _WHAL_HW_CTRL_H +#define _WHAL_HW_CTRL_H + +#include "whalCommon.h" +#include "whalHwMboxCmd.h" +#include "whalHwMboxCmdBit.h" +#include "whalHwMboxConfig.h" +#include "whalBus_Api.h" +#include "whalCtrl.h" +#include "whalCtrl_api.h" +#include "whalParams.h" +#include "CmdQueue_api.h" +#include "commonTypes.h" + + +typedef struct +{ + /* Mbox */ + UINT32 NumMboxFailures; + UINT32 NumMboxErrDueToPeriodicBuiltInTestCheck; + +} whalCtrl_hwStatus_t; + +typedef struct _HwCtrl_T +{ + MemoryMap_t MemMap; + ACXDataPathParamsResp_t DataPathParams; + + HwMboxConfig_T *pHwMboxConfig; + HwMboxCmd_T *pHwMboxCmd; + HwMboxCmdBit_T *pHwMboxCmdBit; + struct WHAL_CTRL *pWhalCtrl; + WhalParams_T *pWhalParams; + whalCtrl_hwStatus_t HwStatus; + + UINT16 SecuritySeqNumLow; + UINT32 SecuritySeqNumHigh; + + TI_HANDLE *hHwRadio; + + TI_HANDLE hWhalBus; + TI_HANDLE hOs; + TI_HANDLE hReport; + TI_HANDLE hWhalCtrl; + TI_HANDLE hEventMbox; + + UINT32 uFwBuf; + UINT32 uFwAddr; + UINT32 uEEEPROMBuf; + UINT32 uEEEPROMLen; + + void *fCb; + TI_HANDLE hCb; + + dot11StationIDStruct mbox; + +} HwCtrl_T; + + +TI_STATUS whal_hwCtrl_FinalizeDownload (TI_HANDLE hHwCtrl, BootAttr_T *pBootAttr); +TI_STATUS whal_hwCtrl_FinalizeOnFailure (TI_HANDLE hHwCtrl); + +extern HwCtrl_T *whal_hwCtrl_Create(TI_HANDLE hOs, WhalParams_T *pWhalParams); +extern int whal_hwCtrl_Destroy (HwCtrl_T *pHwCtrl); +extern TI_STATUS whal_hwCtrl_Config(HwCtrl_T *pHwCtrl, TI_HANDLE hWhalCtrl,UINT8 AccessMode, UINT32 AcxRegAddr, + UINT32 AcxMemAddr, TI_HANDLE hReport, TI_HANDLE hMemMgr,UINT32 *pFWImage, + TI_HANDLE hEventMbox); +extern TI_HANDLE whal_hwCtrl_GetTnentwifHandle (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_ConfigHw (HwCtrl_T *pHwCtrl, void *fCb, TI_HANDLE hCb, BOOL bRecovery); +extern TI_STATUS whal_hwCtrl_Initiate (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_SetMacAddress (HwCtrl_T *pHwCtrl, macAddress_t *macAddr); +extern int whal_hwCtrl_StartJoin (HwCtrl_T *pHwCtrl, bssType_e BssType, void *JoinCompleteCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_SetBssType (HwCtrl_T *pHwCtrl, bssType_e BssType, UINT8 *HwBssType); +extern int whal_hwCtrl_setRxFilters (HwCtrl_T *pHwCtrl, UINT32 RxConfigOption, UINT32 RxFilterOption); +extern int whal_hwCtrl_GetRxFilters (HwCtrl_T *pHwCtrl, UINT32* pRxConfigOption, UINT32* pRxFilterOption); +extern int whal_hwCtrl_setRxDataFiltersParams(HwCtrl_T * pHwCtrl, BOOL enabled, filter_e defaultAction); +extern int whal_hwCtrl_setRxDataFilter (HwCtrl_T *pHwCtrl, UINT8 index, UINT8 command, filter_e action, UINT8 numFieldPatterns, UINT8 lenFieldPatterns, UINT8 * fieldPatterns); +extern int whal_hwCtrl_StartScan (HwCtrl_T *pHwCtrl, ScanParameters_t* pScanVals,void* ScanCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_StartSPSScan (HwCtrl_T *pHwCtrl, ScheduledScanParameters_t* pScanVals, void* ScanCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_StopScan (HwCtrl_T *pHwCtrl, void *ScanCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_StopSPSScan (HwCtrl_T *pHwCtrl, void* ScanCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_GenCmd (HwCtrl_T *pHwCtrl, short CmdID, char* pBuf, UINT32 Length); +extern int whal_hwCtrl_EnableDataPath (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_EnableTx (HwCtrl_T *pHwCtrl, int channel); +extern int whal_hwCtrl_DisableTx (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_DisableDataPath (HwCtrl_T *pHwCtrl); +extern void whal_hwCtrl_Reset (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_PMConfig (HwCtrl_T *pHwCtrl, whalCtrl_powerMgmtConfig_t *pPMConfig); +extern int whal_hwCtrl_BcnBrcOptions (HwCtrl_T *pHwCtrl, whalCtrl_powerMgmtConfig_t *pPMConfig); +extern int whal_hwCtrl_wakeUpCondition (HwCtrl_T *pHwCtrl, whalCtrl_powerMgmtConfig_t *pPMConfig); +extern int whal_hwCtrl_SetEnergyDetection (HwCtrl_T *pHwCtrl, BOOL energyDetection); +extern int whal_hwCtrl_WepDefaultKeyAdd (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_WepDefaultKeyRemove (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_WepMappingKeyAdd (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_WepMappingKeyRemove (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_AesMappingKeyAdd (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_AesMappingKeyRemove (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_TkipMicMappingKeyAdd (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_TkipMicMappingKeyRemove (HwCtrl_T *pHwCtrl, securityKeys_t* aSecurityKey, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_TkipKeyEnable (HwCtrl_T *pHwCtrl, char* MACaddr, BOOL aKey0RxEnable, BOOL aKey0TxEnable); +extern int whal_hwCtrl_DefaultKeyIdSet (HwCtrl_T *pHwCtrl, UINT8 aKeyIdVal, void *CB_Func, TI_HANDLE CB_handle); +extern int whal_hwCtrl_DefaultKeyIdGet (HwCtrl_T *pHwCtrl, UINT8 *pKeyIdVal); +extern int whal_hwCtrl_SetBeaconFiltering (HwCtrl_T *pHwCtrl, UINT8 beaconFilteringStatus, UINT8 numOfBeaconsToBuffer); + +extern int whal_hwCtrl_SetBeaconFilterIETable(HwCtrl_T *pHwCtrl, UINT8* numberOfIEs, UINT8 * IETable, UINT8* IETableSize); + +extern int whal_hwCtrl_GetGroupAddressesTable (HwCtrl_T *pHwCtrl,UINT8* pisEnabled, UINT8* pnumGroupAddrs, macAddress_t *Group_addr); +extern int whal_hwCtrl_SetGroupAddressesTable (HwCtrl_T *pHwCtrl,UINT8 numGroupAddrs, macAddress_t *Group_addr, UINT8 isEnabled); +extern int whal_hwCtrl_SetRtsThreshold (HwCtrl_T *pHwCtrl,UINT16 RtsThreshold); +extern int whal_hwCtrl_SetarpIpAddressesTable(HwCtrl_T *pHwCtrl, IpAddress_t *IP_addr, UINT8 isEnabled , IPver_e IP_ver); +extern int whalCtrl_GetArpIpAddressesTable (HwCtrl_T *pHwCtrl, IpAddress_t *IP_addr, UINT8* pisEnabled , IPver_e* pIP_ver); +extern int whal_hwCtrl_SetarpIpFilterEnabled(HwCtrl_T *pHwCtrl, UINT8 isEnabled ) ; +extern void whal_hwCtrl_Stop (HwCtrl_T *pHwCtrl); +extern BOOL whal_hwCtrl_isElpSupported (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_AidSet (HwCtrl_T *pHwCtrl, UINT16 aAidVal); + +extern int whal_hwCtrl_SaveAntennaDiversityOptions (HwCtrl_T *pHwCtrl, + whalCtrl_antennaDiversityOptions_t* pAntennaDivresityOptions); +extern int whal_hwCtrl_CurrentAntennaDiversitySendCmd (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_SetTxAntenna (HwCtrl_T *pHwCtrl, UINT8 TxAntenna); +extern int whal_hwCtrl_GetTxAntenna (HwCtrl_T *pHwCtrl, UINT8* TxAntenna); +extern int whal_hwCtrl_SetRxAntenna (HwCtrl_T *pHwCtrl, UINT8 RxAntenna); +extern int whal_hwCtrl_GetRxAntenna (HwCtrl_T *pHwCtrl, UINT8* RxAntenna); + +extern int whal_hwCtrl_PowerMgmtOptionsPrint(HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_PowerMgmtConfigurationSet (HwCtrl_T *pHwCtrl, + whalCtrl_powerSaveParams_t* powerSaveParams); +/* whalCtrl_powerMgmtConfig_t *thePowerMgmtOptionsConfig);*/ +extern int whal_hwCtrl_switchChannel (HwCtrl_T *pHwCtrl, UINT8 channel); +extern int whal_hwCtrl_SetRegulatoryDomain (HwCtrl_T *pHwCtrl, radioBand_e radioBand); +extern int whal_hwCtrl_SetACIConfiguration (HwCtrl_T *pHwCtrl, UINT8 ACIMode, UINT8 inputCCA, UINT8 qualifiedCCA, + UINT8 stompForRx, UINT8 stompFortTx, UINT8 txCCA); +extern int whal_hwCtrl_CurrentAssociationIdGet (HwCtrl_T *pHwCtrl, UINT16 *pAidVal); + +extern int whal_HwCtrl_enableMboxAsyncMode (HwCtrl_T *pHwCtrl); +extern int whal_HwCtrl_resetMacRx (HwCtrl_T *pHwCtrl); +extern int whal_HwCtrl_LNAControl (HwCtrl_T *pHwCtrl, UINT8 LNAControlField); +extern int whal_hwCtrl_NoiseHistogramCmd (HwCtrl_T *pHwCtrl, whalCtrl_noiseHistogram_t* pNoiseHistParams); +extern int whal_hwCtrl_SwitchChannelCmd (HwCtrl_T *pHwCtrl, whalCtrl_switchChannelCmd_t* pSwitchChannelCmd); +extern int whal_hwCtrl_SwitchChannelCancelCmd (HwCtrl_T *pHwCtrl); + +extern int whal_hwCtrl_SetSNRParams(HwCtrl_T *pHwCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd) ; +extern int whal_hwCtrl_SetRSSIParams(HwCtrl_T *pHwCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd) ; +extern int whal_hwCtrl_SetMaxTxRetryParams(HwCtrl_T *pHwCtrl, whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +extern int whal_hwCtrl_SetBssLossTsfThresholdParams( HwCtrl_T *pHwCtrl,whalCtrl_roamingTriggerCmd_t* pRoamingTriggerCmd); +extern int whal_hwCtrl_GetAsynRSSI (HwCtrl_T *pHwCtrl,void *CB_Func, TI_HANDLE CB_handle, PUINT8 CB_Buf); + +extern int whal_hwCtrl_ClkRunEnableSet (HwCtrl_T *pHwCtrl, BOOL aClkRunEnable); + +extern int whal_hwCtrl_ArmClockSet (HwCtrl_T *pHwCtrl, UINT32 ArmClock); +extern int whal_hwCtrl_MacClockSet (HwCtrl_T *pHwCtrl, UINT32 MacClock); + +extern TI_HANDLE whal_hwCtrl_GetBusHandle(HwCtrl_T *pHwCtrl); +extern HwMboxConfig_T *whal_hwCtrl_GetMboxConfig(HwCtrl_T *pHwCtrl); +extern HwMboxCmd_T *whal_hwCtrl_GetMboxCmd(HwCtrl_T *pHwCtrl); + +extern int whal_hwCtrl_getTsf(HwCtrl_T *pHwCtrl, UINT32 *pTsf); + +extern int whal_hwCtrl_SetSlotTime (HwCtrl_T *pHwCtrl, slotTime_e SlotTimeVal); +extern int whal_hwCtrl_SetPreamble (HwCtrl_T *pHwCtrl, Preamble_e preambleVal); +int whal_hwCtrl_SetFrameRate(HwCtrl_T *pHwCtrl, + UINT8 txCtrlFrmRateVal, + UINT8 txCtrlFrmModVal, + UINT8 txMgmtFrmRateVal, + UINT8 txMgmtFrmModVal); +extern int whal_hwCtrl_EncDecrSet (HwCtrl_T *pHwCtrl, BOOL aHwEncEnable, BOOL aHwDecEnable); +extern int whal_hwCtrl_RxMsduFormatSet(HwCtrl_T *pHwCtrl, BOOL aRxMsduForamtEnable); +extern int whal_hwCtrl_PacketDetectionThreshold (TI_HANDLE hHwCtrl, UINT8* pPdThreshold); +extern int whal_hwCtrl_FwDisconnect(HwCtrl_T *pHwCtrl, uint32 ConfigOptions, uint32 FilterOptions); +extern int whal_hwCtrl_MinPowerLevelSet (HwCtrl_T *pHwCtrl, powerAutho_PowerPolicy_e minPowerLevel); + +extern int whal_hwCtrl_SoftGeminiEnable(HwCtrl_T *pHwCtrl,SoftGeminiEnableModes_e SgEnable); +extern int whal_hwCtrl_SetSoftGeminiParams(HwCtrl_T *pHwCtrl,SoftGeminiParam_t *SgParam); +int whal_hwCtrl_GetSoftGeminiParams (HwCtrl_T *pHwCtrl, void *CB_Func, TI_HANDLE CB_handle, void* CB_Buf); +extern int whal_hwCtrl_TxRatePolicy(TI_HANDLE hHwCtrl,txRatePolicy_t *pTxRatePolicy); +extern txRatePolicy_t* whal_hwCtrl_GetTxRatePolicy(TI_HANDLE hHwCtrl); +extern int whal_hwCtrl_ReJoinBss (TI_HANDLE hHwCtrl); +int whal_hwCtrl_setBetParams(HwCtrl_T * pHwCtrl, UINT8 Enable, UINT8 MaximumConsecutiveET); + +/* + * WME TX API + */ +extern int whal_hwCtrl_TrafficConf(TI_HANDLE hHwCtrl, queueTrafficParams_t *pQtrafficParams); +extern int whal_hwCtrl_AcParamsConf(TI_HANDLE hHwCtrl,configureCmdCBParams_t *pConfigureCommand); +extern int whal_hwCtrl_QueueConf(TI_HANDLE hHwCtrl, acQueuesParams_t* pAcQueuesParams); + +#if 0 +extern int whal_hwCtrl_TrafficConf (TI_HANDLE hHwCtrl, whaCtrl_acTrafficParams_t* pAcTrafficParams); +extern int whal_hwCtrl_TxConfigOptions (TI_HANDLE hHwCtrl); +#endif + +/* Measurement */ +extern int whal_hwCtrl_measurement (HwCtrl_T *pHwCtrl, whalCtrl_MeasurementParameters_t* pMeasurementParams, + void* MeasureCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_measurementStop (HwCtrl_T *pHwCtrl, void* MeasureCommandResponseCB, TI_HANDLE CB_handle); +extern int whal_hwCtrl_ApDiscovery (HwCtrl_T *pHwCtrl, whalCtrl_ApDiscoveryParameters_t* pMeasurementParams); +extern int whal_hwCtrl_ApDiscoveryStop (HwCtrl_T *pHwCtrl); +extern int whal_hwCtrl_healthCheck (HwCtrl_T *pHwCtrl); + + +/* +PowerMgmtOption enum +*/ +typedef enum +{ + /* beacon/dtim/listen interval */ + POWER_MGMT_OPTIONS_WAKEUP_ON_ALL_BEACONS_VAL = 0x0, + + POWER_MGMT_OPTIONS_WAKEUP_ON_ALL_DITMS_VAL = 0x1, + + POWER_MGMT_OPTIONS_WAKEUP_ON_EVERY_LISTEN_INTERVAL_VAL = 0x2, + + POWER_MGMT_OPTIONS_WAKEUP_ON_N_DITM_VAL = 0x5, + + POWER_MGMT_OPTIONS_WAKEUP_ON_MASK = 0x7, + + /* gpio/wake on host */ + POWER_MGMT_OPTIONS_WAKEUP_ON_GPIO_OFFSET = 6, + + POWER_MGMT_OPTIONS_WAKEUP_ON_GPIO_VAL = 1<