commit f996bea880475847a73d3ddffafc34fbbe817fee
parent 5e2cce2e0b308eecaf05b4176c0b21a71f5f5c02
Author: Denis Kenzior <denkenz@gmail.com>
Date: Tue, 4 Sep 2018 16:26:13 -0500
station: Add station_is_busy
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git 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
@@ -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,