3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

station: Add station_find

This commit is contained in:
Denis Kenzior 2018-09-02 22:15:41 -05:00
parent 1378a3c945
commit 69f1c3321a
2 changed files with 16 additions and 0 deletions

View File

@ -496,6 +496,21 @@ not_supported:
return NULL;
}
struct station *station_find(uint32_t ifindex)
{
const struct l_queue_entry *entry;
for (entry = l_queue_get_entries(station_list); entry;
entry = entry->next) {
struct station *station = entry->data;
if (netdev_get_ifindex(station->netdev) == ifindex)
return station;
}
return NULL;
}
struct station *station_create(struct wiphy *wiphy, struct netdev *netdev)
{
struct station *station;

View File

@ -60,5 +60,6 @@ struct handshake_state *station_handshake_setup(struct station *station,
struct network *network,
struct scan_bss *bss);
struct station *station_find(uint32_t ifindex);
struct station *station_create(struct wiphy *wiphy, struct netdev *netdev);
void station_free(struct station *station);