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:
parent
1378a3c945
commit
69f1c3321a
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user