* [PATCH] adhoc: set operstate on Start/Stop
@ 2021-04-30 22:40 James Prestwood
0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-04-30 22:40 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
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)
---
src/adhoc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/adhoc.c b/src/adhoc.c
index 506e596a..7db405c5 100644
--- a/src/adhoc.c
+++ b/src/adhoc.c
@@ -494,6 +494,11 @@ static void adhoc_join_cb(struct netdev *netdev, int result, void *user_data)
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_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))
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);
return NULL;
--
2.26.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-30 22:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 22:40 [PATCH] adhoc: set operstate on Start/Stop James Prestwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.