drivers: wifi: esp: Update to new timeout api

Update to new timeout api.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke 2020-05-11 23:38:28 -03:00 committed by Carles Cufí
commit 9a37154151

View file

@ -145,7 +145,7 @@ static int esp_connect(struct net_context *context,
sock->connect_cb = cb;
sock->conn_user_data = user_data;
if (timeout == K_NO_WAIT) {
if (timeout == 0) {
k_work_submit_to_queue(&dev->workq, &sock->connect_work);
return 0;
}
@ -358,7 +358,7 @@ static int esp_sendto(struct net_pkt *pkt,
* have a valid link id before proceeding.
*/
ret = esp_connect(context, dst_addr, addrlen, NULL,
K_SECONDS(5), NULL);
(5 * MSEC_PER_SEC), NULL);
if (ret < 0) {
return ret;
}
@ -374,7 +374,7 @@ static int esp_sendto(struct net_pkt *pkt,
sock->send_cb = cb;
sock->send_user_data = user_data;
if (timeout == K_NO_WAIT) {
if (timeout == 0) {
k_work_submit_to_queue(&dev->workq, &sock->send_work);
return 0;
}
@ -582,7 +582,7 @@ static int esp_recv(struct net_context *context,
sock->recv_user_data = user_data;
k_sem_reset(&sock->sem_data_ready);
if (timeout == K_NO_WAIT) {
if (timeout == 0) {
return 0;
}