diff options
| author | Amar Singhal <asinghal@codeaurora.org> | 2017-05-04 14:24:08 -0700 |
|---|---|---|
| committer | Amar Singhal <asinghal@codeaurora.org> | 2018-02-04 09:28:38 -0800 |
| commit | 31e37a680dcbb02ba41d17972dba0b298cf1983d (patch) | |
| tree | 407aec60e46b7375214de6c4af88a954e49b4379 /net/wireless/reg.c | |
| parent | f56ee1db81df6aa9432b7a62eaa8f4dc4a750e6a (diff) | |
reg: qcom: call regulatory callback for self managed hints
Currently, kernel ignores the regulatory hint if wiphy flag
REGULATORY_WIPHY_SELF_MANAGED is set. This would lead to drop of
hints sent directly to kernel from user-space. To fix, call the driver
callback with the request.
CRs-Fixed: 2183721
Change-Id: Ic6d17ce8c3e9b889f618f3494672020bb1c98c42
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Diffstat (limited to 'net/wireless/reg.c')
| -rw-r--r-- | net/wireless/reg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 26ac0a4808a0..f3fc9a36b473 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2247,7 +2247,7 @@ out_free: reg_free_request(reg_request); } -static bool reg_only_self_managed_wiphys(void) +static bool reg_only_self_managed_wiphys(struct regulatory_request *reg_request) { struct cfg80211_registered_device *rdev; struct wiphy *wiphy; @@ -2257,10 +2257,12 @@ static bool reg_only_self_managed_wiphys(void) list_for_each_entry(rdev, &cfg80211_rdev_list, list) { wiphy = &rdev->wiphy; - if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) + if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) { self_managed_found = true; - else + reg_call_notifier(wiphy, reg_request); + } else { return false; + } } /* make sure at least one self-managed wiphy exists */ @@ -2298,7 +2300,7 @@ static void reg_process_pending_hints(void) spin_unlock(®_requests_lock); - if (reg_only_self_managed_wiphys()) { + if (reg_only_self_managed_wiphys(reg_request)) { reg_free_request(reg_request); return; } |
