Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v3 2/3] netdev: only call connect_ok in station/p2p_client mode
Date: Tue, 27 Apr 2021 16:34:51 -0700	[thread overview]
Message-ID: <20210427233452.97024-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20210427233452.97024-1-prestwoj@gmail.com>

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

netdev_connect_ok is only for station/p2p_client modes but AP
also ends up on the same code path. Check the iftype before
calling netdev_connect_ok.
---
 src/netdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/netdev.c b/src/netdev.c
index 252ae78a..e9fa241f 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -1337,7 +1337,9 @@ static void try_handshake_complete(struct netdev_handshake_state *nhs)
 		nhs->complete = true;
 		handshake_event(&nhs->super, HANDSHAKE_EVENT_COMPLETE);
 
-		netdev_connect_ok(nhs->netdev);
+		if (nhs->netdev->type == NL80211_IFTYPE_STATION ||
+				nhs->netdev->type == NL80211_IFTYPE_P2P_CLIENT)
+			netdev_connect_ok(nhs->netdev);
 	}
 }
 
-- 
2.26.2

  reply	other threads:[~2021-04-27 23:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 23:34 [PATCH v3 1/3] station: transition to disconnected on station_free James Prestwood
2021-04-27 23:34 ` James Prestwood [this message]
2021-04-28 16:36   ` [PATCH v3 2/3] netdev: only call connect_ok in station/p2p_client mode Denis Kenzior
2021-04-27 23:34 ` [PATCH v3 3/3] ap: set link/operstate on AP start/stop James Prestwood

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=20210427233452.97024-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox