diff options
author | Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> | 2017-07-28 01:06:44 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-08-03 11:58:10 +0200 |
commit | ea19479f68496f729ddf3f532ec94c6688279eec (patch) | |
tree | 08d496b10f661357227afa6e29494fcc46b554f8 | |
parent | qtnfmac: updates for regulatory support (diff) | |
download | linux-ea19479f68496f729ddf3f532ec94c6688279eec.tar.xz linux-ea19479f68496f729ddf3f532ec94c6688279eec.zip |
qtnfmac: regulatory configuration for self-managed setup
Regdomain information needs to be registered with cfg80211
for devices with REGULATORY_WIPHY_SELF_MANAGED flag set.
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Avinash Patil <avinashp@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 7f70b0aae069..e288b1d4432a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -873,6 +873,15 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) } ret = wiphy_register(wiphy); + if (ret < 0) + goto out; + + if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) + ret = regulatory_set_wiphy_regd(wiphy, hw_info->rd); + else if (isalpha(hw_info->rd->alpha2[0]) && + isalpha(hw_info->rd->alpha2[1])) + ret = regulatory_hint(wiphy, hw_info->rd->alpha2); + out: if (ret) { kfree(iface_comb); |