Skip to content

Commit

Permalink
cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
Browse files Browse the repository at this point in the history
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: 806a9e3 ("cfg80211: make regulatory_request use wiphy_idx instead of wiphy")
Signed-off-by: Andrei Otcheretianski <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
[add fixes tag]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
aotchere authored and jmberg-intel committed Sep 5, 2018
1 parent 94a5b3a commit 24f33e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,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);

Expand Down

0 comments on commit 24f33e6

Please sign in to comment.