Ignore scan results in wpa_supplicant AP mode
This is needed to avoid trying to reassociate based on new scan results when using wpa_supplicant to control AP mode. This could happen if something external triggered the driver to run a scan.
This commit is contained in:
		
							parent
							
								
									979b988ed6
								
							
						
					
					
						commit
						5bc0cdb721
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		|  | @ -889,6 +889,12 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, | |||
| 	struct wpa_bss *selected; | ||||
| 	struct wpa_ssid *ssid = NULL; | ||||
| 	struct wpa_scan_results *scan_res; | ||||
| 	int ap = 0; | ||||
| 
 | ||||
| #ifdef CONFIG_AP | ||||
| 	if (wpa_s->ap_iface) | ||||
| 		ap = 1; | ||||
| #endif /* CONFIG_AP */ | ||||
| 
 | ||||
| 	wpa_supplicant_notify_scanning(wpa_s, 0); | ||||
| 
 | ||||
|  | @ -896,7 +902,7 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, | |||
| 						   data ? &data->scan_info : | ||||
| 						   NULL, 1); | ||||
| 	if (scan_res == NULL) { | ||||
| 		if (wpa_s->conf->ap_scan == 2) | ||||
| 		if (wpa_s->conf->ap_scan == 2 || ap) | ||||
| 			return; | ||||
| 		wpa_printf(MSG_DEBUG, "Failed to get scan results - try " | ||||
| 			   "scanning again"); | ||||
|  | @ -911,6 +917,12 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, | |||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| 	if (ap) { | ||||
| 		wpa_printf(MSG_DEBUG, "Ignore scan results in AP mode"); | ||||
| 		wpa_scan_results_free(scan_res); | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * Don't post the results if this was the initial cached | ||||
| 	 * and there were no results. | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen