* [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
@ 2017-01-17 22:35 Rafał Miłecki
2017-01-18 4:55 ` kbuild test robot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rafał Miłecki @ 2017-01-17 22:35 UTC (permalink / raw)
To: Kalle Valo
Cc: Arend van Spriel, Franky Lin, Hante Meuleman,
Pieter-Paul Giesberts, Franky Lin, linux-wireless,
brcm80211-dev-list.pdl, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This new helper reads extra frequency limits specified in DT and
disables unavailable chanels. This is useful for devices (like home
routers) with chipsets limited e.g. by board design.
In order to respect info read from DT we simply need to check for
IEEE80211_CHAN_DISABLED bit when constructing channel info.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
This patch requires e691ac2f75b6 ("cfg80211: support ieee80211-freq-limit DT
property") that is currently in net-next.
Kalle: feel free to postpone this until merging net-next one day.
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index ec1171c..b96fc88 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5886,6 +5886,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
continue;
}
+ if (channel->orig_flags & IEEE80211_CHAN_DISABLED)
+ continue;
+
/* assuming the chanspecs order is HT20,
* HT40 upper, HT40 lower, and VHT80.
*/
@@ -6477,6 +6480,9 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
wiphy->bands[NL80211_BAND_5GHZ] = band;
}
}
+
+ wiphy_read_of_freq_limits(wiphy);
+
return 0;
}
--
2.10.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
2017-01-17 22:35 [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT Rafał Miłecki
@ 2017-01-18 4:55 ` kbuild test robot
2017-01-18 8:01 ` Kalle Valo
2017-01-18 8:03 ` Kalle Valo
2017-02-07 7:57 ` Kalle Valo
2 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2017-01-18 4:55 UTC (permalink / raw)
To: Rafał Miłecki
Cc: kbuild-all, Kalle Valo, Arend van Spriel, Franky Lin,
Hante Meuleman, Pieter-Paul Giesberts, Franky Lin, linux-wireless,
brcm80211-dev-list.pdl, Rafał Miłecki
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
Hi Rafał,
[auto build test ERROR on wireless-drivers-next/master]
[cannot apply to v4.10-rc4 next-20170117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/brcmfmac-use-wiphy_read_of_freq_limits-to-respect-limits-from-DT/20170118-122222
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: x86_64-randconfig-x013-201703 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function 'brcmf_setup_wiphy':
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:6484:2: error: implicit declaration of function 'wiphy_read_of_freq_limits' [-Werror=implicit-function-declaration]
wiphy_read_of_freq_limits(wiphy);
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/wiphy_read_of_freq_limits +6484 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
6478
6479 band->n_channels = ARRAY_SIZE(__wl_5ghz_channels);
6480 wiphy->bands[NL80211_BAND_5GHZ] = band;
6481 }
6482 }
6483
> 6484 wiphy_read_of_freq_limits(wiphy);
6485
6486 return 0;
6487 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35205 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
2017-01-18 4:55 ` kbuild test robot
@ 2017-01-18 8:01 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2017-01-18 8:01 UTC (permalink / raw)
To: kbuild test robot
Cc: Rafał Miłecki, kbuild-all, Arend van Spriel, Franky Lin,
Hante Meuleman, Pieter-Paul Giesberts, Franky Lin, linux-wireless,
brcm80211-dev-list.pdl, Rafał Miłecki
kbuild test robot <lkp@intel.com> writes:
> Hi Rafa=C5=82,
>
> [auto build test ERROR on wireless-drivers-next/master]
> [cannot apply to v4.10-rc4 next-20170117]
> [if your patch is applied to the wrong git tree, please drop us a note to=
help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/brcmfmac-us=
e-wiphy_read_of_freq_limits-to-respect-limits-from-DT/20170118-122222
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-dr=
ivers-next.git master
> config: x86_64-randconfig-x013-201703 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=3Dx86_64=20
>
> All errors (new ones prefixed by >>):
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In functi=
on 'brcmf_setup_wiphy':
>>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:6484:2: err=
or: implicit declaration of function 'wiphy_read_of_freq_limits' [-Werror=
=3Dimplicit-function-declaration]
> wiphy_read_of_freq_limits(wiphy);
> ^~~~~~~~~~~~~~~~~~~~~~~~~
The compiler error is expected as this depends on a cfg80211 patch not
yet in wireless-drivers-next.
--=20
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
2017-01-17 22:35 [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT Rafał Miłecki
2017-01-18 4:55 ` kbuild test robot
@ 2017-01-18 8:03 ` Kalle Valo
2017-02-07 7:57 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2017-01-18 8:03 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Arend van Spriel, Franky Lin, Hante Meuleman,
Pieter-Paul Giesberts, Franky Lin, linux-wireless,
brcm80211-dev-list.pdl, Rafał Miłecki
Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> writes:
> From: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
>
> This new helper reads extra frequency limits specified in DT and
> disables unavailable chanels. This is useful for devices (like home
> routers) with chipsets limited e.g. by board design.
>
> In order to respect info read from DT we simply need to check for
> IEEE80211_CHAN_DISABLED bit when constructing channel info.
>
> Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <rafal@milecki.pl>
> ---
> This patch requires e691ac2f75b6 ("cfg80211: support ieee80211-freq-limit=
DT
> property") that is currently in net-next.
>
> Kalle: feel free to postpone this until merging net-next one day.
Thanks for documenting the dependency perfectly, makes my work a lot
easier. I'm expecting to merge net-next after my next pull request, most
likely early next week.
--=20
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
2017-01-17 22:35 [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT Rafał Miłecki
2017-01-18 4:55 ` kbuild test robot
2017-01-18 8:03 ` Kalle Valo
@ 2017-02-07 7:57 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2017-02-07 7:57 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Arend van Spriel, Franky Lin, Hante Meuleman,
Pieter-Paul Giesberts, Franky Lin, linux-wireless,
brcm80211-dev-list.pdl, Rafał Miłecki
Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This new helper reads extra frequency limits specified in DT and
> disables unavailable chanels. This is useful for devices (like home
> routers) with chipsets limited e.g. by board design.
>
> In order to respect info read from DT we simply need to check for
> IEEE80211_CHAN_DISABLED bit when constructing channel info.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Patch applied to wireless-drivers-next.git, thanks.
0f83ff697356 brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT
--
https://patchwork.kernel.org/patch/9522069/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-07 7:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 22:35 [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT Rafał Miłecki
2017-01-18 4:55 ` kbuild test robot
2017-01-18 8:01 ` Kalle Valo
2017-01-18 8:03 ` Kalle Valo
2017-02-07 7:57 ` Kalle Valo
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).