diff --git a/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9 b/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9 index 12c46b528..529c4c99d 100755 --- a/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9 +++ b/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9 @@ -914,6 +914,7 @@ CONFIG_NET_CORE=y # CONFIG_USB_NET_DRIVERS is not set CONFIG_WLAN=y CONFIG_XR806_WLAN=y +CONFIG_XR806_GET_WAKEUP_SRC=y # CONFIG_USB_NET_RNDIS_WLAN is not set # CONFIG_VIRT_WIFI is not set diff --git a/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9_recovery b/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9_recovery index a23400dd4..63c60cde1 100755 --- a/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9_recovery +++ b/device/config/chips/v851s/configs/fastboot_sl100_back/linux/config-4.9_recovery @@ -895,6 +895,7 @@ CONFIG_NET_CORE=y # CONFIG_USB_NET_DRIVERS is not set CONFIG_WLAN=y CONFIG_XR806_WLAN=y +# CONFIG_XR806_GET_WAKEUP_SRC is not set # CONFIG_USB_NET_RNDIS_WLAN is not set # CONFIG_VIRT_WIFI is not set diff --git a/lichee/linux-4.9/drivers/net/wireless/xr806/Kconfig b/lichee/linux-4.9/drivers/net/wireless/xr806/Kconfig index 1858b53fc..d80307229 100644 --- a/lichee/linux-4.9/drivers/net/wireless/xr806/Kconfig +++ b/lichee/linux-4.9/drivers/net/wireless/xr806/Kconfig @@ -3,3 +3,10 @@ config XR806_WLAN default n ---help--- To compile this code as a module, choose M here. + +config XR806_GET_WAKEUP_SRC + bool "XR806 get wake up source support" + depends on XR806_WLAN + default n + ---help--- + no need to choose this opt in recovery system. diff --git a/lichee/linux-4.9/drivers/net/wireless/xr806/txrx.c b/lichee/linux-4.9/drivers/net/wireless/xr806/txrx.c index 014eadf28..2e44595cf 100644 --- a/lichee/linux-4.9/drivers/net/wireless/xr806/txrx.c +++ b/lichee/linux-4.9/drivers/net/wireless/xr806/txrx.c @@ -268,7 +268,6 @@ end: } -static struct cmd_has_payload *has_cmd = NULL; static int xradio_rx_process(struct xradio_priv *priv, struct sk_buff *skb) { @@ -279,7 +278,10 @@ static int xradio_rx_process(struct xradio_priv *priv, struct sk_buff *skb) u16 checksum = 0, c_checksum = 0; u8 seq = 0; static int dev_seq = -1; +#if defined(CONFIG_XR806_GET_WAKEUP_SRC) static unsigned char get_wksrc_flag = 0; + static struct cmd_has_payload *has_cmd = NULL; +#endif int i; if (!priv || !skb) @@ -330,6 +332,7 @@ static int xradio_rx_process(struct xradio_priv *priv, struct sk_buff *skb) /* incom data */ if (type_id == XR_REQ_CMD) { xradio_rx_cmd_process(priv, skb, cur_len, seq); +#if defined(CONFIG_XR806_GET_WAKEUP_SRC) if (get_wksrc_flag == 0) { has_cmd = (struct cmd_has_payload *)skb->data; @@ -347,6 +350,7 @@ static int xradio_rx_process(struct xradio_priv *priv, struct sk_buff *skb) get_wksrc_flag = 1; } } +#endif } else { #if DATA_TEST xradio_data_test_rx_handle(skb->data, skb->len); @@ -434,6 +438,7 @@ static int xradio_txrx_thread(void *data) int status = 0; int rx_len = 0; int tx_status = 0; +#if defined(CONFIG_XR806_GET_WAKEUP_SRC) const struct cmd_has_payload wakeup_src_cmd = { .unkown1 = 0x003f, // TODO:全志通信协议 @@ -444,10 +449,12 @@ static int xradio_txrx_thread(void *data) .has_app_proto.payload_size = 1, .has_app_proto.wakeupsrc = 0, }; - +#endif xradio_k_atomic_set(&priv->tranc_ready, 1); +#if defined(CONFIG_XR806_GET_WAKEUP_SRC) xradio_tx_cmd_process(priv, (char *)&wakeup_src_cmd, sizeof(wakeup_src_cmd)); // 获取唤醒源 +#endif while (1) { status = wait_event_interruptible(priv->txrx_wq, ({ rx = xradio_hwio_rx_pending(); diff --git a/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-ota-files/APP/SL100BACKPANEL b/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-ota-files/APP/SL100BACKPANEL index 96b1ab3d6..68388db74 100755 Binary files a/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-ota-files/APP/SL100BACKPANEL and b/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-ota-files/APP/SL100BACKPANEL differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-ota-files/APP/SL100FRONTPANEL b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-ota-files/APP/SL100FRONTPANEL index 09403cd4f..2da895775 100755 Binary files a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-ota-files/APP/SL100FRONTPANEL and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-ota-files/APP/SL100FRONTPANEL differ