From f996bea880475847a73d3ddffafc34fbbe817fee Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 4 Sep 2018 16:26:13 -0500 Subject: [PATCH] station: Add station_is_busy --- src/station.c | 9 +++++++++ src/station.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/station.c b/src/station.c index 82cda211..6240b760 100644 --- a/src/station.c +++ b/src/station.c @@ -61,6 +61,15 @@ struct network *station_get_connected_network(struct station *station) return station->connected_network; } +bool station_is_busy(struct station *station) +{ + if (station->state != STATION_STATE_DISCONNECTED && + station->state != STATION_STATE_AUTOCONNECT) + return true; + + return false; +} + struct autoconnect_entry { uint16_t rank; struct network *network; diff --git a/src/station.h b/src/station.h index f1e55d89..c24f7e9d 100644 --- a/src/station.h +++ b/src/station.h @@ -70,6 +70,7 @@ struct station { struct wiphy *station_get_wiphy(struct station *station); struct netdev *station_get_netdev(struct station *station); struct network *station_get_connected_network(struct station *station); +bool station_is_busy(struct station *station); void station_autoconnect_next(struct station *station); void station_add_autoconnect_bss(struct station *station,