Skip to content

Commit 075a92d

Browse files
drivers: siwx917_wifi: Update net_context state
The Zephyr stack does not update net_context state when CONFIG_NET_OFFLOAD=y. However, this field is still used in some not-offloaded operations (eg. poll()). So, update net_context state manually. Reported-by: Tibor Laczko <[email protected]> Signed-off-by: Jérôme Pouiller <[email protected]>
1 parent 5c639ba commit 075a92d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/wifi/siwx917/siwx917_wifi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ static int siwx917_sock_connect(struct net_context *context,
458458
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
459459
sl_si91x_select(NUMBER_OF_BSD_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
460460
siwx917_sock_on_recv);
461+
net_context_set_state(context, NET_CONTEXT_CONNECTED);
461462
if (cb) {
462463
cb(context, ret, user_data);
463464
}
@@ -473,6 +474,7 @@ static int siwx917_sock_listen(struct net_context *context, int backlog)
473474
if (ret) {
474475
return -errno;
475476
}
477+
net_context_set_state(context, NET_CONTEXT_LISTENING);
476478
return 0;
477479
}
478480

0 commit comments

Comments
 (0)