diff mbox series

[26/28] cfg80211: reg: Init wiphy_idx in regulatory_hint_core()

Message ID 20180831083130.15525-27-luca@coelho.fi (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series cfg80211/mac80211 patches from our internal tree 2018-08-31 | expand

Commit Message

Luca Coelho Aug. 31, 2018, 8:31 a.m. UTC
)

From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

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.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/wireless/reg.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 043d43573ca2..0eb5e44f8a74 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2932,6 +2932,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);