cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 5 Sep 2018 05:06:12 +0000 (08:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:37 +0000 (14:52 +0100)
commitd46c334f07f5f67cf0fc56a1e8dace1a97f8b908
treede9f49ff17659a11adced6c4be83ba5b602c0432
parentb0be0d83fc6894337b807cbf66ee66e001caf89b
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: 806a9e39670b ("cfg80211: make regulatory_request use wiphy_idx instead of wiphy")
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
[add fixes tag]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/reg.c