Skip to content

Commit b59ec8d

Browse files
committed
mac80211_hwsim: fix number of channels in interface combinations
There's little point in setting the number of channels if the entire combination struct is overwritten again later - that was clearly intended the other way around, fix it. Reported-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 4bf332c commit b59ec8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,11 +2004,11 @@ static int mac80211_hwsim_create_radio(int channels, const char *reg_alpha2,
20042004
/* For channels > 1 DFS is not allowed */
20052005
hw->wiphy->n_iface_combinations = 1;
20062006
hw->wiphy->iface_combinations = &data->if_combination;
2007-
data->if_combination.num_different_channels = data->channels;
20082007
if (p2p_device)
20092008
data->if_combination = hwsim_if_comb_p2p_dev[0];
20102009
else
20112010
data->if_combination = hwsim_if_comb[0];
2011+
data->if_combination.num_different_channels = data->channels;
20122012
} else if (p2p_device) {
20132013
hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev;
20142014
hw->wiphy->n_iface_combinations =

0 commit comments

Comments
 (0)