Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lte/alt1250/alt1250_usockif.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ int usockif_readreqioctl(int fd, FAR struct usrsock_request_buff_s *buf)

switch (req->cmd)
{
case FIONBIO:
rsize = sizeof(int);
break;
case SIOCLTECMD:
rsize = sizeof(struct lte_ioctl_data_s);
break;
Expand Down
5 changes: 5 additions & 0 deletions lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ int usockreq_ioctl(FAR struct alt1250_s *dev,
{
switch (request->cmd)
{
case FIONBIO:
/* ALT1250 doesn't use this command. Only return OK. */

*usock_result = OK;
break;
case SIOCLTECMD:
ioctl_subhdlr = usockreq_ioctl_ltecmd;
break;
Expand Down
15 changes: 13 additions & 2 deletions netutils/wiznet/wiznet_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,12 +1662,20 @@ static int ioctl_request(int fd, FAR struct wiznet_s *priv,
struct wiznet_ifreq_msg cmsg;
uint8_t sock_type;
bool getreq = false;
bool drvreq = true;
int ret = -EINVAL;

memset(&cmsg.ifr, 0, sizeof(cmsg.ifr));

switch (req->cmd)
{
case FIONBIO:
/* Read int as dummy */

read(fd, &ret, sizeof(int));
ret = OK;
drvreq = false;
break;
case SIOCGIFHWADDR:
case SIOCGIFADDR:
case SIOCGIFDSTADDR:
Expand Down Expand Up @@ -1705,8 +1713,11 @@ static int ioctl_request(int fd, FAR struct wiznet_s *priv,
break;
}

cmsg.cmd = req->cmd;
ret = ioctl(priv->gsfd, WIZNET_IOC_IFREQ, (unsigned long)&cmsg);
if (drvreq)
{
cmsg.cmd = req->cmd;
ret = ioctl(priv->gsfd, WIZNET_IOC_IFREQ, (unsigned long)&cmsg);
}

if (!getreq)
{
Expand Down
15 changes: 13 additions & 2 deletions wireless/gs2200m/gs2200m_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,12 +1572,20 @@ static int ioctl_request(int fd, FAR struct gs2200m_s *priv,
struct gs2200m_ifreq_msg imsg;
uint8_t sock_type;
bool getreq = false;
bool drvreq = true;
int ret = -EINVAL;

memset(&imsg.ifr, 0, sizeof(imsg.ifr));

switch (req->cmd)
{
case FIONBIO:
/* Read int as dummy */

read(fd, &ret, sizeof(int));
ret = OK;
drvreq = false;
break;
case SIOCGIFADDR:
case SIOCGIFHWADDR:
case SIOCGIWNWID:
Expand Down Expand Up @@ -1615,8 +1623,11 @@ static int ioctl_request(int fd, FAR struct gs2200m_s *priv,
break;
}

imsg.cmd = req->cmd;
ret = ioctl(priv->gsfd, GS2200M_IOC_IFREQ, (unsigned long)&imsg);
if (drvreq)
{
imsg.cmd = req->cmd;
ret = ioctl(priv->gsfd, GS2200M_IOC_IFREQ, (unsigned long)&imsg);
}

if (!getreq)
{
Expand Down