aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-07 04:44:50 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-07 04:44:50 -0500
commitb59ec8dd4394cf11e3253e849a04734be6d3d694 (patch)
treefd292a460ba79a56a47fc38a15ab174750a86230
parent4bf332c785bc14e6decb6ea4949a831e7e199b8b (diff)
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>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index f7e3562542fe..771b8c573bff 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2004,11 +2004,11 @@ static int mac80211_hwsim_create_radio(int channels, const char *reg_alpha2,
2004 /* For channels > 1 DFS is not allowed */ 2004 /* For channels > 1 DFS is not allowed */
2005 hw->wiphy->n_iface_combinations = 1; 2005 hw->wiphy->n_iface_combinations = 1;
2006 hw->wiphy->iface_combinations = &data->if_combination; 2006 hw->wiphy->iface_combinations = &data->if_combination;
2007 data->if_combination.num_different_channels = data->channels;
2008 if (p2p_device) 2007 if (p2p_device)
2009 data->if_combination = hwsim_if_comb_p2p_dev[0]; 2008 data->if_combination = hwsim_if_comb_p2p_dev[0];
2010 else 2009 else
2011 data->if_combination = hwsim_if_comb[0]; 2010 data->if_combination = hwsim_if_comb[0];
2011 data->if_combination.num_different_channels = data->channels;
2012 } else if (p2p_device) { 2012 } else if (p2p_device) {
2013 hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev; 2013 hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev;
2014 hw->wiphy->n_iface_combinations = 2014 hw->wiphy->n_iface_combinations =