summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <james.prestwood@linux.intel.com>2018-12-11 16:52:14 -0800
committerJohannes Berg <johannes.berg@intel.com>2018-12-18 13:13:32 +0100
commit68406a9807e4db562a157df9a958b3b6e2cedb38 (patch)
tree769871320740a2eed7a2a2f1ae2a124a0acd8aec
parentf6c7f03f69f7422bc237bc79599e152d390b74e0 (diff)
downloadlinux-68406a9807e4db562a157df9a958b3b6e2cedb38.tar.bz2
mac80211_hwsim: fix overwriting of if_combination
Moved setting if_combination.num_different_channels/radar_detect_widths into an else after use_chanctx. In the case of use_chanctx, these two settings were getting overwritten. Signed-off-by: James Prestwood <james.prestwood@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 2a5a133f23cf..e4db8e2b2b54 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2751,17 +2751,18 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
hw->wiphy->max_remain_on_channel_duration = 1000;
data->if_combination.radar_detect_widths = 0;
data->if_combination.num_different_channels = data->channels;
- }
-
- data->if_combination.n_limits = n_limits;
- data->if_combination.max_interfaces = 2048;
- data->if_combination.num_different_channels = 1;
- data->if_combination.radar_detect_widths =
+ } else {
+ data->if_combination.num_different_channels = 1;
+ data->if_combination.radar_detect_widths =
BIT(NL80211_CHAN_WIDTH_20_NOHT) |
BIT(NL80211_CHAN_WIDTH_20) |
BIT(NL80211_CHAN_WIDTH_40) |
BIT(NL80211_CHAN_WIDTH_80) |
BIT(NL80211_CHAN_WIDTH_160);
+ }
+
+ data->if_combination.n_limits = n_limits;
+ data->if_combination.max_interfaces = 2048;
data->if_combination.limits = data->if_limits;
hw->wiphy->iface_combinations = &data->if_combination;