From: Amar Singhal <asinghal@xxxxxxxxxxxxxx> Call regulatory notifier conditionally for self managed hints during wiphy registration. Call when regulatory hint source is NL80211_REGDOM_SET_BY_USER and sub-type is NL80211_USER_REG_HINT_CELL_BASE. Call the notifier with last reg-domain request. This is needed to allow trusted regulatory domain changes to be processed by the driver. Signed-off-by: Amar Singhal <asinghal@xxxxxxxxxxxxxx> Signed-off-by: Kiran Kumar Lokere <klokere@xxxxxxxxxxxxxx> Signed-off-by: Jouni Malinen <jouni@xxxxxxxxxxxxxx> --- net/wireless/reg.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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); } -- 2.7.4