diff --git a/src/wiphy.c b/src/wiphy.c index d279c5aa..5d52c14b 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -1496,6 +1496,11 @@ static void interface_dump_callback(struct l_genl_msg *msg, void *user_data) l_io_set_read_handler(device->eapol_io, eapol_read, device, NULL); } +struct wiphy *wiphy_find(int wiphy_id) +{ + return l_queue_find(wiphy_list, wiphy_match, L_UINT_TO_PTR(wiphy_id)); +} + static void parse_supported_commands(struct wiphy *wiphy, struct l_genl_attr *attr) { diff --git a/src/wiphy.h b/src/wiphy.h index e2a32e2a..58756b86 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -31,6 +31,8 @@ typedef void (*iwd_device_foreach_func)(struct device *, void *data); enum ie_rsn_cipher_suite wiphy_select_cipher(struct wiphy *wiphy, uint16_t mask); +struct wiphy *wiphy_find(int wiphy_id); + bool wiphy_init(struct l_genl_family *in); bool wiphy_exit(void);