From e472b5d684f8cd669b73555b9e405bb013ddefc4 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 23 Nov 2017 12:03:30 -0600 Subject: [PATCH] rtl8188eu: Return zero length output to SIOCGIWESSID when not connected Signed-off-by: Larry Finger --- os_dep/ioctl_linux.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 011531c..3d124b2 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -1611,21 +1611,16 @@ static int rtw_wx_get_essid(struct net_device *dev, if ((check_fwstate(pmlmepriv, _FW_LINKED)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { len = pcur_bss->Ssid.SsidLength; - - wrqu->essid.length = len; - - memcpy(extra, pcur_bss->Ssid.Ssid, len); - - wrqu->essid.flags = 1; } else { - ret = -1; - goto exit; + len = 0; } + wrqu->essid.length = len; + + memcpy(extra, pcur_bss->Ssid.Ssid, len); + + wrqu->essid.flags = 1; exit: - - - return ret; }