diff --git a/src/netdev.c b/src/netdev.c index 8e25b555..5cdf99ed 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -1358,6 +1358,18 @@ static void netdev_link_notify(uint16_t type, const void *data, uint32_t len, } } +void netdev_new_wiphy_hint(uint32_t wiphy_id) +{ + struct l_genl_msg *msg; + + msg = l_genl_msg_new_sized(NL80211_CMD_GET_INTERFACE, 8); + l_genl_msg_append_attr(msg, NL80211_ATTR_WIPHY, 4, &wiphy_id); + + if (!l_genl_family_dump(nl80211, msg, netdev_get_interface_callback, + NULL, NULL)) + l_error("Getting wiphy %d interface info failed", wiphy_id); +} + static bool netdev_watch_match(const void *a, const void *b) { const struct netdev_watch *item = a; diff --git a/src/netdev.h b/src/netdev.h index aeb3003f..50f42040 100644 --- a/src/netdev.h +++ b/src/netdev.h @@ -69,6 +69,7 @@ int netdev_disconnect(struct netdev *netdev, netdev_disconnect_cb_t cb, void *user_data); struct netdev *netdev_find(int ifindex); +void netdev_new_wiphy_hint(uint32_t wiphy_id); uint32_t netdev_watch_add(struct netdev *netdev, netdev_watch_func_t func, void *user_data);