diff --git a/config/boards/bananapim2plus.conf b/config/boards/bananapim2plus.conf index 27dcf4513..6bf386929 100644 --- a/config/boards/bananapim2plus.conf +++ b/config/boards/bananapim2plus.conf @@ -2,7 +2,7 @@ BOARD_NAME="Banana Pi M2+" LINUXFAMILY=sun8i BOOTCONFIG=Sinovoip_BPI_M2_plus_defconfig -MODULES="#gpio-sunxi #w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp bcmdhd" +MODULES="#gpio-sunxi #w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp" MODULES_NEXT="brcmfmac" CPUMIN=240000 CPUMAX=1200000 diff --git a/config/kernel/linux-sun8i-default.config b/config/kernel/linux-sun8i-default.config index b10934a60..3ce83a3f7 100644 --- a/config/kernel/linux-sun8i-default.config +++ b/config/kernel/linux-sun8i-default.config @@ -1529,7 +1529,8 @@ CONFIG_ATH6KL_USB=m CONFIG_BCMDHD=m CONFIG_BCMDHD_FW_PATH="/lib/firmware/ap6212/fw_bcmdhd.bin" CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/ap6212/nvram.txt" -CONFIG_BCMDHD_CONFIG_PATH="/lib/firmware/ap6212/config.txt" +CONFIG_BCMDHD_DISABLE_WOWLAN=y +CONFIG_BCMDHD_SDIO=y CONFIG_BCMDHD_OOB=y # CONFIG_BCMDHD_SDIO_IRQ is not set CONFIG_BRCMUTIL=m diff --git a/patch/kernel/sun8i-default/linux-202-bcmdhd-add-wow-selection.patch b/patch/kernel/sun8i-default/linux-202-bcmdhd-add-wow-selection.patch new file mode 100644 index 000000000..66268f36c --- /dev/null +++ b/patch/kernel/sun8i-default/linux-202-bcmdhd-add-wow-selection.patch @@ -0,0 +1,16 @@ +diff -Nur a/drivers/net/wireless/bcmdhd/Kconfig b/drivers/net/wireless/bcmdhd/Kconfig +--- a/drivers/net/wireless/bcmdhd/Kconfig 2016-09-30 19:30:00.000000000 +0200 ++++ b/drivers/net/wireless/bcmdhd/Kconfig 2016-10-02 10:52:10.220177127 +0200 +@@ -26,6 +26,12 @@ + help + Enables WEXT support + ++config BCMDHD_DISABLE_WOWLAN ++ bool "Disable Wake on WLAN" ++ depends on BCMDHD ++ help ++ Disables Wake on WLAN ++ + choice + prompt "Enable Chip Interface" + depends on BCMDHD diff --git a/patch/kernel/sun8i-default/linux-203-rf_pm-auto-power-on.patch b/patch/kernel/sun8i-default/linux-203-rf_pm-auto-power-on.patch new file mode 100644 index 000000000..af991cf9a --- /dev/null +++ b/patch/kernel/sun8i-default/linux-203-rf_pm-auto-power-on.patch @@ -0,0 +1,67 @@ +diff -Nur a/drivers/misc/rf_pm/wifi_pm.c b/drivers/misc/rf_pm/wifi_pm.c +--- a/drivers/misc/rf_pm/wifi_pm.c 2016-06-09 19:33:23.000000000 +0200 ++++ b/drivers/misc/rf_pm/wifi_pm.c 2016-10-02 18:43:35.001633433 +0200 +@@ -73,18 +73,6 @@ + } + EXPORT_SYMBOL(wifi_pm_gpio_ctrl); + +-#ifdef CONFIG_PROC_FS +-static int wifi_pm_power_stat(char *page, char **start, off_t off, int count, int *eof, void *data) +-{ +- char *p = page; +- +-#if defined(CONFIG_ARCH_SUN8IW7P1) +- p += sprintf(p, "%s", wl_info.wl_power_state ? "0" : "1"); +-#else +- p += sprintf(p, "%s", wl_info.wl_power_state ? "1" : "0"); +-#endif +- return p - page; +-} + static void scan_device(int onoff) + { + int sdc_id = -1; +@@ -123,16 +111,31 @@ + } + } + +-static int wifi_pm_power_ctrl(struct file *file, const char __user *buffer, unsigned long count, void *data) ++static void wifi_power_ctrl(int power) + { +- int power = simple_strtoul(buffer, NULL, 10); +- power = power ? 1 : 0; +- + wifi_pm_power(power); + mdelay(100); +- + scan_device(power); + mdelay(100); ++} ++ ++#ifdef CONFIG_PROC_FS ++static int wifi_pm_power_stat(char *page, char **start, off_t off, int count, int *eof, void *data) ++{ ++ char *p = page; ++ ++#if defined(CONFIG_ARCH_SUN8IW7P1) ++ p += sprintf(p, "%s", wl_info.wl_power_state ? "0" : "1"); ++#else ++ p += sprintf(p, "%s", wl_info.wl_power_state ? "1" : "0"); ++#endif ++ return p - page; ++} ++ ++static int wifi_pm_power_ctrl(struct file *file, const char __user *buffer, unsigned long count, void *data) ++{ ++ int power = simple_strtoul(buffer, NULL, 10); ++ wifi_power_ctrl(power ? 1 : 0); + + return sizeof(power); + } +@@ -264,6 +267,7 @@ + static int __devinit wifi_pm_probe(struct platform_device *pdev) + { + awwifi_procfs_attach(); ++ wifi_power_ctrl(1); + wifi_pm_msg("wifi gpio init is OK !!\n"); + return 0; + }