Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH v2] station: transition to disconnected on station_free
@ 2021-04-27 22:01 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-04-27 22:01 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

This allows station to gracefully clean up things like the diagnostic
interface which is directly tied to stations CONNECTED/DISCONNECTED
states.
---
 src/station.c | 2 ++
 1 file changed, 2 insertions(+)

v2:
 * Move out of the netdev watch and into station_free

diff --git a/src/station.c b/src/station.c
index 9c2b4e64..325175e9 100644
--- a/src/station.c
+++ b/src/station.c
@@ -3486,6 +3486,8 @@ static void station_free(struct station *station)
 	if (station->connected_bss)
 		netdev_disconnect(station->netdev, NULL, NULL);
 
+	station_enter_state(station, STATION_STATE_DISCONNECTED);
+
 	if (station->netconfig) {
 		netconfig_destroy(station->netconfig);
 		station->netconfig = NULL;
-- 
2.26.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-27 22:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-27 22:01 [PATCH v2] station: transition to disconnected on station_free James Prestwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox