wifi: eswifi: init net_pkt cursor after net_pkt_write

Initialize the net_pkt cursor to begining after net_pkt_write.
Without which recv_cb can't peek/get net_pkt

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
This commit is contained in:
Parthiban Nallathambi 2019-06-13 12:55:01 +02:00 committed by Jukka Rissanen
commit d0d963a85d

View file

@ -97,6 +97,7 @@ static void eswifi_off_read_work(struct k_work *work)
LOG_WRN("Incomplete buffer copy"); LOG_WRN("Incomplete buffer copy");
} }
net_pkt_cursor_init(pkt);
socket->recv_cb(socket->context, pkt, socket->recv_cb(socket->context, pkt,
NULL, NULL, 0, socket->user_data); NULL, NULL, 0, socket->user_data);
k_sem_give(&socket->read_sem); k_sem_give(&socket->read_sem);