mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 02:02:33 +01:00
adhoc: set operstate on Start/Stop
Similar to 06aa84cca
set the operstate when AdHoc is started and
stopped as it is no longer always set by netdev (only for station/p2p
interface types)
This commit is contained in:
parent
29dd246f5e
commit
8606bd6435
10
src/adhoc.c
10
src/adhoc.c
@ -494,6 +494,11 @@ static void adhoc_join_cb(struct netdev *netdev, int result, void *user_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l_rtnl_set_linkmode_and_operstate(iwd_get_rtnl(),
|
||||||
|
netdev_get_ifindex(adhoc->netdev),
|
||||||
|
IF_LINK_MODE_DEFAULT, IF_OPER_UP,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
adhoc->sta_watch_id = netdev_station_watch_add(netdev,
|
adhoc->sta_watch_id = netdev_station_watch_add(netdev,
|
||||||
adhoc_station_changed_cb, adhoc);
|
adhoc_station_changed_cb, adhoc);
|
||||||
|
|
||||||
@ -649,6 +654,11 @@ static struct l_dbus_message *adhoc_dbus_stop(struct l_dbus *dbus,
|
|||||||
if (netdev_leave_adhoc(adhoc->netdev, adhoc_leave_cb, adhoc))
|
if (netdev_leave_adhoc(adhoc->netdev, adhoc_leave_cb, adhoc))
|
||||||
return dbus_error_failed(message);
|
return dbus_error_failed(message);
|
||||||
|
|
||||||
|
l_rtnl_set_linkmode_and_operstate(iwd_get_rtnl(),
|
||||||
|
netdev_get_ifindex(adhoc->netdev),
|
||||||
|
IF_LINK_MODE_DORMANT, IF_OPER_DOWN,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
adhoc->pending = l_dbus_message_ref(message);
|
adhoc->pending = l_dbus_message_ref(message);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user