Received: by 10.223.176.46 with SMTP id f43csp271480wra; Tue, 23 Jan 2018 20:45:33 -0800 (PST) X-Google-Smtp-Source: AH8x224iBlJ2G6625EEQ1BW8R2jNflgxGuHC+zpWVz+R4Sdi85yZgrqpMvPM+RPgRq3xXQyv9EYG X-Received: by 10.98.66.67 with SMTP id p64mr11813763pfa.227.1516769133179; Tue, 23 Jan 2018 20:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516769133; cv=none; d=google.com; s=arc-20160816; b=A2x6KVDiUlUJyyO4tWIG6zEbIVQYsVvgbfV53Jd+iwO1VWwpYUNvJpp11Jd6JPmhyB rpd3aEJ6pM9lYebbgdUUmYfpyxjSDyFZDtUxM6Wjq1ZSiOOf4VkSDEXCd4Z5ALM1m1ep jMB+KHT9r3sZcv+GjyOP0w0oX5sA0UGKMZrIM1qp+LuevcehhGL7cWisQ2+tmvYqJemv O5J8zAUwmixekcuwgIdI2pAckZ3E+nU8SG+noSeMB1Q6eTRi466S+tELlMO4DVwDmoLb ENUvPPdBdxvcoqSTjvL8j5g3uPyOPk3+PAclIAaMwbGv/+jQpwmKsYfT9H1JjnS7Bwkt 1fMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FbFTxeP4vhmECJjAPHge69f/CI0M8rbxeKfpIBDgxVg=; b=UFel28fKXVklhFl+afxkFOcTNQGiwN0ACGJ8d/O8HqC0jI23TdrQaGstA0pIre73// o6yKRnk35V9keYz8BrTuL0U3xqUMdAep17rDicqGjnsReuHaqwTLzAn+Qh10jsbqPwbS elIqMBTtw1OYcfhj23dzGpZ9MyJRdBcOG77spTejetmmR4LcgDv/yEGwpZs1mChp3vJr 2SHsbS4hlcVjWASnmrjhyNRno2hrhZi293ZpcKGeKzSumY6rlmtX7PiYYXjFSVjxPdcU oXt4jFeOHNBKwNR515Z6IcTXEvcj/vcM0lxYwZiMeQCTSfUJjJsJVqpBPI2oUvspgz/N 3Qww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=koDouaD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si15458369pgv.424.2018.01.23.20.45.19; Tue, 23 Jan 2018 20:45:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=koDouaD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932881AbeAXEoI (ORCPT + 99 others); Tue, 23 Jan 2018 23:44:08 -0500 Received: from mail-sn1nam01on0139.outbound.protection.outlook.com ([104.47.32.139]:26809 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932648AbeAXEQs (ORCPT ); Tue, 23 Jan 2018 23:16:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FbFTxeP4vhmECJjAPHge69f/CI0M8rbxeKfpIBDgxVg=; b=koDouaD0wV/M7e8HZdGlnR+SlZWWIIqNcee7KXAjBYDRl9gvuspONHKA3TPZR2xSMIlGweqW7tqRClNExIvrPJy5VP41H+fVkOLRx0lk6cTh4m3GXbVZLw0WDxw/6aag9Ns4Sm7n/2QFYqwIPg4MIB5sG3Xn9Ux4Sx5/xEJG2Hc= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0727.namprd21.prod.outlook.com (10.167.110.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.464.1; Wed, 24 Jan 2018 04:16:41 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0464.000; Wed, 24 Jan 2018 04:16:41 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Larry Finger , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 100/100] staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID Thread-Topic: [PATCH AUTOSEL for 4.14 100/100] staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID Thread-Index: AQHTlMnxqd0V76b3bEuf6JFnCx1hJQ== Date: Wed, 24 Jan 2018 04:15:18 +0000 Message-ID: <20180124041414.32065-100-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0727;6:HBiUV4C4Zer6j2hA4s9dJpYMfx3zZ6g6tJgpxvdIKFpn6Z1HeeF53WIDW+wPu8rluyVx08RW8KuZi2jm9Y9KyQereD/mybVGUCzP5B0XsT8nBCJZt+t7Z4W4+32uHqbOr7b/llQKI7bebu+MABxL8DSIuLMJPF6jLu1JSRxSwVGHnqZHg1oFPI46eKshABx/n2aPncVxKzWzywb8btq/ZOKo/smP2rEcC5oYxkK4Rf+tN7Bd6UNgjwFuII3Nezr7jjugx7SkTmsSGfr7+tpYNewVaAQaYal78zcqcDAfsZmFclS3FI70a5l27rYmXc6JUBwmliPXGQrVcE6h+F+u8yiHstFLZ5+7WX5se3kDnh17Avyi8ut3OwOz1VgceYZe;5:Ed2oL3fySXXUqaIi3cmHMCQzqzbZFAuTL3I2MPSnYx1aOxWz8/1alfzpH8SSXlfgCCVDxp4GHMqQaTu4kPUtQhWbil5U8S4PO0tm1QLPz2G/+gT49HqIY94pXsrVmpnlR94AGMa/QXtMjqh2wgBsPUsiwQmONsfVpWyFrz2IV68=;24:bZVz0Hcqgh6QTwn0BK7XwcoYORMRcmcfJq+2sgBX3ZbMu9jW/+FMMUQ7HT9TKTGdKo4Gqtj3YkD1g7MX/aKfzhTnyyIux8tf+YEdBOVgEOk=;7:MZRx9MXIpkhViKclrP2Hrp2i76S5ylSox6aOKEPq1V6Hz+osh8FNyyc7uplDv0y6I/10+m0cblGejAb+BdXYmh2xoPlIyVVIwAXdMBPQzKrTR5YCJIe85SR5eT2ppLi2neGCcNYi+jRonda4M/YMsLvc47Sby9qKKKKd/qiZX0pRFLwJSS3peUrNr9plYMIkhRHVeI6ekvmT02+aDFjO3pZ47bdpNJUVBX+C+bnTPE5+yRANLg3PZslHQf346N9R x-ms-office365-filtering-correlation-id: 9c580433-a2d6-442c-db0e-08d562e145a3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020);SRVR:DM5PR2101MB0727; x-ms-traffictypediagnostic: DM5PR2101MB0727: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(166708455590820); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3231046)(2400081)(944501161)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041288)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0727;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0727; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(366004)(39380400002)(39860400002)(376002)(189003)(199004)(86612001)(6506007)(106356001)(76176011)(6346003)(54906003)(86362001)(2501003)(110136005)(966005)(1076002)(7736002)(5250100002)(3660700001)(316002)(26005)(102836004)(2950100002)(6666003)(99286004)(97736004)(22452003)(107886003)(6436002)(53936002)(478600001)(66066001)(14454004)(6306002)(2900100001)(6512007)(2906002)(5660300001)(8936002)(4326008)(10290500003)(305945005)(10090500001)(68736007)(25786009)(81166006)(72206003)(36756003)(8676002)(81156014)(3846002)(6116002)(3280700002)(105586002)(6486002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0727;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: haj3tqRDMJzY/R/4UPnnTHWTLSrc8OSVj6i3dioR24eddQQ/pAOarHYOyNpDktYmx1R7o6DBrpgLojpGBaWUwQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c580433-a2d6-442c-db0e-08d562e145a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 04:15:18.2049 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0727 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Larry Finger [ 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. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/stagi= ng/rtl8188eu/os_dep/ioctl_linux.c index c0664dc80bf2..446310775e90 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1395,19 +1395,13 @@ static int rtw_wx_get_essid(struct net_device *dev, if ((check_fwstate(pmlmepriv, _FW_LINKED)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { len =3D pcur_bss->Ssid.SsidLength; - - wrqu->essid.length =3D len; - memcpy(extra, pcur_bss->Ssid.Ssid, len); - - wrqu->essid.flags =3D 1; } else { - ret =3D -1; - goto exit; + len =3D 0; + *extra =3D 0; } - -exit: - + wrqu->essid.length =3D len; + wrqu->essid.flags =3D 1; =20 return ret; } --=20 2.11.0