All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v5 2/2] station: remove diagnostic interface on station_free
Date: Wed, 28 Apr 2021 12:40:12 -0700	[thread overview]
Message-ID: <20210428194012.149913-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20210428194012.149913-1-prestwoj@gmail.com>

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

If station gets removed ungracefully (e.g. rfkill/hotplug) it
may not have a chance to disconnect, meaning the diagnostic
interface would remain up.
---
 src/station.c | 4 ++++
 1 file changed, 4 insertions(+)

v5:
 * called remove_interface directly as this is all we needed with
   the state transition anyways.

diff --git a/src/station.c b/src/station.c
index 0cee3525..a3a49fc9 100644
--- a/src/station.c
+++ b/src/station.c
@@ -3487,6 +3487,10 @@ static void station_free(struct station *station)
 	if (station->connected_bss)
 		netdev_disconnect(station->netdev, NULL, NULL);
 
+	l_dbus_object_remove_interface(dbus_get_bus(),
+					netdev_get_path(station->netdev),
+					IWD_STATION_DIAGNOSTIC_INTERFACE);
+
 	if (station->netconfig) {
 		netconfig_destroy(station->netconfig);
 		station->netconfig = NULL;
-- 
2.26.2

  reply	other threads:[~2021-04-28 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 19:40 [PATCH v5 1/2] station: tie diagnostic interface cleanup to DISCONNECTING James Prestwood
2021-04-28 19:40 ` James Prestwood [this message]
2021-04-28 19:46   ` [PATCH v5 2/2] station: remove diagnostic interface on station_free Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428194012.149913-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.