Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5093223pxb; Sun, 6 Feb 2022 13:31:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwxKFybeTLUAnVOitl+7vX5ysaUQNNzXRLPCb3m8H6JZmLlGEXS/IY9i8mCwQhGQfgnRuU X-Received: by 2002:a05:6a00:1652:: with SMTP id m18mr13145936pfc.56.1644183110049; Sun, 06 Feb 2022 13:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644183110; cv=none; d=google.com; s=arc-20160816; b=Gq6U34ePf7zZzbq/dlM7Y6DmPjHiR8bWjOAjTtcp7S2B2wDoJACTj/3op/3j+IWkLT LrK4E8MUS37Xo0Ya6qPJEBQ/dwoXaob2wGNLs4pB9apD4MHyVbGCc/7pvQSQR6GT1fa3 k+omKGVlQStYiYY+9TQK2+5hpaRjkQDXO9+6KC/LnEk6nch2V+kDxya8jyKNCZhYLodb xkof58mL9aC3qPGzk/JxHQCphcN4NZplSIIE9/uirzauDU7XxjveCUUjrTPfI6GxiC8y SSrHaj332f0z//cSkTFAl/QzFI/RTtgK3e+9XEtvULyjAz5SJN7RMohSPGDeflgjs82E oyGw== 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:dkim-signature; bh=Mx8vWjRGtc80e95/oiodIL/Pzm0TxSGQlREvqurz1zk=; b=onWixkRHjJYY+JrGou9mIJE6pZa1MGmxKCWICye1bwh/8AV3w/F/ytfGxFDId18dKM Szg6tP5CIIAksiJ7eyMEEXZQtFVbonZkEQ4OQ7+Y/gRSP7+ra8nVWQQrJxlAaIROgUAF 68//4CDwqc99npeYNVPOSFwnxWf4r60sK9OMzrWFleLHOPTIT2sQSYLROPZdJS775G3a ebXg6iv5UlUseD4xWrTJ3CLIOwWeig/ZdXd4WjDx9F/GS8HJf/LcGtFyjDn3tlBdjrq0 lsIElqzt9vmClS5LeSq3QpWUQzfcW006IiTDoph3z/7yMcRlgQGn1TZNyULn/psmlsig +5ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=XAx+vvY1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1si7303863plr.215.2022.02.06.13.31.32; Sun, 06 Feb 2022 13:31:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=XAx+vvY1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243188AbiBCWaO (ORCPT + 72 others); Thu, 3 Feb 2022 17:30:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiBCWaN (ORCPT ); Thu, 3 Feb 2022 17:30:13 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC2A7C061714 for ; Thu, 3 Feb 2022 14:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Mx8vWjRGtc80e95/oiodIL/Pzm0TxSGQlREvqurz1zk=; t=1643927413; x=1645137013; b=XAx+vvY1OvOHv5kTvCcVfeBGn813NAdtEcHuxZFRjc+fRYG goZN+uS+mS6/RmSzKelxBZGEnxRbvL9mrGBa+lixYlMkI8u1UcKmwGhQ31y5p5biV2uA5lwU3eZen NR5bnVaUa5+1mvxolfUc1x4jGOnEnTav+Bc8O3qJoHelH5nP7oz2LQfPQxtOtcR8+NBO0zEN95yrC EIIn0TPafwNiRCXWmlwJN395BOz5Bex2+J+TlPixY5kJyDXbMg0B7wI9Hj9egM4//sC90TGZQqoGD qyvJC8Rorj7+SlYL8a4nsk87HekgxMK9I6kesx6lvnitn8YhrrXsJe7eWc0ARbzQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nFkcC-00EG60-Sf; Thu, 03 Feb 2022 23:30:09 +0100 Message-ID: <0848f5eba90a2125425da52b6b5f6f47ba9d6630.camel@sipsolutions.net> Subject: Re: [PATCH 09/13] cfg80211: Save the regulatory domain when setting custom regulatory From: Johannes Berg To: Nicolas Cavallari , Kalle Valo , Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= Cc: linux-wireless@vger.kernel.org Date: Thu, 03 Feb 2022 23:30:07 +0100 In-Reply-To: References: <20201129153055.1971298-1-luca@coelho.fi> <87ily325t4.fsf@tynnyri.adurom.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) 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 Tue, 2021-10-12 at 12:24 +0200, Nicolas Cavallari wrote: > > > > > > This patch somehow appears to break ath9k's eeprom hints and restrict > > > it to the world regulatory domain on v5.12.10. > > > > > > ath9k calls wiphy_apply_custom_regulatory() with its own kind of world > > > regulatory domain, before it decodes hints from the eeprom and uses > > > regulatory_hint() to request a specific alpha2. > > > > > > With this patch, applying the hint fails because wiphy->regd is already set. > > > If i revert this patch, ath9k works again. > > Hm. It stands to reason that perhaps ath9k should call wiphy_apply_custom_regulatory(NULL) (if that's possible) to reset the knowledge of having a custom regulatory domain, before requesting the correct one be applied by cfg80211 (and possibly even crda userspace). I can't really say that I think the patch itself is wrong, even if it caused this problem. johannes