parent
ce0a481a23
commit
b26be295d7
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue