From: Xu Xuehui Date: Tue, 7 Mar 2017 03:46:36 +0000 (+0800) Subject: net: wireless: rockchip_wlan: update realtek wifi support X-Git-Tag: firefly_0821_release~396 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8286a41a20fe9ff3842842ffc840440066ceeff2;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/drivers/net/wireless/rockchip_wlan/Kconfig b/drivers/net/wireless/rockchip_wlan/Kconfig index 672658ec29f9..89ed72953ad1 100644 --- a/drivers/net/wireless/rockchip_wlan/Kconfig +++ b/drivers/net/wireless/rockchip_wlan/Kconfig @@ -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 diff --git a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c index 1657b7b75b3e..e87b26cbc94a 100644 --- a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/usb_intf.c @@ -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); diff --git a/drivers/net/wireless/rockchip_wlan/rtl8188fu/Makefile b/drivers/net/wireless/rockchip_wlan/rtl8188fu/Makefile index 7a36426d41a8..40b92a839f71 100644 --- a/drivers/net/wireless/rockchip_wlan/rtl8188fu/Makefile +++ b/drivers/net/wireless/rockchip_wlan/rtl8188fu/Makefile @@ -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) diff --git a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/usb_intf.c index 64a507ead426..de91a282f0df 100644 --- a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/usb_intf.c @@ -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 diff --git a/drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.c b/drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.c index 91569407be83..19b4b4e1389c 100644 --- a/drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.c +++ b/drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.c @@ -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)