@@ -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),