Skip to contentSkip to conversation

Patch "staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 1, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
staging-rtl8188eu-fix-incorrect-response-to-siocgiwessid.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Feb 1 13:45:42 CET 2018

From: Larry Finger <[email protected]>
Date: Sat, 25 Nov 2017 13:32:38 -0600
Subject: staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID

From: Larry Finger <[email protected]>

[ Upstream commit b77992d2df9e47144354d1b25328b180afa33442 ]

When not associated with an AP, wifi device drivers should respond to the SIOCGIWESSID ioctl with a zero-length string for the SSID, which is the behavior expected by dhcpcd.

Currently, this driver returns an error code (-1) from the ioctl call, which causes dhcpcd to assume that the device is not a wireless interface and therefore it fails to work correctly with it thereafter.

This problem was reported and tested at
https://github.com/lwfinger/rtl8188eu/issues/234.

---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +4 -10
@@ -1395,19 +1395,13 @@ static int rtw_wx_get_essid(struct net_d
 	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;
+		*extra = 0;
 	}
-
-exit:
-
+	wrqu->essid.length = len;
+	wrqu->essid.flags = 1;
 
 	return ret;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/staging-rtl8188eu-fix-incorrect-response-to-siocgiwessid.patch