drivers: mediatek: connectivity: Various changes
connectivity: Add an option to build wlan driver in kernel connectivity: bt: Allow platform to be overridden when building inline connectivity: gen4m: Fix built-in config detection connectivity: bt: Don't define module init/exit if built-in to kernel connectivity: {connfem,gps}: Build modules into kernel connectivity: Remove autoconf checks drivers: misc/mediatek: connectivity: wlan-gen4m: Change logging levels drivers: misc/mtk: connectivity-wlan: Queue delayed work on power efficient wq connectivity: mtk-conninfra: Use g_evt_ctx pointer to avoid errors
This commit is contained in:
parent
4218ce9996
commit
437ee1b02a
|
@ -457,3 +457,11 @@ config MTK_CONNSYS_DEDICATED_LOG_PATH
|
|||
from connsys (by EMI or other specific path)
|
||||
2. The scope may include (but not limited) Wi-Fi firmware log,
|
||||
BT firmware log, GPS firmware log etc.
|
||||
|
||||
config WLAN_DRV_BUILD_IN
|
||||
bool "Build Wlan module in kernel"
|
||||
help
|
||||
This will build the wlan driver and the corresponding componenets
|
||||
into the kernel.
|
||||
If unsure say n
|
||||
|
||||
|
|
|
@ -18,16 +18,6 @@ endif
|
|||
# Force build fail on modpost warning
|
||||
KBUILD_MODPOST_FAIL_ON_WARNINGS := y
|
||||
|
||||
# platform
|
||||
|
||||
ifeq ($(CONFIG_WLAN_DRV_BUILD_IN),y)
|
||||
$(info build-in mode!)
|
||||
$(info _MTK_BT_CHIP = $(_MTK_BT_CHIP))
|
||||
# _MTK_BT_CHIP comes from conninfra setting
|
||||
BT_PLATFORM = $(patsubst MTK_CONSYS_MT%,%,$(strip $(_MTK_BT_CHIP)))
|
||||
endif
|
||||
|
||||
|
||||
$(info $(LOG_TAG) TARGET_BUILD_VARIANT = $(TARGET_BUILD_VARIANT))
|
||||
ifeq ("$(TARGET_BUILD_VARIANT)","user")
|
||||
ccflags-y += -D FW_LOG_DEFAULT_ON=0
|
||||
|
|
|
@ -4137,8 +4137,10 @@ void __exit main_driver_exit(void)
|
|||
main_exit();
|
||||
}
|
||||
|
||||
#ifndef MTK_WCN_REMOVE_KERNEL_MODULE
|
||||
module_init(main_driver_init);
|
||||
module_exit(main_driver_exit);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Module Common Information
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
|
||||
struct work_struct rst_worker;
|
||||
struct msg_thread_ctx g_ctx;
|
||||
struct msg_thread_ctx g_evt_ctx;
|
||||
|
||||
typedef enum {
|
||||
INFRA_TEST_OPID_1 = 0,
|
||||
|
@ -108,10 +108,10 @@ int opfunc_test_2(struct msg_op_data *op)
|
|||
|
||||
static void msg_thrd_handler(struct work_struct *work)
|
||||
{
|
||||
msg_thread_send_1(&g_ctx, INFRA_TEST_OPID_2, 2011);
|
||||
msg_thread_send_1(&g_evt_ctx, INFRA_TEST_OPID_2, 2011);
|
||||
osal_sleep_ms(5);
|
||||
msg_thread_send_wait_1(&g_ctx, INFRA_TEST_OPID_2, 0, 2022);
|
||||
msg_thread_send_wait_1(&g_ctx, INFRA_TEST_OPID_2, 0, 2033);
|
||||
msg_thread_send_wait_1(&g_evt_ctx, INFRA_TEST_OPID_2, 0, 2022);
|
||||
msg_thread_send_wait_1(&g_evt_ctx, INFRA_TEST_OPID_2, 0, 2033);
|
||||
}
|
||||
|
||||
int msg_evt_test(void)
|
||||
|
@ -120,7 +120,7 @@ int msg_evt_test(void)
|
|||
|
||||
INIT_WORK(&rst_worker, msg_thrd_handler);
|
||||
|
||||
ret = msg_thread_init(&g_ctx, "TestThread",
|
||||
ret = msg_thread_init(&g_evt_ctx, "TestThread",
|
||||
test_op_func, INFRA_TEST_OPID_MAX);
|
||||
if (ret) {
|
||||
pr_err("inti msg_thread fail ret=[%d]\n", ret);
|
||||
|
@ -129,20 +129,20 @@ int msg_evt_test(void)
|
|||
|
||||
schedule_work(&rst_worker);
|
||||
|
||||
msg_thread_send_wait_1(&g_ctx, INFRA_TEST_OPID_2, 0, 1011);
|
||||
msg_thread_send_wait_1(&g_evt_ctx, INFRA_TEST_OPID_2, 0, 1011);
|
||||
//osal_sleep_ms(10);
|
||||
msg_thread_send_1(&g_ctx, INFRA_TEST_OPID_2, 1022);
|
||||
msg_thread_send_1(&g_evt_ctx, INFRA_TEST_OPID_2, 1022);
|
||||
osal_sleep_ms(10);
|
||||
msg_thread_send_wait_1(&g_ctx, INFRA_TEST_OPID_2, 0, 1033);
|
||||
msg_thread_send_wait_1(&g_evt_ctx, INFRA_TEST_OPID_2, 0, 1033);
|
||||
|
||||
osal_sleep_ms(1000);
|
||||
|
||||
pr_info("<<<<<>>>>>>> freeOpq=[%u][%u] ActiveQ=[%u][%u]",
|
||||
g_ctx.free_op_q.write, g_ctx.free_op_q.read,
|
||||
g_ctx.active_op_q.write, g_ctx.active_op_q.read);
|
||||
g_evt_ctx.free_op_q.write, g_evt_ctx.free_op_q.read,
|
||||
g_evt_ctx.active_op_q.write, g_evt_ctx.active_op_q.read);
|
||||
osal_sleep_ms(500);
|
||||
|
||||
ret = msg_thread_deinit(&g_ctx);
|
||||
ret = msg_thread_deinit(&g_evt_ctx);
|
||||
pr_info("[%s] msg_thread_deinit\n", __func__);
|
||||
|
||||
pr_info("[%s] test PASS\n", __func__);
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
$(warning build in gps_dl)
|
||||
ifeq ($(CONFIG_MTK_GPS_SUPPORT), y)
|
||||
|
||||
ifeq ($(AUTOCONF_H),)
|
||||
$(error AUTOCONF_H is not defined)
|
||||
endif
|
||||
|
||||
ccflags-y += -imacros $(AUTOCONF_H)
|
||||
ifndef TOP
|
||||
TOP := $(srctree)/..
|
||||
endif
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
$(warning build in gps_dl)
|
||||
ifeq ($(CONFIG_MTK_GPS_SUPPORT), y)
|
||||
|
||||
ifeq ($(AUTOCONF_H),)
|
||||
$(error AUTOCONF_H is not defined)
|
||||
endif
|
||||
|
||||
ccflags-y += -imacros $(AUTOCONF_H)
|
||||
ifndef TOP
|
||||
TOP := $(srctree)/..
|
||||
endif
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
$(warning build in gps_dl)
|
||||
ifeq ($(CONFIG_MTK_GPS_SUPPORT), y)
|
||||
|
||||
ifeq ($(AUTOCONF_H),)
|
||||
$(error AUTOCONF_H is not defined)
|
||||
endif
|
||||
|
||||
ccflags-y += -imacros $(AUTOCONF_H)
|
||||
ifndef TOP
|
||||
TOP := $(srctree)/..
|
||||
endif
|
||||
|
|
|
@ -14,11 +14,6 @@
|
|||
$(warning build in gps_dl)
|
||||
ifeq ($(CONFIG_MTK_GPS_SUPPORT), y)
|
||||
|
||||
ifeq ($(AUTOCONF_H),)
|
||||
$(error AUTOCONF_H is not defined)
|
||||
endif
|
||||
|
||||
ccflags-y += -imacros $(AUTOCONF_H)
|
||||
ifndef TOP
|
||||
TOP := $(srctree)/..
|
||||
endif
|
||||
|
|
|
@ -13,11 +13,6 @@
|
|||
# Necessary Check
|
||||
ifeq ($(CONFIG_MTK_GPS_SUPPORT), y)
|
||||
|
||||
ifeq ($(AUTOCONF_H),)
|
||||
$(error AUTOCONF_H is not defined)
|
||||
endif
|
||||
|
||||
ccflags-y += -imacros $(AUTOCONF_H)
|
||||
ifndef TOP
|
||||
TOP := $(srctree)/..
|
||||
endif
|
||||
|
|
|
@ -403,7 +403,7 @@ else
|
|||
ccflags-y += -DCFG_WIFI_IP_SET=1
|
||||
endif
|
||||
|
||||
ifneq ($(filter MTK_WCN_REMOVE_KERNEL_MODULE,$(KBUILD_SUBDIR_CCFLAGS)),)
|
||||
ifeq ($(CONFIG_WLAN_DRV_BUILD_IN),y)
|
||||
ccflags-y += -DCFG_BUILT_IN_DRIVER=1
|
||||
else
|
||||
ccflags-y += -DCFG_BUILT_IN_DRIVER=0
|
||||
|
|
|
@ -110,14 +110,14 @@ extern uint32_t get_wifi_standalone_log_mode(void);
|
|||
#define DBG_CLASS_MASK BITS(0, 7)
|
||||
|
||||
#define DBG_LOG_LEVEL_DEFAULT \
|
||||
(DBG_CLASS_ERROR | \
|
||||
(DBG_CLASS_ERROR)
|
||||
#define DBG_LOG_LEVEL_MORE \
|
||||
(DBG_LOG_LEVEL_DEFAULT | \
|
||||
DBG_CLASS_TRACE | \
|
||||
DBG_CLASS_WARN | \
|
||||
DBG_CLASS_STATE | \
|
||||
DBG_CLASS_EVENT | \
|
||||
DBG_CLASS_INFO)
|
||||
#define DBG_LOG_LEVEL_MORE \
|
||||
(DBG_LOG_LEVEL_DEFAULT | \
|
||||
DBG_CLASS_TRACE)
|
||||
#define DBG_LOG_LEVEL_EXTREME \
|
||||
(DBG_LOG_LEVEL_MORE | \
|
||||
DBG_CLASS_LOUD)
|
||||
|
|
|
@ -1921,7 +1921,7 @@ static void wlanSetMulticastList(struct net_device *prDev)
|
|||
DBGLOG(INIT, TRACE, "flags: 0x%x\n", prDev->flags);
|
||||
prDev->flags |= (IFF_MULTICAST | IFF_ALLMULTI);
|
||||
gPrDev = prDev;
|
||||
schedule_delayed_work(&workq, 0);
|
||||
queue_delayed_work(system_power_efficient_wq, &workq, 0);
|
||||
}
|
||||
|
||||
/* FIXME: Since we cannot sleep in the wlanSetMulticastList, we arrange
|
||||
|
|
Loading…
Reference in a new issue