mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									4bf332c785
								
							
						
					
					
						commit
						b59ec8dd43
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -2004,11 +2004,11 @@ static int mac80211_hwsim_create_radio(int channels, const char *reg_alpha2,
 | 
				
			||||||
		/* For channels > 1 DFS is not allowed */
 | 
							/* For channels > 1 DFS is not allowed */
 | 
				
			||||||
		hw->wiphy->n_iface_combinations = 1;
 | 
							hw->wiphy->n_iface_combinations = 1;
 | 
				
			||||||
		hw->wiphy->iface_combinations = &data->if_combination;
 | 
							hw->wiphy->iface_combinations = &data->if_combination;
 | 
				
			||||||
		data->if_combination.num_different_channels = data->channels;
 | 
					 | 
				
			||||||
		if (p2p_device)
 | 
							if (p2p_device)
 | 
				
			||||||
			data->if_combination = hwsim_if_comb_p2p_dev[0];
 | 
								data->if_combination = hwsim_if_comb_p2p_dev[0];
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			data->if_combination = hwsim_if_comb[0];
 | 
								data->if_combination = hwsim_if_comb[0];
 | 
				
			||||||
 | 
							data->if_combination.num_different_channels = data->channels;
 | 
				
			||||||
	} else if (p2p_device) {
 | 
						} else if (p2p_device) {
 | 
				
			||||||
		hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev;
 | 
							hw->wiphy->iface_combinations = hwsim_if_comb_p2p_dev;
 | 
				
			||||||
		hw->wiphy->n_iface_combinations =
 | 
							hw->wiphy->n_iface_combinations =
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue