Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4028509pxb; Mon, 1 Feb 2021 10:29:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBtcbQv+nzcsHDGC+JVU+6ZQK0AVWiQXLjCKV00xEbFNT4xDouyVb+Srh+VUYPwfgo7D6i X-Received: by 2002:a05:6402:b27:: with SMTP id bo7mr12191999edb.372.1612204148787; Mon, 01 Feb 2021 10:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612204148; cv=none; d=google.com; s=arc-20160816; b=P3XxeMHAHzj0JPVYiiFFl41gdZpNa+fvNGqWIF6YygjVICsAaNFp6Os3GM0OoZP7me hm+r5U8anFOIpz3jZEoIw9pD9X0AG9pZt9JoVX+KF5rBJplzqu6SDEFKkY52+4/GVy0W ahhTV3EGbjHUFjGjfggFg+J6pZxmNhYQkiqHOmhrvg7kkwVKstPpfSqr9Eu+2N1XL6bY dHFBINJnzmK2kugDDDzcjyKNl9zn1OOND9+tfvBsOUfFZqdgGUVslJQDurSGexbUFzBK pmtEa0E9GZ6703Lz1CFJ1Aae/+2bPbm3NWJFZfDxtTC1g/bg/UFfFAW1AZtAgYjP0u4q M1Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=0cSq1G8qZNUoXkgPBBH/GYfX2ptTVNEvJvGsmoDj/r8=; b=QuwcaDZ8Wmn9FaTRiHTixvwqL/MR1fq7Bdt2Ftdy4gLnXBMiUmeTTsVtRPhTPSv1TI UQchwp7T6HcXRA5AR2TiV9PfxuGtTQQjhBM9Xlf924RVXenVbsAkB+NpHcWwaxKgcUin fba+1m7rY4bwoBc/wCEOniBP/os3s7gbubHQPTAPMHUggvrXzx9iNs3tIN4wxQOceCkt NWxKVfLdLGJtX5oBZ0lbabXe4o7H0gtVK3HzM7wbTeV5fvlI7+ttqTGH9y8eupjiVSfc FIfsPeGWTain7lUfh6VezHkK+4m+ybmSx0ooXbU+mGInpi0/ZkLp3/LYaMocen18UQ9E WPQA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si12975733edy.455.2021.02.01.10.28.44; Mon, 01 Feb 2021 10:29:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbhBAS2h (ORCPT + 99 others); Mon, 1 Feb 2021 13:28:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbhBAS1i (ORCPT ); Mon, 1 Feb 2021 13:27:38 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38469C06174A for ; Mon, 1 Feb 2021 10:26:58 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1l6duY-00EWve-Dv; Mon, 01 Feb 2021 19:26:54 +0100 Message-ID: <3b081883581161ba3c3dc91956790799e0694c1e.camel@sipsolutions.net> Subject: Re: [PATCH 1/1] staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip From: Johannes Berg To: Greg Kroah-Hartman , Hans de Goede Cc: Ross Schmidt , linux-wireless@vger.kernel.org Date: Mon, 01 Feb 2021 19:26:39 +0100 In-Reply-To: (sfid-20210201_164004_722660_B860788A) References: <20210201152956.370186-1-hdegoede@redhat.com> <20210201152956.370186-2-hdegoede@redhat.com> (sfid-20210201_164004_722660_B860788A) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2021-02-01 at 16:37 +0100, Greg Kroah-Hartman wrote: > 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 So we'll have problem-fix-fix ;-) Sounds good to me, I'll pick it up. Thanks! johannes