diff --git a/src/ap.c b/src/ap.c index 31d3dfc2..06f3432d 100644 --- a/src/ap.c +++ b/src/ap.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -3174,6 +3175,11 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data, l_dbus_property_changed(dbus_get_bus(), netdev_get_path(ap_if->netdev), IWD_AP_INTERFACE, "Name"); + + l_rtnl_set_linkmode_and_operstate(rtnl, + netdev_get_ifindex(ap_if->netdev), + IF_LINK_MODE_DEFAULT, IF_OPER_UP, + NULL, NULL, NULL); break; case AP_EVENT_STOPPING: @@ -3188,6 +3194,11 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data, netdev_get_path(ap_if->netdev), IWD_AP_INTERFACE, "Name"); + l_rtnl_set_linkmode_and_operstate(rtnl, + netdev_get_ifindex(ap_if->netdev), + IF_LINK_MODE_DORMANT, IF_OPER_DOWN, + NULL, NULL, NULL); + if (!ap_if->pending) ap_if->ap = NULL;