drivers: wireless: Fix error handling in gs2200m_ioctl_send()

Summary:
- I noticed that NFS over TCP does not work correctly when
  it tried to reconnect to the NFS server.
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi_smp
- NOTE: need to update gs2200m_main.c

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa
2021-06-29 07:53:52 +09:00
committed by Xiang Xiao
parent b36171026e
commit c89c11a078
+2 -1
View File
@@ -2383,6 +2383,7 @@ static int gs2200m_ioctl_send(FAR struct gs2200m_dev_s *dev,
{ {
wlinfo("+++ already closed \n"); wlinfo("+++ already closed \n");
type = TYPE_DISCONNECT; type = TYPE_DISCONNECT;
ret = -ENOTCONN;
goto errout; goto errout;
} }
@@ -2392,7 +2393,7 @@ static int gs2200m_ioctl_send(FAR struct gs2200m_dev_s *dev,
errout: errout:
if (type != TYPE_OK) if (type != TYPE_OK && type != TYPE_DISCONNECT)
{ {
ret = -EINVAL; ret = -EINVAL;
} }