OSDN Git Service

brcmfmac: setup wiphy bands after registering it first
authorRafał Miłecki <rafal@milecki.pl>
Sat, 7 Jan 2017 20:36:05 +0000 (21:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2017 14:53:15 +0000 (15:53 +0100)
commitbe5125d4fa9e5280b061195251cd581822f0faa2
treea0ef860c1b5d9bb891f04a8792bf336a6593bab7
parentc5493c6e4a6ac9f0ce5bd95ea16d2867d1c89c76
brcmfmac: setup wiphy bands after registering it first

[ Upstream commit ab99063f873749b3c3b1e5d44038559883465e74 ]

During bands setup we disable all channels that firmware doesn't support
in the current regulatory setup. If we do this before wiphy_register
it will result in copying set flags (including IEEE80211_CHAN_DISABLED)
to the orig_flags which is supposed to be persistent. We don't want this
as regulatory change may result in enabling some channels. We shouldn't
mess with orig_flags then (by changing them or ignoring them) so it's
better to just take care of their proper values.

This patch cleanups code a bit (by taking orig_flags more seriously) and
allows further improvements like disabling really unavailable channels.
We will need that e.g. if some frequencies should be disabled for good
due to hardware setup (design).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c