Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2208711ybb; Fri, 27 Mar 2020 00:53:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vux9++/pz7IW6Eapa5DyXgU4KE+VMzhJ1FiGSWlH/9yNxxgnPSQmuhwGOR9Ny3xY2xyMZXp X-Received: by 2002:aca:c6d1:: with SMTP id w200mr2970595oif.43.1585295587415; Fri, 27 Mar 2020 00:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585295587; cv=none; d=google.com; s=arc-20160816; b=pF6yjuv+1oz6oUkBZg/QS5YSjuax0wssHmwEFAol03WezrYSwCoJS5gBNLGmOwfz0p Fgz9V+Giap3vECoayVV1IJ1RDeSZlRKQ6vPuEotG9bqs/g3cx3fPYnLFTPBCsybhGbqS hZo73WUMa1N6MgbM0fnqVt+7oFK5Ad97+fcCK9d2mHkaG8uWxVCTk6/1srmrJAhTE5Va +WTosDPGzceyTemNMqkbKpzKIyCC2adqW+oyxiN4T8HDZtwpyPFIx/Z1fgm2SlvaAiyT 1jYZpyAOnVHsGFanHCSo+n4L4Vt4HJy+dlL3MgU7KhWgY2gYo4qtxp4EGYWukJYOf+2v 9gtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=/bV6jDDkrtmDJu1LILc4QS39sSkjyCmVv4VNomkLFeI=; b=pXgRulcj/fzRnj/NLxYfbVcnTjSp1JDG3jGkZdvUehATyWpO25UJ4l+O3G10/PN7ww Z2YE5b4K3pNYb+QiVH6B2+t7jXMKSI6bowGyExusWLa+TeZraxbHjOjwb5ANb+sqoJ3c EN4826Frztp/RGiP5ZT8+NZAn0vX4mYcq5NDhNGpgMdnOw6eqqR/9INIlH2Z1GaKj5LR yW1wBS3aN6InrbsoSleXf8YUh17HtLR6nOtJiL7illTO6XgEDHN4fZH57zPJ5oWqMh8P JChGqCyb196gfqOo7TDUCq1b7BDv5zl/XRsHSFZC/auuSIonJNqbNhQUthXz0ms8YIZy Kv+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 f9si2287986otc.162.2020.03.27.00.52.51; Fri, 27 Mar 2020 00:53:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbgC0Hwn (ORCPT + 99 others); Fri, 27 Mar 2020 03:52:43 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:53086 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbgC0Hwm (ORCPT ); Fri, 27 Mar 2020 03:52:42 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID 02R7qXQh009398, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTEXMB06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id 02R7qXQh009398 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 15:52:33 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 27 Mar 2020 15:52:32 +0800 Received: from localhost.localdomain (172.21.68.128) by RTEXMB04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 27 Mar 2020 15:52:32 +0800 From: To: CC: , , Subject: [PATCH v7 0/2] rtw88: update regulatory settings Date: Fri, 27 Mar 2020 15:52:27 +0800 Message-ID: <20200327075229.29191-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.128] X-ClientProxiedBy: RTEXMB03.realtek.com.tw (172.21.6.96) To RTEXMB04.realtek.com.tw (172.21.6.97) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang This patchset applies regulatory rules for Realtek's chip set. Some of the modules are programmed country-specific code in the efuse. And for this kind of modules, driver doesn't want the regulatory to be changed, so the driver tends to not listen to the regulatory hint that is notified by the stack. Otherwise if the modules are not programmed to a country-specific code, then the world-wide (WW) settings will be adopted. If the regulatory is WW, the driver will apply the settings notified by the stack. If anyone wants to allow regulatory being set from user-space tools (ex: iw reg set), a compile option flag RTW88_REGD_USER_REG_HINTS should be set to allow regulatory hist from user. Also add "Adaptivity" support for some special country codes, because they have to stop TX immediately if there's any energy detected. v2 -> v3 * split patch set for further discussion v3 -> v4 * squash patch set, since nobody has different idea for it * "rtw88: add regulatory process strategy for different chipset" and "rtw88: support dynamic user regulatory setting" are squashed * modify the commit log to better describe it * add a new patch for adaptivity support "rtw88: add adaptivity support for EU/JP regulatory" v4 -> v5 * check return value of kstrtobool() v5 -> v6 * remove custom world-wide, use stack world-wide * surface err codes by printing logs * fix incorrect debugfs set parameter for edcca enable v6 -> v7 * restore custom world-wide, because of not to modify USER settings * modify commit message to be more clear Tzu-En Huang (2): rtw88: add regulatory process strategy for different chipset rtw88: add adaptivity support for EU/JP regulatory drivers/net/wireless/realtek/rtw88/Kconfig | 10 +++ drivers/net/wireless/realtek/rtw88/debug.c | 33 +++++++ drivers/net/wireless/realtek/rtw88/main.c | 8 +- drivers/net/wireless/realtek/rtw88/main.h | 33 +++++++ drivers/net/wireless/realtek/rtw88/phy.c | 60 +++++++++++++ drivers/net/wireless/realtek/rtw88/phy.h | 2 + drivers/net/wireless/realtek/rtw88/reg.h | 2 + drivers/net/wireless/realtek/rtw88/regd.c | 85 +++++++++++++++++-- drivers/net/wireless/realtek/rtw88/regd.h | 2 + drivers/net/wireless/realtek/rtw88/rtw8822b.c | 41 +++++++++ drivers/net/wireless/realtek/rtw88/rtw8822b.h | 6 ++ drivers/net/wireless/realtek/rtw88/rtw8822c.c | 45 ++++++++++ drivers/net/wireless/realtek/rtw88/rtw8822c.h | 2 + 13 files changed, 318 insertions(+), 11 deletions(-) -- 2.17.1