net: wireless: rockchip_wlan: update realtek wifi support

support wifi driver work as ko module or compile into kernel

1. wifi driver work as ko module, configs show as below:

CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=n
CONFIG_RTL8188EU = m and CONFIG_RTL8188FU = m

2. wifi driver compile into kernel, configs show as below:
ps: Only one Realtek driver can be compiled into the kernel
CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
CONFIG_RTL8188EU = y or CONFIG_RTL8188FU = y

Change-Id: I40e33a6f27597f9f90d9987d189b74fb637c40c1
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
This commit is contained in:
Xu Xuehui
2017-03-07 11:46:36 +08:00
committed by Huang, Tao
parent 266e09781e
commit 8286a41a20
5 changed files with 22 additions and 37 deletions

View File

@@ -7,7 +7,7 @@ if WL_ROCKCHIP
config WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
bool "Wifi load driver when kernel bootup"
default y
default n
---help---
Wifi driver will be load (use late_initcall) when kernel bootup
@@ -17,17 +17,8 @@ menuconfig RTL_WIRELESS_SOLUTION
bool "Realtek Wireless Device Driver Support"
default y
if RTL_WIRELESS_SOLUTION
choice
prompt "Realtek WiFi Device Driver Support"
default RTL8188EU
config RTL_WIFI_NONE
bool "No Realtek WiFi"
source "drivers/net/wireless/rockchip_wlan/rtl8188eu/Kconfig"
source "drivers/net/wireless/rockchip_wlan/rtl8188fu/Kconfig"
endchoice
endif # RTL_WIRELESS_SOLUTION
endif # WL_ROCKCHIP

View File

@@ -1696,8 +1696,8 @@ void rockchip_wifi_exit_module_rtkwifi(void)
late_initcall(rockchip_wifi_init_module_rtkwifi);
module_exit(rockchip_wifi_exit_module_rtkwifi);
#else
EXPORT_SYMBOL(rockchip_wifi_init_module_rtkwifi);
EXPORT_SYMBOL(rockchip_wifi_exit_module_rtkwifi);
module_init(rockchip_wifi_init_module_rtkwifi);
module_exit(rockchip_wifi_exit_module_rtkwifi);
#endif
//module_init(rtw_drv_entry);
//module_exit(rtw_drv_halt);

View File

@@ -1250,7 +1250,7 @@ EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
ARCH := arm
CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3188/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
KSRC := /home/android_sdk/Rockchip/Rk3188/kernel
MODULE_NAME := wlan
MODULE_NAME := 8188fu
endif
ifeq ($(CONFIG_PLATFORM_ARM_RK3066), y)

View File

@@ -1717,8 +1717,8 @@ void rockchip_wifi_exit_module(void)
late_initcall(rockchip_wifi_init_module_rtkwifi);
module_exit(rockchip_wifi_exit_module_rtkwifi);
#else
EXPORT_SYMBOL(rockchip_wifi_init_module_rtkwifi);
EXPORT_SYMBOL(rockchip_wifi_exit_module_rtkwifi);
module_init(rockchip_wifi_init_module_rtkwifi);
module_exit(rockchip_wifi_exit_module_rtkwifi);
#endif
#else
#ifdef CONFIG_ANDROID_4_2

View File

@@ -153,31 +153,25 @@ static int wifi_driver_insmod = 0;
static int wifi_init_exit_module(int enable)
{
int ret = 0;
int type = 0;
#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
int type = 0;
type = get_wifi_chip_type();
#else
type = get_wifi_chip_type();
//#ifdef CONFIG_RKWIFI
if (type < WIFI_AP6XXX_SERIES) {
if (enable > 0)
ret = rockchip_wifi_init_module_rkwifi();
else
rockchip_wifi_exit_module_rkwifi();
return ret;
}
//#endif
//#ifdef CONFIG_RTL_WIRELESS_SOLUTION
if (type < WIFI_RTL_SERIES) {
if (enable > 0)
ret = rockchip_wifi_init_module_rtkwifi();
else
rockchip_wifi_exit_module_rtkwifi();
return ret;
}
//#endif
if (enable > 0)
ret = rockchip_wifi_init_module_rkwifi();
else
rockchip_wifi_exit_module_rkwifi();
return ret;
}
if (type < WIFI_RTL_SERIES) {
if (enable > 0)
ret = rockchip_wifi_init_module_rtkwifi();
else
rockchip_wifi_exit_module_rtkwifi();
return ret;
}
#endif
return ret;
return ret;
}
static ssize_t wifi_driver_write(struct class *cls, struct class_attribute *attr, const char *_buf, size_t _count)