rtl8188eu: Return zero length output to SIOCGIWESSID when not connected

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2017-11-23 12:03:30 -06:00
parent c5113ffec0
commit e472b5d684

View file

@ -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;
} else {
len = 0;
}
wrqu->essid.length = len;
memcpy(extra, pcur_bss->Ssid.Ssid, len);
wrqu->essid.flags = 1;
} else {
ret = -1;
goto exit;
}
exit:
return ret;
}