diff options
| author | tangyuxin <[email protected]> | 2019-09-06 15:28:46 +0800 |
|---|---|---|
| committer | tangyuxin <[email protected]> | 2019-09-06 15:28:46 +0800 |
| commit | 8a3e66bc27611355f2b2f3b489a6a4075998854a (patch) | |
| tree | bfaf76933bb8912f90528ea512230baaf0ed44ff /components/drivers | |
| parent | 42248d81e513a231fc45f289f0f8ae266469e468 (diff) | |
[components][drivers][wlan] 修复WLAN事件附加数据为空的问题
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/wlan/wlan_mgnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/drivers/wlan/wlan_mgnt.c b/components/drivers/wlan/wlan_mgnt.c index e0ee67e06c..cf2204c6b3 100644 --- a/components/drivers/wlan/wlan_mgnt.c +++ b/components/drivers/wlan/wlan_mgnt.c @@ -260,7 +260,8 @@ static rt_err_t rt_wlan_send_to_thread(rt_wlan_event_t event, void *buff, int le msg->event = event; if (len != 0) { - msg->buff = ((char *)msg) + sizeof(struct rt_wlan_msg); + msg->buff = (void *)&msg[1]; + rt_memcpy(msg->buff, buff, len); msg->len = len; } |
