public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3 1/4] dpp: remove duplicate connected network check
@ 2023-11-13 17:53 James Prestwood
  2023-11-13 17:53 ` [PATCH v3 2/4] dpp: add station watch to DPP James Prestwood
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: James Prestwood @ 2023-11-13 17:53 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

---
 src/dpp.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

v3:
 * Just removed the extra check. Requiring DISCONNECTED is a bit
   strict since its ok if station is in an autoconnecting state
   (just as long as it doesn't actually connect)

diff --git a/src/dpp.c b/src/dpp.c
index 23010a05..3a740916 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -4001,14 +4001,8 @@ static uint32_t *dpp_default_freqs(struct dpp_sm *dpp, size_t *out_len)
 static bool dpp_start_pkex_enrollee(struct dpp_sm *dpp, const char *key,
 				const char *identifier)
 {
-	struct station *station = station_find(netdev_get_ifindex(dpp->netdev));
 	_auto_(l_ecc_point_free) struct l_ecc_point *qi = NULL;
 
-	if (station && station_get_connected_network(station)) {
-		l_debug("Already connected, disconnect before enrolling");
-		return false;
-	}
-
 	if (identifier)
 		dpp->pkex_id = l_strdup(identifier);
 
@@ -4120,7 +4114,7 @@ static struct l_dbus_message *dpp_dbus_pkex_start_enrollee(struct l_dbus *dbus,
 				dpp->interface != DPP_INTERFACE_UNBOUND)
 		return dbus_error_busy(message);
 
-	if (station_get_connected_network(station))
+	if (station && station_get_connected_network(station))
 		return dbus_error_busy(message);
 
 	if (!dpp_parse_pkex_args(message, &key, &id))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-16 15:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 17:53 [PATCH v3 1/4] dpp: remove duplicate connected network check James Prestwood
2023-11-13 17:53 ` [PATCH v3 2/4] dpp: add station watch to DPP James Prestwood
2023-11-13 17:54 ` [PATCH v3 3/4] dpp: fix fragile scan/connecting logic James Prestwood
2023-11-16 15:18   ` Denis Kenzior
2023-11-16 15:51     ` James Prestwood
2023-11-13 17:54 ` [PATCH v3 4/4] dpp: scan to pick up extra frequencies when enrolling James Prestwood

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