Merge pull request #3042 from enkiller/pr

[components][drivers][wlan] 修复WLAN事件附加数据为空的问题
This commit is contained in:
Bernard Xiong 2019-09-07 13:37:17 +08:00 committed by GitHub
commit 77e103f60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}