失效链接处理 |
RealTek wifi 驱动移植说明_V1.0 PDF 下载
本站整理下载:
相关截图:
主要内容:
1. 驱动修改说明:
1. 修改驱动入口函数
一般来说,RealTek 的驱动,只需修改适合 RK 平台的入口函数就可以正常运行了,以下
分别对 USB WIFI 和 SDIO WIFI 驱动需要修改的地方作说明。
Realtek USB WIFI 驱动入口函数统一都在 realtek_wifi_dirver/os_dep/linux/usb_intf.c 将
rtw_drv_entry 入口函数中修改成 RK 平台上统一的入口函数。
1.1 kernel 3.10 内核
针对 3.10 内核,统一修改 rockchip_wifi_init_module_rtkwifi,添加如下内容即可
#include "wifi_version.h" //移植 WIFI 驱动的版本号,放在驱动 os_dep/linux/wifi_version.c 目录
#include <linux/rfkill-wlan.h>
extern int get_wifi_chip_type(void);
int rockchip_wifi_init_module_rtkwifi(void)
{
#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
int type = get_wifi_chip_type();
if (type < WIFI_AP6XXX_SERIES || type == WIFI_ESP8089) return 0;
#endif
printk("\n");
printk("=======================================================\n");
printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Realtek 8723AU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n",
RTL8192_DRV_VERSION);
rockchip_wifi_power(1);
return rtw_drv_entry();
}
void rockchip_wifi_exit_module_rtkwifi(void)
{
#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
int type = get_wifi_chip_type();
if (type < WIFI_AP6XXX_SERIES || type == WIFI_ESP8089) return;
#endif
printk("\n");
printk("=======================================================\n");
printk("==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Realtek 8723AU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n",
RTL8192_DRV_VERSION);
rtw_drv_halt();
rockchip_wifi_power(0);
}
#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
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);
#endif
1.2 Kernel 3.0 内核修改 将 rtw_drv_entry 入口函数统一修改成函数名 rockchip_wifi_init_module,添加如下内容即可。
//module_init(rtw_drv_entry);
//module_exit(rtw_drv_halt);
#include "wifi_version.h"
extern int wifi_activate_usb(void);
extern int wifi_deactivate_usb(void);
int rockchip_wifi_init_module(void)
{
printk("\n");
printk("=======================================================\n");
printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Realtek 8723BU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n",
RTL8723BU_DRV_VERSION);
wifi_activate_usb();
return rtw_drv_entry();
}
void rockchip_wifi_exit_module(void)
{
printk("\n");
printk("=======================================================\n");
printk("==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\n");
printk("=======================================================\n");
printk("Realtek 8723BU USB WiFi driver (Powered by Rockchip,Ver %s) init.\n",
RTL8723BU_DRV_VERSION);
rtw_drv_halt();
wifi_deactivate_usb();
}
EXPORT_SYMBOL(rockchip_wifi_init_module);
EXPORT_SYMBOL(rockchip_wifi_exit_module);
//module_init(rtw_drv_entry);
//module_exit(rtw_drv_halt);
1.3 RealTek SDIO WIFI
|