Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1602368rdb; Wed, 20 Sep 2023 14:03:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGF1L5MixoF5270g+svFx8DCFEFWbWPwMhIQ/ZNGLBk4jfasz/pz8AkH5MF6u2yFPBxjfgl X-Received: by 2002:a17:902:cec4:b0:1b9:e9b2:124b with SMTP id d4-20020a170902cec400b001b9e9b2124bmr3775219plg.64.1695243827391; Wed, 20 Sep 2023 14:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695243827; cv=none; d=google.com; s=arc-20160816; b=gg9XXuOmtrO0x6bZfvFhLmNH9irAKtuffBFQ1FY+mPWwUg9xSWWYq+2syGTUVOXPMm /fnKk+CGuDZODbmzUbAptxVpLDQHtxEBKWPqFewB5PGxUsVwzeS+PrrkOqbtRM69wdxG /OryMpHJy2nvQb8USe8sSD1/DvWwe+DjeipQiDjCzgJoCpeED4GfXeiPWxxiCsYj63CK 9TbhHLZjjgCnXWLOeg2uXthrNPJZR6eAf5wyGZBRzjpHCD39UOre9kyXWH5eIT2mxjmd gCaYIOpnixFJKUtHyXNKl3mk20JVfArqcTAH34Vz6QlU8C95V+1NitLVbBq+igXY/4l8 ANwA== 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=RI0JcL0Dg/blmsvVNdrobdXFFeryqEiHw06CrjqV+R8=; fh=Jp47DAEBZGYKvP+QhbZP30z/2qU5MmgU1PLrOH49x2Y=; b=AoiaxQJzaTSd+0iyupx8d33yzuluaYoR/Ir53qmtgXnv8JsQyLcy/EvjGLnRaHJMN5 07Bz/7L7rFBTvmb8uzFdOYO0J7yn4XMZqy6xeRV5TuZNISD8z/TGzluo6v2J1bfDcCZk Z+MH350+vTvSiO1/i2qo3bBfsaOCNgi0+Oll4AB0O6Y4ycTaqa4EVQAJhj/ktVJM5+42 wkPZVizaIzT40189QDyWZbCC4X5la4RMt551HlRo0VpAZ/BTDlI07/1b8H0j0mLBs1i2 nawPXnlJq0jeEPM2K4i0tThF+vOcKDx0xnvMLbmKncLb2pvYmSHlddCd3I2WgOkeLeXM auaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cQQEvj41; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ik18-20020a170902ab1200b001c32d285db8si7497165plb.308.2023.09.20.14.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 14:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cQQEvj41; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 5011A81C526C; Wed, 20 Sep 2023 11:27:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbjITS1Q (ORCPT + 56 others); Wed, 20 Sep 2023 14:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbjITS1P (ORCPT ); Wed, 20 Sep 2023 14:27:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAC1D135 for ; Wed, 20 Sep 2023 11:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695234423; x=1726770423; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vMFIfQcgf3x+UuYJkACjzdW8KVt64vSMABprEsreYfI=; b=cQQEvj41aeBn+CMgWh7IJq90BjU3Snk6T698Z6RzFFDAWs0S5soY8U7K SyJUQgxajjLVW3jEMvWGOxoGb8ytNJPkmSHWszEGt+Qj70puYAyhWGn8t 8V1clDpR2yzfh3BAE/9Bd4A0ElGxGifjt82XYF3ux7txFfvCPMQ+01iRa uJXJDwNNsw4OYs9K8up/7K855aJ1KOkqdv8oQSxGoSoekJ6Up5G5TgJOM 8jiIBoo58b4qwm3/JCgJCwpYMWbpfO4OoxIy2Lg3M1GrX1lW6ZP141eoX pG5lORT4ZxuON7Z4sBPJ1s/4JkLDljNnZV4YNOXpQ7B+XY74FGBLOh59L g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="360556473" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="360556473" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="723424290" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="723424290" Received: from dmani-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.217.100]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:50 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Gregory Greenman Subject: [PATCH v2 17/18] wifi: mac80211: report per-link error during association Date: Wed, 20 Sep 2023 21:25:28 +0300 Message-Id: <20230920211508.275fc7f5c426.I8086c0fdbbf92537d6a8b8e80b33387fcfd5553d@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230920182529.659973-1-gregory.greenman@intel.com> References: <20230920182529.659973-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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:27:15 -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 c1619bb2b11d..a10b9420aa68 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