Commit 411a3f25 authored by Andrei Otcheretianski's avatar Andrei Otcheretianski Committed by Greg Kroah-Hartman

cfg80211: reg: Init wiphy_idx in regulatory_hint_core()

[ Upstream commit 24f33e64fcd0d50a4b1a8e5b41bd0257aa66b0e8 ]

Core regulatory hints didn't set wiphy_idx to WIPHY_IDX_INVALID. Since
the regulatory request is zeroed, wiphy_idx was always implicitly set to
0. This resulted in updating only phy #0.
Fix that.

Fixes: 806a9e39 ("cfg80211: make regulatory_request use wiphy_idx instead of wiphy")
Signed-off-by: 's avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: 's avatarLuca Coelho <luciano.coelho@intel.com>
[add fixes tag]
Signed-off-by: 's avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
parent 1e97d6b1
......@@ -2298,6 +2298,7 @@ static int regulatory_hint_core(const char *alpha2)
request->alpha2[0] = alpha2[0];
request->alpha2[1] = alpha2[1];
request->initiator = NL80211_REGDOM_SET_BY_CORE;
request->wiphy_idx = WIPHY_IDX_INVALID;
queue_regulatory_request(request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment