wifi: eswifi: Select socket before configuration
Socket selection needs to be first in the order of operation Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
This commit is contained in:
parent
23d863f6c4
commit
0fd92b463b
1 changed files with 7 additions and 7 deletions
|
@ -637,6 +637,13 @@ static int eswifi_off_get(sa_family_t family,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = __select_socket(eswifi, socket->index);
|
||||
if (err < 0) {
|
||||
LOG_ERR("Unable to select socket %u", socket->index);
|
||||
eswifi_unlock(eswifi);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* Set Transport Protocol */
|
||||
if (ip_proto == IPPROTO_TCP) {
|
||||
socket->type = ESWIFI_TRANSPORT_TCP;
|
||||
|
@ -666,13 +673,6 @@ static int eswifi_off_get(sa_family_t family,
|
|||
k_sem_init(&socket->accept_sem, 1, 1);
|
||||
socket->usage = 1;
|
||||
|
||||
err = __select_socket(eswifi, socket->index);
|
||||
if (err < 0) {
|
||||
LOG_ERR("Unable to select socket %u", socket->index);
|
||||
eswifi_unlock(eswifi);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
k_delayed_work_submit_to_queue(&eswifi->work_q, &socket->read_work,
|
||||
500);
|
||||
eswifi_unlock(eswifi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue