From patchwork Mon Jan 2 16:32:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9493849 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70CF560414 for ; Mon, 2 Jan 2017 16:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63698223B2 for ; Mon, 2 Jan 2017 16:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 582722679B; Mon, 2 Jan 2017 16:32:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D98ED223B2 for ; Mon, 2 Jan 2017 16:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933385AbdABQcc (ORCPT ); Mon, 2 Jan 2017 11:32:32 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33603 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933378AbdABQca (ORCPT ); Mon, 2 Jan 2017 11:32:30 -0500 Received: by mail-lf0-f65.google.com with SMTP id y21so40444442lfa.0; Mon, 02 Jan 2017 08:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8W4ly0t+dq+VtQbo565J3XxqFOdp5g3HP5UVMM3Fqes=; b=m9+kX8+HWHIC+rIWklPQhch1wfWc2DBAKBykW8YALtI2ysW/l4rdCnU6jcW3n9U1v3 zex3ROeXbV0gUeaGuM8GsHXEWgySYSWIRVyX1J1xIi9ku4DD1GNIxh2/y67DFYnjFkUy 8XDVroqpaXtAI45B+u8Wr1y+3cvAUUHnJom3ByRO8mHCfVfseXkaWVACVdQSRDVXhf7r yXNLV1M8iom731WjIu6bXOP5t09xrtsgNouKhnlfG7ObOo/ihJuDFVUurfV8mMBjI98C XLyZqLC8Y/UIhfOrgX93TIz874dIDdV9wb1+c4+ixHLZfxCZlR6xJGxbKlXs2vHBF9SU /qwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8W4ly0t+dq+VtQbo565J3XxqFOdp5g3HP5UVMM3Fqes=; b=PEuozZVudbvjgEmXm/b3owi+UL6HbmIFr1BqUxmJGqksRgp39jrNY/89nJM/syxcL0 0FBPMzxVRI0PchtpvJm3N0ydwnuF7VkOhGnn08ehGP/AwoVi/mZWvuGZhLCIZTaiTjOX +G1yiZSPUgWe1iYQzPRXtHfKGjIXO6MYCJ9CAi15GlxSxY6VSvP87KAPy730y5xPFEY6 ++aGgtSAqhWcCTtKHh7W1JAPlH/ZXN8UxulqZsd7ht66RGjiFyZSgOQIAvsr60MEH4fQ 2yIwV8t1bmBkOymMn6nmWjeGVT6Qu4671wHxhQypnYGfvIYIK4in7DyvNq32RnVZZEIE sEYg== X-Gm-Message-State: AIkVDXK48WAwg90H33W2+YZ9EtR/XV86xRKgBBZNhaQ1Ic3IIASagbt27Am7FnNy0ZfZnw== X-Received: by 10.25.209.73 with SMTP id i70mr16379358lfg.24.1483374748527; Mon, 02 Jan 2017 08:32:28 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id 204sm16126252ljj.33.2017.01.02.08.32.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 08:32:28 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Johannes Berg , linux-wireless@vger.kernel.org Cc: Martin Blumenstingl , Felix Fietkau , Arend van Spriel , Arnd Bergmann , devicetree@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH V3 3/2] brcmfmac: use wiphy_read_of_freq_limits to get extra limits Date: Mon, 2 Jan 2017 17:32:09 +0100 Message-Id: <20170102163209.2445-3-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170102163209.2445-1-zajec5@gmail.com> References: <20170102163209.2445-1-zajec5@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki There are some devices (e.g. Netgear R8000 home router) with one chipset model used for different radios, some of them limited to subbands. NVRAM entries don't contain any extra info on such limitations and firmware reports full list of channels to us. We need to store extra limitation info on DT to support such devices properly. Signed-off-by: Rafał Miłecki --- This patch should probably go through wireless-driver-next, I'm sending it just as a proof of concept. It was succesfully tested on SmartRG SR400ac with BCM43602. --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index ccae3bb..dab4082 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -6825,6 +6825,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, goto priv_out; brcmf_dbg(INFO, "Registering custom regulatory\n"); + wiphy_read_of_freq_limits(wiphy); wiphy->reg_notifier = brcmf_cfg80211_reg_notifier; wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG; wiphy_apply_custom_regulatory(wiphy, &brcmf_regdom);