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

Commit 5e499139 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Mihir Shete
Browse files

regulatory: use correct regulatory initiator on wiphy register



The current regdomain was not always set by the core. This causes
cards with a custom regulatory domain to ignore user initiated changes
if done before the card was registered.

Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Acked-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: 23df0b731954502a9391e739b92927cee4360343
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


CRs-Fixed: 569424
Change-Id: Ia5462145a27f5ecdd7a1eb9f4235992f7a801097
[smihir@codeaurora.org: resolve minor merge conflicts]
Signed-off-by: default avatarMihir Shete <smihir@codeaurora.org>
parent 5f4d31f2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2304,12 +2304,15 @@ int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env)

void wiphy_regulatory_register(struct wiphy *wiphy)
{
	struct regulatory_request *lr;

	mutex_lock(&reg_mutex);

	if (!reg_dev_ignore_cell_hint(wiphy))
		reg_num_devs_support_basehint++;

	wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
	lr = get_last_request();
	wiphy_update_regulatory(wiphy, lr->initiator);

	mutex_unlock(&reg_mutex);
}