-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ti wlan and ap kernel modules
- Loading branch information
1 parent
f0afce1
commit 844b57e
Showing
933 changed files
with
391,716 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
unified wilink 1271/1273 drivers for SEMC devices | ||
|
||
|
||
i set an shitch depending on kernel version | ||
if version < 2.6.30 drivers will be built for board delta | ||
|
||
otherwise for board mogami | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Do not build unless BoardConfig define BOARD_SOFTAP_DEVICE. | ||
ifdef BOARD_SOFTAP_DEVICEE | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
SRC_MAIN := platforms/os/linux | ||
SAVED_LOCAL_PATH_AP := $(LOCAL_PATH) | ||
# build the apps | ||
|
||
include $(call all-subdir-makefiles) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
# now the part that is actually built | ||
|
||
ifneq ($(TARGET_BOARD_PLATFORM),) | ||
|
||
LOCAL_PATH_ABS_AP := $(shell cd $(SAVED_LOCAL_PATH_AP) && pwd) | ||
|
||
BUILD_ROOT_AP := $(TARGET_OUT_INTERMEDIATES)/WILINK_AP_OBJ | ||
SEC_CUSTOM := $(ANDROID_PRODUCT_OUT)/obj/WILINK_AP_OBJ/$(SRC_MAIN)/sec_custom.mk | ||
|
||
BUILD_SUBDIRS_AP := $(shell cd $(SAVED_LOCAL_PATH_AP) && find . -type d) | ||
BUILD_SRC_AP := $(shell cd $(SAVED_LOCAL_PATH_AP) && find . -name \*[ch]) | ||
BUILD_MK_AP := $(shell cd $(SAVED_LOCAL_PATH_AP) && find . -name Makefile) | ||
BUILD_SEC_CUSTOM_AP := $(shell cd $(SAVED_LOCAL_PATH_AP) && find . -name sec_custom.mk) | ||
|
||
REL_SUBDIRS_AP := $(addprefix $(SAVED_LOCAL_PATH_AP)/, $(BUILD_SUBDIRS_AP)) | ||
REL_SRC_AP := $(addprefix $(SAVED_LOCAL_PATH_AP)/, $(BUILD_SRC_AP)) | ||
REL_MK_AP := $(addprefix $(SAVED_LOCAL_PATH_AP)/, $(BUILD_MK_AP)) | ||
REL_SEC_CUSTOM_AP := $(addprefix $(SAVED_LOCAL_PATH_AP)/, $(BUILD_SEC_CUSTOM_AP)) | ||
|
||
SOURCE_SCRIPT_AP := msm_env.bash | ||
|
||
$(BUILD_ROOT_AP)/$(SRC_MAIN)/tiap_drv.ko: $(INSTALLED_KERNEL_TARGET) prep_ap | ||
@(cd $(BUILD_ROOT_AP)/$(SRC_MAIN); source $(SOURCE_SCRIPT_AP); $(MAKE) -f $(SEC_CUSTOM)) | ||
|
||
prep_ap: subdirs_ap src_ap mk_ap sec_custom_ap | ||
|
||
subdirs_ap: $(REL_SUBDIRS_AP) | ||
@(for i in $(BUILD_SUBDIRS_AP); do mkdir -p $(BUILD_ROOT_AP)/$$i; done) | ||
|
||
src_ap: $(REL_SRC_AP) subdirs_ap | ||
@(for i in $(BUILD_SRC_AP); do test -e $(BUILD_ROOT_AP)/$$i || ln -sf $(LOCAL_PATH_ABS_AP)/$$i $(BUILD_ROOT_AP)/$$i; done) | ||
|
||
mk_ap: $(REL_MK_AP) subdirs_ap | ||
@(for i in $(BUILD_MK_AP); do test -e $(BUILD_ROOT_AP)/$$i || ln -sf $(LOCAL_PATH_ABS_AP)/$$i $(BUILD_ROOT_AP)/$$i; done) | ||
|
||
sec_custom_ap: $(REL_SEC_CUSTOM_AP) subdirs_ap | ||
@(for i in $(BUILD_SEC_CUSTOM_AP); do test -e $(BUILD_ROOT_AP)/$$i || ln -sf $(LOCAL_PATH_ABS_AP)/$$i $(BUILD_ROOT_AP)/$$i; done) | ||
|
||
# copy the modules | ||
|
||
files := tiap_drv.ko | ||
|
||
copy_to := $(addprefix $(TARGET_OUT)/lib/modules/,$(files)) | ||
copy_from := $(addprefix $(BUILD_ROOT_AP)/$(SRC_MAIN)/,$(files)) | ||
|
||
$(TARGET_OUT)/lib/modules/%.ko : $(BUILD_ROOT_AP)/$(SRC_MAIN)/%.ko | $(ACP) | ||
$(transform-prebuilt-to-target) | ||
|
||
ALL_PREBUILT += $(copy_to) | ||
|
||
endif # ifneq ($(TARGET_BOARD_PLATFORM),) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(call all-subdir-makefiles) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
LOCAL_PATH:= $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
STATIC_LIB ?= y | ||
DEBUG ?= y | ||
WPA_ENTERPRISE ?= y | ||
CONFIG_WPS = n | ||
CONFIG_GEM = n | ||
|
||
TI_HOSTAPD_LIB ?= y | ||
|
||
WILINK_ROOT = ../.. | ||
CUDK_ROOT ?= $(WILINK_ROOT)/CUDK | ||
CU_ROOT = $(CUDK_ROOT)/configurationutility | ||
|
||
ifeq ($(DEBUG),y) | ||
DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin # "-O" is needed to expand inlines | ||
# DEBUGFLAGS+= -DDEBUG_MESSAGES | ||
else | ||
DEBUGFLAGS = -O2 | ||
endif | ||
|
||
DEBUGFLAGS+= -DHOST_COMPILE | ||
|
||
|
||
AP_DEFINES = | ||
ifeq ($(WPA_ENTERPRISE), y) | ||
AP_DEFINES += -D WPA_ENTERPRISE | ||
endif | ||
|
||
ifeq ($(TI_HOSTAPD_LIB), y) | ||
AP_DEFINES += -D TI_HOSTAPD_CLI_LIB | ||
endif | ||
|
||
ARMFLAGS = -fno-common -g #-fno-builtin -Wall #-pipe | ||
|
||
LOCAL_C_INCLUDES = \ | ||
$(LOCAL_PATH)/inc \ | ||
$(LOCAL_PATH)/$(CUDK_ROOT)/os/linux/inc \ | ||
$(LOCAL_PATH)/$(CUDK_ROOT)/os/common/inc \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/utils \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \ | ||
$(LOCAL_PATH)/$(KERNEL_DIR)/include \ | ||
$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc | ||
|
||
LOCAL_SRC_FILES:= \ | ||
src/console.c \ | ||
src/cu_common.c \ | ||
src/cu_cmd.c \ | ||
src/ticon.c \ | ||
src/cu_hostapd.c \ | ||
src/wpa_core.c | ||
|
||
LOCAL_CFLAGS+= -Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(AP_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -DDRV_NAME='"tiwlan"' | ||
|
||
LOCAL_CFLAGS += $(ARMFLAGS) | ||
|
||
LOCAL_LDLIBS += -lpthread | ||
|
||
LOCAL_STATIC_LIBRARIES := \ | ||
libtiOsLibAP | ||
|
||
ifeq ($(TI_HOSTAPD_LIB), y) | ||
LOCAL_STATIC_LIBRARIES += libhostapdcli | ||
endif | ||
|
||
LOCAL_MODULE:= tiap_cu | ||
LOCAL_MODULE_TAGS:= eng | ||
|
||
include $(BUILD_EXECUTABLE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* | ||
* console.h | ||
* | ||
* Copyright 2001-2010 Texas Instruments, Inc. - http://www.ti.com/ | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** \file console.h | ||
* \brief Console (CLI) API | ||
* | ||
* \see console.c, ticon.c | ||
*/ | ||
|
||
#ifndef _CONSOLE_H_ | ||
#define _CONSOLE_H_ | ||
|
||
/* defines */ | ||
/***********/ | ||
/* parameter flags */ | ||
#define CON_PARM_OPTIONAL 0x01 /* Parameter is optional */ | ||
#define CON_PARM_DEFVAL 0x02 /* Default value is set */ | ||
#define CON_PARM_RANGE 0x04 /* Range is set */ | ||
#define CON_PARM_STRING 0x08 /* String parm */ | ||
#define CON_PARM_LINE 0x10 /* String from the current parser position till EOL */ | ||
#define CON_PARM_SIGN 0x20 /* Signed param */ | ||
#define CON_PARM_NOVAL 0x80 /* Internal flag: parameter is anassigned */ | ||
#define CON_LAST_PARM { NULL, 0, 0, 0, 0 } | ||
|
||
#define CONSOLE_TERMINAL_MODULE_ID (0) | ||
#define CONSOLE_LOGGER_MODULE_ID (1) | ||
#define CONSOLE_WIPP_MODULE_ID (2) | ||
#define CONSOLE_G_TESTER_MODULE_ID (3) | ||
#define CONSOLE_NUMBER_OF_MODULES (4) | ||
|
||
|
||
/* types */ | ||
/*********/ | ||
typedef enum { | ||
E_OK = 0, | ||
E_BADPARM, | ||
E_TOOMANY, | ||
E_NOMEMORY, | ||
E_NOT_FOUND, | ||
E_EXISTS, | ||
E_DUMMY, | ||
E_ERROR | ||
} consoleErr; | ||
|
||
typedef struct ConParm_t { | ||
PS8 name; /* Parameter name. Shouldn't be allocated on stack! */ | ||
U8 flags; /* Combination of CON_PARM_??? flags */ | ||
U32 low_val; /* Low val for range checking */ | ||
U32 hi_val; /* Hi val for range checking/max length of string */ | ||
U32 value; /* Value/address of string parameter */ | ||
} ConParm_t; | ||
|
||
|
||
typedef void (*FuncToken_t)(THandle hCuCmd, ConParm_t parm[], U16 nParms); | ||
|
||
|
||
/* functions */ | ||
/*************/ | ||
THandle Console_Create(const PS8 device_name, S32 BypassSupplicant, PS8 pSupplIfFile); | ||
VOID Console_Destroy(THandle hConsole); | ||
VOID Console_GetDeviceStatus(THandle hConsole); | ||
VOID Console_Start(THandle hConsole); | ||
VOID Console_Stop(THandle hConsole); | ||
THandle Console_AddDirExt( THandle hConsole, | ||
THandle hRoot, | ||
const PS8 name, | ||
const PS8 desc ); | ||
consoleErr Console_AddToken( THandle hConsole, | ||
THandle hDir, | ||
const PS8 name, | ||
const PS8 help, | ||
FuncToken_t p_func, | ||
ConParm_t p_parms[] ); | ||
|
||
#endif /* _CONSOLE_H_ */ | ||
|
Oops, something went wrong.