mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 04:57:25 +01:00 
			
		
		
		
	knownnetworks: use band_freq_to_channel to verify known freqs
With the addition of 6GHz '6000' is no longer the maximum frequency that could be in .known_network.freq. For more robustness band_freq_to_channel is used to validate the frequency.
This commit is contained in:
		
							parent
							
								
									778dacd262
								
							
						
					
					
						commit
						1c5a2da046
					
				| @ -45,6 +45,7 @@ | ||||
| #include "src/scan.h" | ||||
| #include "src/util.h" | ||||
| #include "src/watchlist.h" | ||||
| #include "src/band.h" | ||||
| 
 | ||||
| static struct l_queue *known_networks; | ||||
| static size_t num_known_hidden_networks; | ||||
| @ -856,7 +857,8 @@ static struct l_queue *known_frequencies_from_string(char *freq_set_str) | ||||
| 
 | ||||
| 		t = strtoul(freq_set_str, &freq_set_str, 10); | ||||
| 
 | ||||
| 		if (unlikely(errno == ERANGE || !t || t > 6000)) | ||||
| 		if (unlikely(errno == ERANGE || !t || | ||||
| 					!band_freq_to_channel(t, NULL))) | ||||
| 			goto error; | ||||
| 
 | ||||
| 		known_freq = l_new(struct known_frequency, 1); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood