linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Cc: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
	"Felix Fietkau" <nbd@nbd.name>,
	"Arend van Spriel" <arend@broadcom.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	devicetree@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
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	[thread overview]
Message-ID: <20170102163209.2445-3-zajec5@gmail.com> (raw)
In-Reply-To: <20170102163209.2445-1-zajec5@gmail.com>

From: Rafał Miłecki <rafal@milecki.pl>

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 <rafal@milecki.pl>
---
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);
-- 
2.10.1

      parent reply	other threads:[~2017-01-02 16:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 16:32 [PATCH V3 1/2] dt-bindings: document common IEEE 802.11 frequency limit property Rafał Miłecki
2017-01-02 16:32 ` [PATCH V3 2/2] cfg80211: support ieee80211-freq-limit DT property Rafał Miłecki
2017-01-02 17:52   ` Johannes Berg
2017-01-02 20:12     ` Arend van Spriel
2017-01-02 22:16       ` Rafał Miłecki
2017-01-03  7:00       ` Johannes Berg
2017-01-02 22:12     ` Rafał Miłecki
2017-01-03  7:06       ` Johannes Berg
2017-01-02 16:32 ` Rafał Miłecki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170102163209.2445-3-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=nbd@nbd.name \
    --cc=rafal@milecki.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).