diff mbox series

[v2,2/5] station: add station_get_autoconnect

Message ID 20240722182932.4091008-2-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/5] dpp: factor out PKEX/DPP start prep into function | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood July 22, 2024, 6:29 p.m. UTC
Gets the current autoconenct setting. This is not the current
autoconnect state. Will be used in DPP to reset station's autoconnect
setting back to what it was prior to DPP, in case of failure.
---
 src/station.c | 5 +++++
 src/station.h | 1 +
 2 files changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/src/station.c b/src/station.c
index ca0e6a38..db069981 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1726,6 +1726,11 @@  bool station_set_autoconnect(struct station *station, bool autoconnect)
 	return true;
 }
 
+bool station_get_autoconnect(struct station *station)
+{
+	return station->autoconnect;
+}
+
 static void station_roam_state_clear(struct station *station)
 {
 	l_debug("%u", netdev_get_ifindex(station->netdev));
diff --git a/src/station.h b/src/station.h
index a38327e4..50f0be12 100644
--- a/src/station.h
+++ b/src/station.h
@@ -88,6 +88,7 @@  uint32_t station_add_event_watch(station_event_watch_func_t func,
 void station_remove_event_watch(uint32_t id);
 
 bool station_set_autoconnect(struct station *station, bool autoconnect);
+bool station_get_autoconnect(struct station *station);
 
 int __station_connect_network(struct station *station, struct network *network,
 				struct scan_bss *bss, enum station_state state);