mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-11-04 08:57:29 +01:00 
			
		
		
		
	netdev: Notify EVENT_DEL earlier
If we're going down, make sure to notify any watches about EVENT_DEL earlier. Not doing so might result in us not cleaning up requests that might have been started as the result of this event.
This commit is contained in:
		
							parent
							
								
									cf950f6d3f
								
							
						
					
					
						commit
						f6f5570bc8
					
				@ -802,6 +802,10 @@ static void netdev_free(void *data)
 | 
			
		||||
 | 
			
		||||
	l_debug("Freeing netdev %s[%d]", netdev->name, netdev->index);
 | 
			
		||||
 | 
			
		||||
	if (netdev->events_ready)
 | 
			
		||||
		WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
 | 
			
		||||
					netdev, NETDEV_WATCH_EVENT_DEL);
 | 
			
		||||
 | 
			
		||||
	if (netdev->neighbor_report_cb) {
 | 
			
		||||
		netdev->neighbor_report_cb(netdev, -ENODEV, NULL, 0,
 | 
			
		||||
						netdev->user_data);
 | 
			
		||||
@ -870,10 +874,6 @@ static void netdev_free(void *data)
 | 
			
		||||
		netdev->ft_ds_list = NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (netdev->events_ready)
 | 
			
		||||
		WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
 | 
			
		||||
					netdev, NETDEV_WATCH_EVENT_DEL);
 | 
			
		||||
 | 
			
		||||
	scan_wdev_remove(netdev->wdev_id);
 | 
			
		||||
 | 
			
		||||
	watchlist_destroy(&netdev->station_watches);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user