3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

station: Emit PropertiesChanged on the Station interface too

This commit is contained in:
Andrew Zaborowski 2018-09-08 03:05:21 +02:00 committed by Denis Kenzior
parent 18aa744099
commit 854ce2b062

View File

@ -537,6 +537,8 @@ static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex, int err,
if (station->scanning) {
station->scanning = false;
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "Scanning");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "Scanning");
}
@ -559,6 +561,8 @@ static void periodic_scan_trigger(int err, void *user_data)
struct l_dbus *dbus = dbus_get_bus();
station->scanning = true;
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "Scanning");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "Scanning");
}
@ -572,6 +576,8 @@ static void periodic_scan_stop(struct station *station)
if (station->scanning) {
station->scanning = false;
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "Scanning");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "Scanning");
}
@ -611,9 +617,12 @@ static void station_enter_state(struct station *station,
disconnected = station->state <= STATION_STATE_AUTOCONNECT;
if ((disconnected && state > STATION_STATE_AUTOCONNECT) ||
(!disconnected && state != station->state))
(!disconnected && state != station->state)) {
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "State");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "State");
}
switch (state) {
case STATION_STATE_AUTOCONNECT:
@ -701,6 +710,8 @@ static void station_reset_connection_state(struct station *station)
station->connected_bss = NULL;
station->connected_network = NULL;
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "ConnectedNetwork");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "ConnectedNetwork");
l_dbus_property_changed(dbus, network_get_path(network),
@ -1597,6 +1608,8 @@ int __station_connect_network(struct station *station, struct network *network,
station_enter_state(station, STATION_STATE_CONNECTING);
l_dbus_property_changed(dbus, netdev_get_path(netdev),
IWD_STATION_INTERFACE, "ConnectedNetwork");
l_dbus_property_changed(dbus, netdev_get_path(netdev),
IWD_DEVICE_INTERFACE, "ConnectedNetwork");
l_dbus_property_changed(dbus, network_get_path(network),
@ -1891,6 +1904,8 @@ static void station_dbus_scan_triggered(int err, void *user_data)
dbus_pending_reply(&station->scan_pending, reply);
station->scanning = true;
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_STATION_INTERFACE, "Scanning");
l_dbus_property_changed(dbus, netdev_get_path(station->netdev),
IWD_DEVICE_INTERFACE, "Scanning");
}