diff --git a/Makefile b/Makefile index 7c1122a..c53ae39 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ CONFIG_TDLS = n CONFIG_WIFI_MONITOR = n ######################## Wake On Lan ########################## CONFIG_WOWLAN = n -CONFIG_GPIO_WAKEUP = n +CONFIG_GPIO_WAKEUP = y CONFIG_WAKEUP_GPIO_IDX = default CONFIG_HIGH_ACTIVE = n CONFIG_PNO_SUPPORT = n diff --git a/os_dep/linux/sdio_intf.c b/os_dep/linux/sdio_intf.c index f91d27e..16d8928 100644 --- a/os_dep/linux/sdio_intf.c +++ b/os_dep/linux/sdio_intf.c @@ -36,6 +36,9 @@ static int wlan_en_gpio = -1; #endif //CONFIG_PLATFORM_INTEL_BYT +#include +#include + #ifndef dev_to_sdio_func #define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev) #endif @@ -654,6 +657,10 @@ static int rtw_drv_init( PADAPTER if1 = NULL, if2 = NULL; struct dvobj_priv *dvobj; +#ifdef CONFIG_OF + struct device_node *np; +#endif + #ifdef CONFIG_PLATFORM_INTEL_BYT #ifdef CONFIG_ACPI @@ -690,6 +697,15 @@ static int rtw_drv_init( #endif #endif //CONFIG_PLATFORM_INTEL_BYT +#if defined(CONFIG_OF) + np = func->dev.of_node; + if (np) { + /* make sure there are interrupts defined in the node */ + if (of_find_property(np, "interrupts", NULL)) { + oob_irq = irq_of_parse_and_map(np, 0); + } + } +#endif RT_TRACE(_module_hci_intfs_c_, _drv_info_, ("+rtw_drv_init: vendor=0x%04x device=0x%04x class=0x%02x\n",