Message ID | 1520106021-16836-2-git-send-email-jouni@codeaurora.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Johannes Berg |
Headers | show |
So I really think this should just be one patch - it's not about "registration semantics" but about which types of requests get passed to reg_notifier(), and if you do it in one place you'd better also do it in the other. Secondly, this changes behaviour - not only for ath which presumably is what you want, but also for * brcmfmac * brcmsmac * libertas * mwifiex * mt76 * qtnfmac * rtlwifi (& its staging cousin) * rsi * wlcore * rtl8723bs (staging) So I'm not really convinced we should do this unconditionally. johannes
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 4f25a11b..48eaa8d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -3518,15 +3518,21 @@ void wiphy_regulatory_register(struct wiphy *wiphy) { struct regulatory_request *lr; - /* self-managed devices ignore external hints */ - if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) + lr = get_last_request(); + + /* self-managed devices ignore beacon hints and 11d IE */ + if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) { wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS | REGULATORY_COUNTRY_IE_IGNORE; + if (lr->initiator == NL80211_REGDOM_SET_BY_USER && + lr->user_reg_hint_type == NL80211_USER_REG_HINT_CELL_BASE) + reg_call_notifier(wiphy, lr); + } + if (!reg_dev_ignore_cell_hint(wiphy)) reg_num_devs_support_basehint++; - lr = get_last_request(); wiphy_update_regulatory(wiphy, lr->initiator); wiphy_all_share_dfs_chan_state(wiphy); }