mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-11-04 08:57:29 +01:00 
			
		
		
		
	station: add ConnectedAccessPoint property
This property is a path that corresponds to a BasicServiceSet object, the one the station is currently connected to.
This commit is contained in:
		
							parent
							
								
									68e1d055dd
								
							
						
					
					
						commit
						a73b877c5b
					
				@ -4386,6 +4386,23 @@ static bool station_property_get_connected_network(struct l_dbus *dbus,
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool station_property_get_connected_ap(struct l_dbus *dbus,
 | 
			
		||||
					struct l_dbus_message *message,
 | 
			
		||||
					struct l_dbus_message_builder *builder,
 | 
			
		||||
					void *user_data)
 | 
			
		||||
{
 | 
			
		||||
	struct station *station = user_data;
 | 
			
		||||
 | 
			
		||||
	if (!station->connected_network)
 | 
			
		||||
		return false;
 | 
			
		||||
 | 
			
		||||
	l_dbus_message_builder_append_basic(builder, 'o',
 | 
			
		||||
			network_bss_get_path(station->connected_network,
 | 
			
		||||
						station->connected_bss));
 | 
			
		||||
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool station_property_get_scanning(struct l_dbus *dbus,
 | 
			
		||||
					struct l_dbus_message *message,
 | 
			
		||||
					struct l_dbus_message_builder *builder,
 | 
			
		||||
@ -4793,6 +4810,9 @@ static void station_setup_interface(struct l_dbus_interface *interface)
 | 
			
		||||
	l_dbus_interface_property(interface, "ConnectedNetwork", 0, "o",
 | 
			
		||||
					station_property_get_connected_network,
 | 
			
		||||
					NULL);
 | 
			
		||||
	l_dbus_interface_property(interface, "ConnectedAccessPoint", 0, "o",
 | 
			
		||||
					station_property_get_connected_ap,
 | 
			
		||||
					NULL);
 | 
			
		||||
	l_dbus_interface_property(interface, "Scanning", 0, "b",
 | 
			
		||||
					station_property_get_scanning, NULL);
 | 
			
		||||
	l_dbus_interface_property(interface, "State", 0, "s",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user