From patchwork Wed Nov 15 00:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kenzior X-Patchwork-Id: 13456153 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1F0328E6 for ; Wed, 15 Nov 2023 00:06:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZY/RRs0y" Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-58a0154b4baso165523eaf.1 for ; Tue, 14 Nov 2023 16:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700006797; x=1700611597; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AiE+vwFltgMwkcCQf1Egh7JIrottearILzKHJRFydCM=; b=ZY/RRs0yNjrEly9UONuiN7Fz4izgvWfQ+ua90LXYI7iWI7ngtXgGFE9VtlIQGU8d+k NCSEBIueoHbxSHmYv3rwP5opaeLdxhl+NGoNbNuoO3wxfS+P201LqnGuSJbAQf5qvAIE agyVrF9SNagl/2by7D1zUqQDVTI3Ps4Gj0zUCcryHqNBUxNngv2LuUlVu2c99O1PJ9q2 Vz72a5Hh7sA7RroErRodvxRJ15XroN71e415isD5VsmfHNbx3jRK6e2adq31+cVOJS+Y iXTz8/8hKQ74fW0d+2rJh8CSSoUf7wDpdNeFx/MEqH/L8B7Wr1yGZIGYwdgbFG41pBT7 W0SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700006797; x=1700611597; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AiE+vwFltgMwkcCQf1Egh7JIrottearILzKHJRFydCM=; b=ORNww7xy+mZ+JfUipXiWh3AH/UvHya0p0ZXkL1R/wzS5ml5dxsRH3o3EVaNgktj9Tm Hc4vvWHv231Vl0QPYzHFYXChlf3WDRxewL7whngBQPwJ8t27PscZBbmNEHLr6oG20FkM 8ivnkHu0Pt26BBu2ByjB5L4/LCXpwl++b/jQpRpXYMvGots54U3vGHQ2KTsWTF0n2w0b aCVnfD6PGRBvodfx8+VOnLQ6W2fw/wd9wBwQfvPnzktbVuGw7BTLQPLbWpnTtb8qP2eQ YwfzQanmEisR0bV9RktfmsCa8Gf87KktpeyxD/IAounLTeGqTJ2Y4ekkzoU2ZORsY6ih jZJQ== X-Gm-Message-State: AOJu0Yw4xXEmuV5J8ckNYf8Vo+7rNNIgBPm8LEhlzy5ajM3tVKihKLS9 UVBUPoMqa6FxoZbxaThNckwZAmFWAZk= X-Google-Smtp-Source: AGHT+IG8Nk/XF5de+9uo/h0OzkexyHAAbMUR8LrM6LCPOW8Jl4dwDcbKFxtcb0zOK9Ic7BE+Lrujfg== X-Received: by 2002:a05:6871:918b:b0:1e9:88e0:b8ba with SMTP id ak11-20020a056871918b00b001e988e0b8bamr1866260oac.29.1700006797389; Tue, 14 Nov 2023 16:06:37 -0800 (PST) Received: from localhost.localdomain (cpe-70-114-247-242.austin.res.rr.com. [70.114.247.242]) by smtp.gmail.com with ESMTPSA id pi5-20020a056871d10500b001e578de89cesm1607468oac.37.2023.11.14.16.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 16:06:36 -0800 (PST) From: Denis Kenzior To: iwd@lists.linux.dev Cc: Denis Kenzior Subject: [PATCH 1/3] netdev: Remove improper use of netdev_connect_failed Date: Tue, 14 Nov 2023 18:05:31 -0600 Message-ID: <20231115000547.1139157-1-denkenz@gmail.com> X-Mailer: git-send-email 2.42.0 Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When a roam event is received, iwd generates a firmware scan request and notifies its event filter of the ROAMING condition. In cases where the firmware scan could not be started successfully, netdev_connect_failed is invoked. This is not a correct use of netev_connect_failed since it doesn't actually disconnect the underlying netdev and the reflected state becomes de-synchronized from the underlying kernel device. The firmware scan request could currently fail for two reasons: 1. nl80211 genl socket is in a bad state, or 2. the scan context does not exist Since both reasons are highly unlikely, simply use L_WARN instead. The other two cases where netdev_connect_failed is used could only occur if the kernel message is invalid. The message is ignored in that case and a warning is printed. The situation described above also exists in netdev_get_fw_scan_cb. If the scan could not be completed successfully, there's not much iwd can do to recover. Have iwd remain in roaming state and print an error. --- src/netdev.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index ffd903740dd9..4a418b60abcf 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -4934,7 +4934,7 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list, if (err < 0) { l_error("Failed to get scan after roam (%d)", err); - goto failed; + return false; } /* @@ -4946,7 +4946,7 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list, if (!bss) { l_error("Roam target BSS not found in scan results"); - goto failed; + return false; } netdev->fw_roam_bss = bss; @@ -4958,16 +4958,9 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list, return false; } - if (netdev->sm) { - if (!eapol_start(netdev->sm)) - goto failed; - } - - return false; + if (netdev->sm) + L_WARN_ON(!eapol_start(netdev->sm)); -failed: - netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED, - MMPDU_REASON_CODE_UNSPECIFIED); return false; } @@ -4998,8 +4991,8 @@ static void netdev_roam_event(struct l_genl_msg *msg, struct netdev *netdev) netdev->operational = false; - if (!l_genl_attr_init(&attr, msg)) - goto failed; + if (L_WARN_ON(!l_genl_attr_init(&attr, msg))) + return; while (l_genl_attr_next(&attr, &type, &len, &data)) { switch (type) { @@ -5014,7 +5007,7 @@ static void netdev_roam_event(struct l_genl_msg *msg, struct netdev *netdev) if (!mac) { l_error("Failed to parse ATTR_MAC from CMD_ROAM"); - goto failed; + return; } /* Handshake completed in firmware, just get the roamed BSS */ @@ -5031,20 +5024,14 @@ static void netdev_roam_event(struct l_genl_msg *msg, struct netdev *netdev) get_fw_scan: handshake_state_set_authenticator_address(netdev->handshake, mac); - if (!scan_get_firmware_scan(netdev->wdev_id, netdev_get_fw_scan_cb, - netdev, NULL)) - goto failed; + if (L_WARN_ON(!scan_get_firmware_scan(netdev->wdev_id, + netdev_get_fw_scan_cb, + netdev, NULL))) + return; if (netdev->event_filter) netdev->event_filter(netdev, NETDEV_EVENT_ROAMING, NULL, netdev->user_data); - - return; -failed: - l_error("Failed to properly handle the ROAM event -- submit logs!"); - netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED, - MMPDU_REASON_CODE_UNSPECIFIED); - } static void netdev_send_sa_query_delay(struct l_timeout *timeout, From patchwork Wed Nov 15 00:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kenzior X-Patchwork-Id: 13456154 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 423BF28EC for ; Wed, 15 Nov 2023 00:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FitahZQH" Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1f06931e4f7so3928168fac.1 for ; Tue, 14 Nov 2023 16:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700006798; x=1700611598; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eIeB21Yn2AOV7ZKs1uuikdot7pFXqPWZ9PNzJx6bmA4=; b=FitahZQHWZyfG+GO8SJxtGkdDWvs0NzW2hoxeT5lCRxdQ+M9L4qEU6qkpnuKOyCDy0 z3XjBTeHy+Wi2pVIN5KLVTZkcNQRHI/shUv8e/AjQnU/9hGUVEmBxaD+h3JDnXAXWIn8 2pcz29r53Q7+lqesRs4AfEahcWNzJwTNAsUuY6XI4WShPoHIWaybYNb7m3ZyPEdKNaXi +iNf0WY4y0YK2udGQCEz5HjOkgJiBQnuGrtPC1thsMBl3xJTeh7Kc+hJ9UIZky6RWJxW grI9hpT/05SXneGwE/hEspfFbRY9uTcM94cs414wCUKYQ07K6u+4Q1BLcBTqE7b3HhCu DUjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700006798; x=1700611598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eIeB21Yn2AOV7ZKs1uuikdot7pFXqPWZ9PNzJx6bmA4=; b=oFdNTFyjTAXB0TifBrJ3tG2r2M8ARvXz03hKmZKslZOgHApB8ch5sugGCoylwaSpGP tX7BIyl7exoOHkpVsl0cec16lNWbEDwqtX6Fg3uJjFewcBFsQi7ujXvuVhcVao5AdPeh FDP0bOWjhzMreduHht4lQLMwv8Cx74vWosBUqfruu9DFLVsBbC+RkU42xaiEFmGt3Q7O IKCkQIN4Xpsc4OSRhqYMCfXQtQo9BEgG7pBIhTPW6DhkRJpGbsBVwKySEPZf/wwM5rEy aJcsSfnqMtIYdFBoZVNuOFbLCufKIIxxr9raEMvIFVbGx2NZpaR4rKTdNPMrWBgswBIm CLyg== X-Gm-Message-State: AOJu0YzLtv97xS80RqmQUZzOzIIqXhrDYXo+qAHl2mFg/n/4UO5Ltxa9 bykhk8C11oOQH57gZRpUD2JvCQD9HU0= X-Google-Smtp-Source: AGHT+IH5jHlt0iBAxFrx5LIBQW4iP/BhAkETgVdH8+z4NS792ZiT8qQxEYUG8TB9ppGjNzK3vfnbkw== X-Received: by 2002:a05:6871:2304:b0:1e9:9c34:af67 with SMTP id sf4-20020a056871230400b001e99c34af67mr13211042oab.18.1700006798492; Tue, 14 Nov 2023 16:06:38 -0800 (PST) Received: from localhost.localdomain (cpe-70-114-247-242.austin.res.rr.com. [70.114.247.242]) by smtp.gmail.com with ESMTPSA id pi5-20020a056871d10500b001e578de89cesm1607468oac.37.2023.11.14.16.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 16:06:37 -0800 (PST) From: Denis Kenzior To: iwd@lists.linux.dev Cc: Denis Kenzior Subject: [PATCH 2/3] netdev: Simplify netdev_auth_cb error logic Date: Tue, 14 Nov 2023 18:05:32 -0600 Message-ID: <20231115000547.1139157-2-denkenz@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231115000547.1139157-1-denkenz@gmail.com> References: <20231115000547.1139157-1-denkenz@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 --- src/netdev.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index 4a418b60abcf..327be768d3d9 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -3240,25 +3240,22 @@ static void netdev_auth_cb(struct l_genl_msg *msg, void *user_data) l_debug("Error during auth: %d", err); - if (!netdev->auth_cmd || err != -ENOENT) { - netdev_connect_failed(netdev, - NETDEV_RESULT_AUTHENTICATION_FAILED, - MMPDU_STATUS_CODE_UNSPECIFIED); - return; - } + if (!netdev->auth_cmd || err != -ENOENT) + goto failed; /* Kernel can't find the BSS in its cache, scan and retry */ scan_msg = scan_build_trigger_scan_bss(netdev->index, netdev->wiphy, netdev->frequency, hs->ssid, hs->ssid_len); - if (!l_genl_family_send(nl80211, scan_msg, - netdev_scan_cb, netdev, NULL)) { - l_genl_msg_unref(scan_msg); - netdev_connect_failed(netdev, - NETDEV_RESULT_AUTHENTICATION_FAILED, + if (l_genl_family_send(nl80211, scan_msg, + netdev_scan_cb, netdev, NULL) > 0) + return; + + l_genl_msg_unref(scan_msg); +failed: + netdev_connect_failed(netdev, NETDEV_RESULT_AUTHENTICATION_FAILED, MMPDU_STATUS_CODE_UNSPECIFIED); - } } static void netdev_new_scan_results_event(struct l_genl_msg *msg, From patchwork Wed Nov 15 00:05:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kenzior X-Patchwork-Id: 13456155 Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B138428E6 for ; Wed, 15 Nov 2023 00:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MqGrpBZi" Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-1e98e97c824so172824fac.1 for ; Tue, 14 Nov 2023 16:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700006800; x=1700611600; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q0v60YZ7b6Sd1B13M5XWy/VqJzabCw3poKyadAxbGkg=; b=MqGrpBZiSY4tQBR1nNB1hvi2ONz+BFpEO2f1HjSFjNkUd0VdR29VFdXMjP3G0+u+Is uFZGmYEHnV+kRcKF4H8U1uI9XjGMQWHg/YDkO/011h3UOFkj0XhzTWJ+tAxcbWPCKCUo BMXRpVp1nXFt7mZQvqEHydWbFUXE8VLLTaDGUD6WTnZVIxc68x6rjs4NAgygYCOLj8yg S1JKXbwUviORacIMhdGS57CzgMqkzib6m2IwKpa/iCUrxySAGHTkfauA+IC8aIuYMkZ4 fIMndDt5mOOLWdgFEMB3KrxHh7oHjxQ7rbiv0zeWb/h59ahT3rpDKASz8ommnOcD87U0 8DyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700006800; x=1700611600; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q0v60YZ7b6Sd1B13M5XWy/VqJzabCw3poKyadAxbGkg=; b=oOrQhet2PRrQjCKClAj236/s1gg7OGiS6/yYIBDg5QgNX2vtQ5wmRUF5zP7JxnaG4T DEZtiDjPTrAYIDuqGz2Ob64ZWd2GHyTl4oTs2bexvyOLuvG3T2CmjCe/kswJJtdJkNbC us9+OfR8yJ4v55DH2pwgtUiptbG4lrS4Dfj8BdGjQGBnQxxfNxcfttE7hM4TyoZCXcQi SuluuFgG2xDjMCb4cOwF2PucE+dVV5XXXmw+Rtml8ro5S8m69geTgIENSGrPsZ4fWt4g OWJTv+O4PCfdzb4Q4wDLpRIqGI5BX/bHXo6Kf5c2AAppME5mblIqibbg1hiki5hi29ER YlzA== X-Gm-Message-State: AOJu0Yz0vPSCwH1GarXbhfYmHF6qHK/VgQmx9CmFEDdNYkdvcKgeCeFr lYc6MIUqAHlihkJhb2cYoAzY9R2piGw= X-Google-Smtp-Source: AGHT+IEmuxA2kbJ9tZm5CZ7WddmJs+9fkRJkgaGQENEF+0pTEoQ9Hg2ZMKtO9wvw1qjepeM5QypjAg== X-Received: by 2002:a05:6870:3d93:b0:1e9:d3bd:3ec with SMTP id lm19-20020a0568703d9300b001e9d3bd03ecmr2329359oab.22.1700006799877; Tue, 14 Nov 2023 16:06:39 -0800 (PST) Received: from localhost.localdomain (cpe-70-114-247-242.austin.res.rr.com. [70.114.247.242]) by smtp.gmail.com with ESMTPSA id pi5-20020a056871d10500b001e578de89cesm1607468oac.37.2023.11.14.16.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 16:06:39 -0800 (PST) From: Denis Kenzior To: iwd@lists.linux.dev Cc: Denis Kenzior Subject: [PATCH 3/3] netdev: Separate connect_failed and disconnected paths Date: Tue, 14 Nov 2023 18:05:33 -0600 Message-ID: <20231115000547.1139157-3-denkenz@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231115000547.1139157-1-denkenz@gmail.com> References: <20231115000547.1139157-1-denkenz@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit c59669a366c5 ("netdev: disambiguate between disconnection types") introduced different paths for different types of disconnection notifications from netdev. Formalize this further by having netdev_connect_failed only invoke connect_cb. Disconnections that could be triggered outside of connection related events are now handled on a different code path. For this purpose, netdev_disconnected() is introduced. --- src/netdev.c | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index 327be768d3d9..e31a51617671 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -839,7 +839,6 @@ static void netdev_connect_failed(struct netdev *netdev, uint16_t status_or_reason) { netdev_connect_cb_t connect_cb = netdev->connect_cb; - netdev_event_func_t event_filter = netdev->event_filter; void *connect_data = netdev->user_data; /* Done this way to allow re-entrant netdev_connect calls */ @@ -847,15 +846,6 @@ static void netdev_connect_failed(struct netdev *netdev, if (connect_cb) connect_cb(netdev, result, &status_or_reason, connect_data); - else if (event_filter) { - /* NETDEV_EVENT_DISCONNECT_BY_SME expects a reason code */ - if (result != NETDEV_RESULT_HANDSHAKE_FAILED) - status_or_reason = MMPDU_REASON_CODE_UNSPECIFIED; - - event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_SME, - &status_or_reason, - connect_data); - } } static void netdev_connect_failed_cb(struct l_genl_msg *msg, void *user_data) @@ -900,12 +890,42 @@ static void netdev_deauth_and_fail_connection(struct netdev *netdev, netdev_send_and_fail_connection(netdev, result, status_code, msg); } +/* + * If we have a connection callback pending, either through netdev_connect + * or netdev_reassociate, then invoke that callback with the @result and + * @status_or_reason. Otherwise, invoke the event callback with the @event + * and @status_or_reason. + * + * This is useful for situations where handshaking or setting keys somehow + * fails (perhaps due to rekeying), or if the device is removed / brought + * down when keys are being set as a result of a rekey + */ +static void netdev_disconnected(struct netdev *netdev, + enum netdev_result result, + enum netdev_event event, + uint16_t status_or_reason) +{ + netdev_event_func_t event_filter = netdev->event_filter; + void *event_data = netdev->user_data; + + if (netdev->connect_cb) { + netdev_connect_failed(netdev, result, status_or_reason); + return; + } + + netdev_connect_free(netdev); + + if (event_filter) + event_filter(netdev, event, &status_or_reason, event_data); +} + static void netdev_disconnect_by_sme_cb(struct l_genl_msg *msg, void *user_data) { struct netdev *netdev = user_data; netdev->disconnect_cmd_id = 0; - netdev_connect_failed(netdev, netdev->result, netdev->last_code); + netdev_disconnected(netdev, netdev->result, + NETDEV_EVENT_DISCONNECT_BY_SME, netdev->last_code); } static void netdev_disconnect_by_sme(struct netdev *netdev, @@ -1440,7 +1460,8 @@ static void netdev_setting_keys_failed(struct netdev_handshake_state *nhs, * CMD_DISCONNECT */ if (err == -ENETDOWN) { - netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED, + netdev_disconnected(netdev, NETDEV_RESULT_ABORTED, + NETDEV_EVENT_DISCONNECT_BY_SME, MMPDU_STATUS_CODE_UNSPECIFIED); return; }