mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 04:57:25 +01:00 
			
		
		
		
	ap: update Scanning property when AP starts
This wasn't being updated meaning the property is missing until a scan is issued over DBus. Rather than duplicate all the property changed calls they were all factored out into a helper function.
This commit is contained in:
		
							parent
							
								
									c89c37378b
								
							
						
					
					
						commit
						606769dbea
					
				
							
								
								
									
										55
									
								
								src/ap.c
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								src/ap.c
									
									
									
									
									
								
							| @ -3672,6 +3672,28 @@ struct ap_if_data { | ||||
| 	struct l_dbus_message *pending; | ||||
| }; | ||||
| 
 | ||||
| static void ap_properties_changed(struct ap_if_data *ap_if) | ||||
| { | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "Started"); | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "Name"); | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "Frequency"); | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "PairwiseCiphers"); | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "GroupCipher"); | ||||
| 	l_dbus_property_changed(dbus_get_bus(), | ||||
| 				netdev_get_path(ap_if->netdev), | ||||
| 				IWD_AP_INTERFACE, "Scanning"); | ||||
| } | ||||
| 
 | ||||
| static void ap_if_event_func(enum ap_event_type type, const void *event_data, | ||||
| 				void *user_data) | ||||
| { | ||||
| @ -3703,21 +3725,8 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data, | ||||
| 
 | ||||
| 		reply = l_dbus_message_new_method_return(ap_if->pending); | ||||
| 		dbus_pending_reply(&ap_if->pending, reply); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Started"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Name"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Frequency"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "PairwiseCiphers"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "GroupCipher"); | ||||
| 
 | ||||
| 		ap_properties_changed(ap_if); | ||||
| 
 | ||||
| 		l_rtnl_set_linkmode_and_operstate(rtnl, | ||||
| 					netdev_get_ifindex(ap_if->netdev), | ||||
| @ -3730,21 +3739,7 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data, | ||||
| 						netdev_get_path(ap_if->netdev), | ||||
| 						IWD_AP_DIAGNOSTIC_INTERFACE); | ||||
| 
 | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Started"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Name"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "Frequency"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "PairwiseCiphers"); | ||||
| 		l_dbus_property_changed(dbus_get_bus(), | ||||
| 					netdev_get_path(ap_if->netdev), | ||||
| 					IWD_AP_INTERFACE, "GroupCipher"); | ||||
| 		ap_properties_changed(ap_if); | ||||
| 
 | ||||
| 		l_rtnl_set_linkmode_and_operstate(rtnl, | ||||
| 					netdev_get_ifindex(ap_if->netdev), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood