Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3906805pxb; Mon, 1 Feb 2021 07:40:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI6YEdEXsAiWAotfazLGzCBo/MNEpc4+vCzmoaMQ88eLXBF0jlxAy6zhsnzXCeNcR0yOtF X-Received: by 2002:a17:907:da9:: with SMTP id go41mr18464680ejc.326.1612194003176; Mon, 01 Feb 2021 07:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612194003; cv=none; d=google.com; s=arc-20160816; b=r5GXN2n238hpamUxDcWOK4NyR7X97XqzIuPil8dsUvCxMBSwGpHi24afnLzNKE63gg b2BrXVXNMp0kMGF0ISgnVeIX+zBOL9jBgnZnzMHA5x9eB2ZQ0dsxPwvhVok7qKG62d6D 4gTGPQxRm8jNt+zIp+itbqqrhICoLR3y9eQsc2xqED2p+cvRSyD1Qr34WPpaB8NMMq1H MxWjvI54+yM4QWkgeAPbiSJjTWEmkP1ANv8905ay2ggzuUPcFUxDGRek8dinodNXJIH0 KDjiA2lzkRYIIr7kvMqlxHYeP/phKm4IAmSOZ+e23jjvhxOk3+IDTxuqTxqenhvTwoTA T5nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Wd1Qsm1xjD3WzPz4jY0GUb3J39UXs/whCv0uacTfCDg=; b=Y+jv9HJFNTg/kHqjESrDkT5bHIrwzLAlcEcByESedO/RjaDC08ArgWd2CsPumK6G6c Fdy4cTuVvXPVmuXU8fwGMaNaITw+Qv97RQjT9D9Wot6w0mIt/O8HRDBngPV8iGIO3rxc X8qmkh8tRymZDH1TtqE09tijoFwBTxmFqeTWH6CFMLlVaVSMDVHm9tU7eevKDmlj23wR K+aTfzL1EcvU7cvYBXg54UbHkP6IZPY8h7bxh/D9rqycK4z/HsWcYYzwKAIazvz3aqIF S3za3ds6NTN9GNLS/yuaX8aZ1Cw5U+KiX9yh5sO5jrY7sLXVm+96rQV5W7SGZxjZ621v 5yKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B2K6k0D7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si10207698edd.134.2021.02.01.07.39.38; Mon, 01 Feb 2021 07:40:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B2K6k0D7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbhBAPif (ORCPT + 99 others); Mon, 1 Feb 2021 10:38:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:43744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbhBAPi2 (ORCPT ); Mon, 1 Feb 2021 10:38:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 83A7A64DAE; Mon, 1 Feb 2021 15:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612193868; bh=7B6Y/oTraOd+LXWxm/xEQcNmH/vDFm/JNNWxhZ3zBQ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B2K6k0D7Rn2QRHJoNqKUO7xZKZyHRb54YEBPd5IEiubLvHhJ4Ayq8oWWrXYWa7nhB 8RT+a3wszelF6x5bSD7OGb9zSljnGoEjOy2FiSyzp6iiqRl6bcA42Jh30LvQvlLqJV QFD83nSjsPlLE+bvoZaVjFcrUTttJy1YbK1RjodU= Date: Mon, 1 Feb 2021 16:37:45 +0100 From: Greg Kroah-Hartman To: Hans de Goede Cc: Johannes Berg , Ross Schmidt , linux-wireless@vger.kernel.org Subject: Re: [PATCH 1/1] staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip Message-ID: References: <20210201152956.370186-1-hdegoede@redhat.com> <20210201152956.370186-2-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210201152956.370186-2-hdegoede@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, Feb 01, 2021 at 04:29:56PM +0100, Hans de Goede wrote: > Commit 81f153faacd0 ("staging: rtl8723bs: fix wireless regulatory API > misuse") moved the wiphy_apply_custom_regulatory() call to earlier in the > driver's init-sequence, so that it gets called before wiphy_register(). > > But at this point in time the eFuses which code the regulatory-settings > for the chip have not been read by the driver yet, causing > _rtw_reg_apply_flags() to set the IEEE80211_CHAN_DISABLED flag on *all* > channels. > > On the device where I initially tested the fix, a Jumper EZpad 7 tablet, > this does not cause any problems because shortly after init the > rtw_reg_notifier() gets called fixing things up. I guess this happens > into response to receiving a (broadcast) packet with regulatory info > from the access-point ? > > But on another device with a RTL8723BS wifi chip, an Acer Switch 10E > (SW3-016), the rtw_reg_notifier() never gets called. I assume that some > fuse has been set on this device to ignore regulatory info received from > access-points. > > This means that on the Acer the driver is stuck in a state with all > channels disabled, leading to non working Wifi. > > We cannot move the wiphy_apply_custom_regulatory() call back, because > that call must be made before the wiphy_register() call. > > Instead move the entire rtw_wdev_alloc() call to after the Efuses have > been read, fixing all channels being disabled in the initial channel-map. > > Fixes: 81f153faacd0 ("staging: rtl8723bs: fix wireless regulatory API misuse") > Cc: Johannes Berg > Signed-off-by: Hans de Goede > --- > drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) As the problem-fix came from Johannes's tree, I have no problem with this fix going in through that as well: Acked-by: Greg Kroah-Hartman