Received: by 2002:ac8:7144:0:b0:40f:fb00:664b with SMTP id h4csp1887889qtp; Mon, 18 Sep 2023 07:06:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7WnP3uotvS58AFiwP81a5je+KU4xiQ+oCkakvz8Bw7BVBu43sYRUje5+H4f7OmLREHPVT X-Received: by 2002:a05:6a21:18b:b0:153:616c:7ca4 with SMTP id le11-20020a056a21018b00b00153616c7ca4mr10280511pzb.61.1695045993536; Mon, 18 Sep 2023 07:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695045993; cv=none; d=google.com; s=arc-20160816; b=ZzXmebWK3TKfvIeBJdVvb7iVIeShyLZQBS59FnA2eJOQWD2xAfA5DzbqrE1ohihRZR g0Efp/964BNPgtPyEH3MakUkg6jEAW0tT1q1zOxOfQPgMwRF3KIbH1KARLRyTck832aL vXxW61ZtCTp5ZBn4XWYgTF9v5ugtv6CklJxY3KK62jw9K05+fXU1qc0s59cAOnGp5ksJ POCQyTyNj3AQa+fDpjZJ0s6Awp6DVt3AEXlTkwxUk5vfXAWrJwmkh/b7vjs4cp9FDGuv wlViIgNXYRYT2pJ7rw9KVdP1bBtilZoJiutJffpKCAagXFnuUJwqw4fpz6DVnCGPuUTQ kTIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/binjghNGynt/iUVJx9MZXb6RlnRTqCaElHdwHqqfI4=; fh=Jp47DAEBZGYKvP+QhbZP30z/2qU5MmgU1PLrOH49x2Y=; b=P5GxGfj+yadAakxZIHn60HIFO/A4V9JXa3VJJZfzmBce5NSXzC54kGMJ+7EfgsF/ah X1iyyxtiwylFO7ztWXVmC3ZS+3feQh3PYM3Vm616XzBq7gkv/PfI0+0af+ObVquE+i2Y E1pearODBOX2EdQG6JyNsqUTmmFAbwrbb0gpmEeAs27ttV6aJPykwR6uf2W727VYDbB9 9d+rOolZNq4cExRYf2t9ZFh6s18UXZVcyIkYJaugKSP7hdhVxRve5LnAyqUqLPasRIZw DBLrC2hGuGWEOpTPrNCBq7eGmkVryjB7+DvzVycpHFD6gN5rOVOBGS3XdCeKSyksNZs2 cA+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Loe6bch2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id r69-20020a632b48000000b00573f9dbea23si7848405pgr.431.2023.09.18.07.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 07:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Loe6bch2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B9DE480E5BA2; Mon, 18 Sep 2023 04:13:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241345AbjIRLNW (ORCPT + 57 others); Mon, 18 Sep 2023 07:13:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241470AbjIRLMl (ORCPT ); Mon, 18 Sep 2023 07:12:41 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B16812D for ; Mon, 18 Sep 2023 04:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695035538; x=1726571538; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NFilMmbnn7Vd6N15dlNaVBm9ojE3sYiSH1o2VqK/saY=; b=Loe6bch22O1H2D6fE47HqaJivfNB43lDo1XSTnNtHtHGGIJCRhTaf31T Tp5BdJQ/rWOSvt+LeTklplsQWkwWTrP9D2gNytNUWjpA1ZvQwPUT6UsZA UkDjOICu03RnV3INBZRGpV78iqgKCRn6vyPgbWOyEA2n8LysG8pfkeIa5 6CicUAoNui6wkhsscxbvwL+yXyLmSqpsVukgdsNp1NWxmnMhRM6r72WT9 QBBmPPGK7wk5pC/jJI8FyopNATeWtux0575XV7NEfY54d/ts99Wt3MT6d 6DmwYLeYmCjsGMTp6kMv4EZ75zfm+NgcES4eMlWYjp746vuK+n419bjpF w==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="378535986" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="378535986" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:12:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="861025581" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="861025581" Received: from guyarad-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.215.14]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:12:16 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Gregory Greenman Subject: [PATCH 17/18] wifi: mac80211: report per-link error during association Date: Mon, 18 Sep 2023 14:11:02 +0300 Message-Id: <20230918140607.043589fb2a4d.I8086c0fdbbf92537d6a8b8e80b33387fcfd5553d@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230918111103.435195-1-gregory.greenman@intel.com> References: <20230918111103.435195-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 04:13:46 -0700 (PDT) From: Benjamin Berg With this cfg80211 can report the link that caused the error to userspace which is then able to react to it by e.g. removing the link from the association and retrying. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman --- net/mac80211/mlme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7d69fd2713a8..10a762816146 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -7889,8 +7889,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, /* only calculate the flags, hence link == NULL */ err = ieee80211_prep_channel(sdata, NULL, assoc_data->link[i].bss, &assoc_data->link[i].conn_flags); - if (err) + if (err) { + req->links[i].error = err; goto err_clear; + } } /* needed for transmitting the assoc frames properly */ -- 2.38.1