From patchwork Tue Feb 4 17:42:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 862099 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 817902163AA for ; Tue, 4 Feb 2025 17:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738691017; cv=none; b=Ns0hvFUR+GZRMofTS0vclQthv8sqrf4wpXaj/objaWNedT5o8fw1L22XX1MR7WvDRdL3hUf5NN6EtsvfT8KomyNxxd1P0X/7yRJzeXS0RqwMoPDpM3xlrtc3OEP8PEaVGznWr24yD+5PwMwC2VuXIe9VoQyiAebs2WuMPhi3n7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738691017; c=relaxed/simple; bh=rSm6LXx7JvYtiHgCc1JuZ2gdgSUIvmh46dzZk8SCGXc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YexGnCTVizgTgVwZP1Bjl4JBiljEpkK9TTEFcj34gjKo5tUPFBgrmOLyEom0OmKzonDrph9/MgCPSdycn15FmsB/t8ctTxP6DKRPQ4KUNbgLXrqCPeWE6SrTrPw8j6SwgDJx/LcKFzSqf0M4SwXoG/Hsaqu9LmXvIITOsmKPqn0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RazaQm3I; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RazaQm3I" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738691016; x=1770227016; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rSm6LXx7JvYtiHgCc1JuZ2gdgSUIvmh46dzZk8SCGXc=; b=RazaQm3ICokE5JXpRPmLNTNtUvtpDCFpZaqDbUEZhEyK63LXwrvrlptt IyBxY1wDl8WuqHg7fEGtuVZxJXp4uYOWxbIGWHI2I6xrzK67qFRS8GQZF OKAGJsxG8eEDRAYBbMNiyPolFr0Mb/rAeM9OxvgMjpwLINk4JErMfLMuY YcxEFkaRKellMFWT4569bpTJgxcBpsm55SEus4FcGdYo43P3cs7kbg3sC o4Wd7LoDuqtEwf9wcX2x2evaUAecFLINLZSy47+PeynNBOQGjmqY4G/Lp AIqueODlP5MQqeTnB4aiaczRon0cLWW9jPvlgAH8Ynfm4UV24sGyv0V3b g==; X-CSE-ConnectionGUID: lL3CjKHnTQi1zLmWbu6n/Q== X-CSE-MsgGUID: 9CbYag1rTHyrJoVeYViYLQ== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="64585429" X-IronPort-AV: E=Sophos;i="6.13,259,1732608000"; d="scan'208";a="64585429" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2025 09:42:53 -0800 X-CSE-ConnectionGUID: wFtOgTrrT4m21Wt8j+JuGg== X-CSE-MsgGUID: uYarqxnkQgakKTULuZzwqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,259,1732608000"; d="scan'208";a="115696783" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2025 09:42:52 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 12/20] wifi: mac80211: set ieee80211_prep_tx_info::link_id upon Auth Rx Date: Tue, 4 Feb 2025 19:42:09 +0200 Message-Id: <20250204193721.d640f0cb6480.I1fc5c0da26b143f5b07191eb592f01f7083d55ae@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250204174217.1161638-1-miriam.rachel.korenblit@intel.com> References: <20250204174217.1161638-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Emmanuel Grumbach This will be used by the low level driver. Note that link_id will be 0 in case of a non-MLO authentication. Also fix a call-site of mgd_prepare_tx() where the link_id was not populated. Update the documentation to reflect the current state ieee80211_prep_tx_info::link_id is also available in mgd_complete_tx(). Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- include/net/mac80211.h | 4 ++-- net/mac80211/driver-ops.h | 3 ++- net/mac80211/mlme.c | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 398d4e30b0db..22d32419e8a0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -7,7 +7,7 @@ * Copyright 2007-2010 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2024 Intel Corporation + * Copyright (C) 2018 - 2025 Intel Corporation */ #ifndef MAC80211_H @@ -3830,7 +3830,7 @@ enum ieee80211_reconfig_type { * @was_assoc: set if this call is due to deauth/disassoc * while just having been associated * @link_id: the link id on which the frame will be TX'ed. - * Only used with the mgd_prepare_tx() method. + * 0 for a non-MLO connection. */ struct ieee80211_prep_tx_info { u16 duration; diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 5acecc7bd4a9..307587c8a003 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -2,7 +2,7 @@ /* * Portions of this file * Copyright(c) 2016 Intel Deutschland GmbH -* Copyright (C) 2018-2019, 2021-2024 Intel Corporation +* Copyright (C) 2018-2019, 2021-2025 Intel Corporation */ #ifndef __MAC80211_DRIVER_OPS @@ -955,6 +955,7 @@ static inline void drv_mgd_complete_tx(struct ieee80211_local *local, return; WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_STATION); + info->link_id = info->link_id < 0 ? 0 : info->link_id; trace_drv_mgd_complete_tx(local, sdata, info->duration, info->subtype, info->success); if (local->ops->mgd_complete_tx) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 49d2796654ed..8879f82878b4 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8,7 +8,7 @@ * Copyright 2007, Michael Wu * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2024 Intel Corporation + * Copyright (C) 2018 - 2025 Intel Corporation */ #include @@ -4725,6 +4725,8 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction); status_code = le16_to_cpu(mgmt->u.auth.status_code); + info.link_id = ifmgd->auth_data->link_id; + if (auth_alg != ifmgd->auth_data->algorithm || (auth_alg != WLAN_AUTH_SAE && auth_transaction != ifmgd->auth_data->expected_transaction) ||