Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31e37a68 authored by Amar Singhal's avatar Amar Singhal
Browse files

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: default avatarAmar Singhal <asinghal@codeaurora.org>
parent f56ee1db
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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,11 +2257,13 @@ 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 */
	return self_managed_found;
@@ -2298,7 +2300,7 @@ static void reg_process_pending_hints(void)

	spin_unlock(&reg_requests_lock);

	if (reg_only_self_managed_wiphys()) {
	if (reg_only_self_managed_wiphys(reg_request)) {
		reg_free_request(reg_request);
		return;
	}