mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge "cfg80211: never ignore user regulatory hint"
This commit is contained in:
commit
6cb440e89c
@ -1691,7 +1691,9 @@ static void wiphy_update_regulatory(struct wiphy *wiphy,
|
||||
* as some drivers used this to restore its orig_* reg domain.
|
||||
*/
|
||||
if (initiator == NL80211_REGDOM_SET_BY_CORE &&
|
||||
wiphy->regulatory_flags & REGULATORY_CUSTOM_REG)
|
||||
wiphy->regulatory_flags & REGULATORY_CUSTOM_REG &&
|
||||
!(wiphy->regulatory_flags &
|
||||
REGULATORY_WIPHY_SELF_MANAGED))
|
||||
reg_call_notifier(wiphy, lr);
|
||||
return;
|
||||
}
|
||||
@ -2243,26 +2245,6 @@ static void notify_self_managed_wiphys(struct regulatory_request *request)
|
||||
}
|
||||
}
|
||||
|
||||
static bool reg_only_self_managed_wiphys(void)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev;
|
||||
struct wiphy *wiphy;
|
||||
bool self_managed_found = false;
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
|
||||
wiphy = &rdev->wiphy;
|
||||
if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
|
||||
self_managed_found = true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/* make sure at least one self-managed wiphy exists */
|
||||
return self_managed_found;
|
||||
}
|
||||
|
||||
/*
|
||||
* Processes regulatory hints, this is all the NL80211_REGDOM_SET_BY_*
|
||||
* Regulatory hints come on a first come first serve basis and we
|
||||
@ -2295,10 +2277,6 @@ static void reg_process_pending_hints(void)
|
||||
spin_unlock(®_requests_lock);
|
||||
|
||||
notify_self_managed_wiphys(reg_request);
|
||||
if (reg_only_self_managed_wiphys()) {
|
||||
reg_free_request(reg_request);
|
||||
return;
|
||||
}
|
||||
|
||||
reg_process_hint(reg_request);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user