mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-25 06:34:10 +00:00
Reduce some firmware load
This commit is contained in:
parent
c92ad28251
commit
b17957a8ab
7
Makefile
7
Makefile
@ -49,9 +49,6 @@ CONFIG_RTL8723D = n
|
||||
CONFIG_RTL8821C = n
|
||||
######################### Interface ###########################
|
||||
CONFIG_USB_HCI = y
|
||||
CONFIG_PCI_HCI = n
|
||||
CONFIG_SDIO_HCI = n
|
||||
CONFIG_GSPI_HCI = n
|
||||
########################## Features ###########################
|
||||
CONFIG_NET_NS = y
|
||||
CONFIG_MP_INCLUDED = y
|
||||
@ -278,10 +275,6 @@ _HAL_INTFS_FILES := hal/hal_intf.o \
|
||||
hal/hal_hci/hal_$(HCI_NAME).o \
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
_BTC_FILES += hal/btc/halbtc8723bwifionly.o \
|
||||
hal/btc/halbtc8822bwifionly.o \
|
||||
|
@ -51,7 +51,6 @@
|
||||
#if (CONFIG_EMBEDDED_FWIMG==1)
|
||||
#define LOAD_FW_HEADER_FROM_DRIVER
|
||||
#endif
|
||||
/* #define CONFIG_FILE_FWIMG */
|
||||
|
||||
#define CONFIG_XMIT_ACK
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
|
@ -469,22 +469,6 @@ module_param(rtw_fw_iol, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_iol, "FW IOL. 0:Disable, 1:enable, 2:by usb speed");
|
||||
#endif /* CONFIG_IOL */
|
||||
|
||||
#ifdef CONFIG_FILE_FWIMG
|
||||
char *rtw_fw_file_path = "/system/etc/firmware/rtlwifi/FW_NIC.BIN";
|
||||
module_param(rtw_fw_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
|
||||
|
||||
char *rtw_fw_wow_file_path = "/system/etc/firmware/rtlwifi/FW_WoWLAN.BIN";
|
||||
module_param(rtw_fw_wow_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_wow_file_path, "The path of fw for Wake on Wireless image");
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
char *rtw_fw_mp_bt_file_path = "";
|
||||
module_param(rtw_fw_mp_bt_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_mp_bt_file_path, "The path of fw for MP-BT image");
|
||||
#endif /* CONFIG_MP_INCLUDED */
|
||||
#endif /* CONFIG_FILE_FWIMG */
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
module_param(rtw_mc2u_disable, int, 0644);
|
||||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#include <platform_ops.h>
|
||||
|
||||
#ifndef CONFIG_USB_HCI
|
||||
#error "CONFIG_USB_HCI shall be on!\n"
|
||||
#endif
|
||||
@ -1616,7 +1614,6 @@ static int __init rtw_drv_entry(void)
|
||||
RTW_PRINT(DRV_NAME" BT-Coex version = %s\n", BTCOEXVERSION);
|
||||
#endif /* BTCOEXVERSION */
|
||||
|
||||
ret = platform_wifi_power_on();
|
||||
if (ret != 0) {
|
||||
RTW_INFO("%s: power on failed!!(%d)\n", __FUNCTION__, ret);
|
||||
ret = -1;
|
||||
@ -1654,8 +1651,6 @@ static void __exit rtw_drv_halt(void)
|
||||
|
||||
usb_deregister(&usb_drv.usbdrv);
|
||||
|
||||
platform_wifi_power_off();
|
||||
|
||||
rtw_suspend_lock_uninit();
|
||||
rtw_ndev_notifier_unregister();
|
||||
rtw_inetaddr_notifier_unregister();
|
||||
|
@ -1,22 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#error "You have defined CONFIG_CUSTOMIZED_COUNTRY_CHPLAN_MAP to use a customized map of your own instead of the default one"
|
||||
#error "Before removing these error notifications, please make sure regulatory certification requirements of your target markets"
|
||||
|
||||
static const struct country_chplan CUSTOMIZED_country_chplan_map[] = {
|
||||
COUNTRY_CHPLAN_ENT("TW", 0x76, 1, 0x3FF), /* Taiwan */
|
||||
};
|
||||
|
@ -1,32 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef CONFIG_PLATFORM_OPS
|
||||
/*
|
||||
* Return:
|
||||
* 0: power on successfully
|
||||
* others: power on failed
|
||||
*/
|
||||
int platform_wifi_power_on(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void platform_wifi_power_off(void)
|
||||
{
|
||||
}
|
||||
#endif /* !CONFIG_PLATFORM_OPS */
|
@ -1,26 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __PLATFORM_OPS_H__
|
||||
#define __PLATFORM_OPS_H__
|
||||
|
||||
/*
|
||||
* Return:
|
||||
* 0: power on successfully
|
||||
* others: power on failed
|
||||
*/
|
||||
int platform_wifi_power_on(void);
|
||||
void platform_wifi_power_off(void);
|
||||
|
||||
#endif /* __PLATFORM_OPS_H__ */
|
@ -1,84 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#include <drv_types.h>
|
||||
|
||||
extern void sdhci_bus_scan(void);
|
||||
#ifndef ANDROID_2X
|
||||
extern int sdhci_device_attached(void);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return:
|
||||
* 0: power on successfully
|
||||
* others: power on failed
|
||||
*/
|
||||
int platform_wifi_power_on(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_POWER_ON);
|
||||
#endif /* CONFIG_RTL8188E */
|
||||
|
||||
/* Pull up pwd pin, make wifi leave power down mode. */
|
||||
rtw_wifi_gpio_init();
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_ON);
|
||||
|
||||
#if (MP_DRIVER == 1) && (defined(CONFIG_RTL8723A) || defined(CONFIG_RTL8723B))
|
||||
/* Pull up BT reset pin. */
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_BT_PWDN_ON);
|
||||
#endif
|
||||
rtw_mdelay_os(5);
|
||||
|
||||
sdhci_bus_scan();
|
||||
#ifdef CONFIG_RTL8723B
|
||||
/* YJ,test,130305 */
|
||||
rtw_mdelay_os(1000);
|
||||
#endif
|
||||
#ifdef ANDROID_2X
|
||||
rtw_mdelay_os(200);
|
||||
#else /* !ANDROID_2X */
|
||||
if (1) {
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i <= 50; i++) {
|
||||
msleep(10);
|
||||
if (sdhci_device_attached())
|
||||
break;
|
||||
printk("%s delay times:%d\n", __func__, i);
|
||||
}
|
||||
}
|
||||
#endif /* !ANDROID_2X */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void platform_wifi_power_off(void)
|
||||
{
|
||||
/* Pull down pwd pin, make wifi enter power down mode. */
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_OFF);
|
||||
rtw_mdelay_os(5);
|
||||
rtw_wifi_gpio_deinit();
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_POWER_OFF);
|
||||
#endif /* CONFIG_RTL8188E */
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if (mmc_host)
|
||||
mmc_host->pm_flags &= ~MMC_PM_KEEP_POWER;
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
}
|
Loading…
Reference in New Issue
Block a user