Received: by 10.223.176.5 with SMTP id f5csp1058876wra; Fri, 2 Feb 2018 10:27:35 -0800 (PST) X-Google-Smtp-Source: AH8x224j8EY62UJAVnYaNnXMAdOXHF+3rgFBH7bouplmtyU5qDPARL8U9qTuwQtVF9SeTKnrmXQQ X-Received: by 2002:a17:902:988b:: with SMTP id s11-v6mr34117108plp.99.1517596055373; Fri, 02 Feb 2018 10:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517596055; cv=none; d=google.com; s=arc-20160816; b=ffqYKFcG7wuZt5WTqNrwenALmZO3auEchGA5xFDxocanuFmqzJgM6FLze4b4fNREW4 BUd9CXVGIZ9cSgy6OZWSFf0310bdIS6PQGAsSuvjVsWJAlA4oUUDczVfU7jzwdmuAZKR 1XT4+IowdQJPHH29KSOR4w2uj0TZClUBsF38TTLGSRliq/bBmzz2cZRKS2toeDYXb64H Vozp2paq5EkjzoKkIR+NIoZnMrjDdpj1vkZZPXXo8phAvMjl+ss20bRSvxYOK+sQDwTg EA9b3B/eBsUVRhpOhOBtCTikNvGbJnrHOsmvwf++1takylObw/2NHr2hqKrhqDwzYklG 8/gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JUN5OmEiFveqs/hzySBkxd78U3zZNFVRvn7zrLacNEk=; b=nUHgCXLnpQL0ClSpl9QaK9nsxuAaUhgJzDAooloBQc5cf1WVYttgBEJyj7deQMLVAK XYewQdzezHi9jL2VvwGXrylXHC0UP+I1epeatokxM2hXvStP8EOm4cuE3q02ogV+uUDV jdQ/d92f1tkEth7OhkAt3AYAfAF7JD8K+eFShoqmFgPMQ5vIZ8wovvjW7mS4O+tsshQo NCfnJ2/kMTk+iI2ZtzpmyGIxa5xbN9+27JcxP1GVRjam/6FhPPxXqEnUtx8+hCus/jMF eG3cbwavxRklerwKfKJmF7EzFTKZa45FiTKvJrBmtR7jVbh9+EnmmFg5Q3im2IgwZjgi NxuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si2202034plb.331.2018.02.02.10.27.20; Fri, 02 Feb 2018 10:27:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754663AbeBBS0O (ORCPT + 99 others); Fri, 2 Feb 2018 13:26:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35244 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbeBBRBt (ORCPT ); Fri, 2 Feb 2018 12:01:49 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A5E8AE9A; Fri, 2 Feb 2018 17:01:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Larry Finger , Sasha Levin Subject: [PATCH 4.4 54/67] staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID Date: Fri, 2 Feb 2018 17:58:23 +0100 Message-Id: <20180202140821.304604726@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140815.091718203@linuxfoundation.org> References: <20180202140815.091718203@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1399,19 +1399,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; }