Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp139759rdh; Mon, 18 Dec 2023 06:39:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAXcSYeNQPQOhyfiTwZ7wpTqgD2VJx4MlSDdasaL4iSZe5iJsK4UlkYGY8RwWcRQPkEMYK X-Received: by 2002:a17:903:18a:b0:1d0:acd4:e711 with SMTP id z10-20020a170903018a00b001d0acd4e711mr22712857plg.15.1702910390962; Mon, 18 Dec 2023 06:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702910390; cv=none; d=google.com; s=arc-20160816; b=PkgVNSSXZP+SJaT3Rfe9/p+wl8njwpc8VZslwJ51w3Q+88TW02O99xMMDbJ1qNubNQ JaO4U2eEDRxNO6BtybFX9VVH3u96Efk7v+ZPGWvUIVa4QHHQP7CJUJyPDmCATyp4JGYz fyfBks7kqSADDBpLDKpx38ArV8lk02hCcbEX9/N0gF/XhWxKQfm4D5/gWiEGnl35QmWM VJXa3KIU2alF1cXj+FoWeaz3rtmucmHxrEX4bDxb7HAHC88S7XILHl3AhoZOoaQq5bg+ 8eXs8lRqf8IcBMTPA3+TVQ9Rb1Z41R9oYhf8/JoXK7sk4U5PIFjK1qL3BLi6GW7pBOOA XE2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=gD6FlXg8fJCspALTklpM7SCQ1whYQouNEOtnvE39Xhk=; fh=KsoNWtazjfstHns8t6UZ1pulwZL69aEO39vRs0LPvyo=; b=ToicpGTzM/Wa/ssnfhH8NJwjAHjU2RBJfWcZsQno8ujZDWO1vzvNfbtdtKW1+dVIiA RzPeb5n2cC0Vc5OdoiFQkDv/KEiAOIQVELFBrgCk5kiZLpsn25Vmemmv1alicuehxmd7 lXlOj4DWsdPtCLnK2/5aN0zSLX+QLH+tcB7kGax6G9fpfEvQnSwcoJmF3zPlJzrA+q7Z T5FktD+0VDvzrRIbejAaMhCGFfXuw7h+FUEY+7BIxevMP1Sg0Hdt7oxnnlPgiusxuHRg WjQZQbTQS5+MqEvi/FGcFOVlqWj3Vqzq0lqSEqi886EovoWdAprH/m8bnzx9FBTtQj2O 6p+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qORbmYsV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ItlK5PDY; spf=pass (google.com: domain of linux-wireless+bounces-919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ix10-20020a170902f80a00b001d3be63dde9si1613361plb.457.2023.12.18.06.39.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 06:39:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qORbmYsV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ItlK5PDY; spf=pass (google.com: domain of linux-wireless+bounces-919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2EFD6B22CB4 for ; Mon, 18 Dec 2023 14:37:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADDC73A1D5; Mon, 18 Dec 2023 14:37:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qORbmYsV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ItlK5PDY" X-Original-To: linux-wireless@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9FEBC3A1C8 for ; Mon, 18 Dec 2023 14:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Martin Kaistra DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702910228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gD6FlXg8fJCspALTklpM7SCQ1whYQouNEOtnvE39Xhk=; b=qORbmYsVRSnTwHw1gM1+FP0nEeInpMfBSEdXNKEc66dsmyWPHwd1gFk9V3TBIhs0TjQksS m81Dl/R1tFC8cTuAbhK8FP9KxeDpe8fT5pVNvP1xVJMYIyfRmC4Q8RjrC1eGLxzeNhO7e5 qGWx7GwijE28f2+67z6ovLX4/T+vWR+5aYnLMVS7CEyghvk/HgZqpTOoh1mdrhuxq/ntWF jLayXkOYfZgePbtiIeiPnyID4CBj0l7fx1YksG1kgp7ugjYIlvPWUFVBlpg7fU88liDaQA 3q6cXuQ0bQHlMyhB+vnyLHxieJSxRhCJhWfLas0DSAfZRfbha7RrXj4W6tVc2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702910228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gD6FlXg8fJCspALTklpM7SCQ1whYQouNEOtnvE39Xhk=; b=ItlK5PDYP3qqhdEyQfwmUeUZZ+vHTohDwqMjN7keJoRpQjPVvVcs9K+YWj8qmUcmcSyT6p MHDQKlbPz/IR1dBQ== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH 09/20] wifi: rtl8xxxu: support multiple interfaces in set_aifs() Date: Mon, 18 Dec 2023 15:36:34 +0100 Message-Id: <20231218143645.433356-10-martin.kaistra@linutronix.de> In-Reply-To: <20231218143645.433356-1-martin.kaistra@linutronix.de> References: <20231218143645.433356-1-martin.kaistra@linutronix.de> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In concurrent mode supported by this driver, both interfaces will use the same channel and same wireless mode. It is therefore possible to get the wireless mode by checking the first connected interface. Signed-off-by: Martin Kaistra --- .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 2b546bce01237..827e715f0e585 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -4913,14 +4913,18 @@ static void rtl8xxxu_set_aifs(struct rtl8xxxu_priv *priv, u8 slot_time) u8 aifs, aifsn, sifs; int i; - if (priv->vif) { - struct ieee80211_sta *sta; + for (i = 0; i < ARRAY_SIZE(priv->vifs); i++) { + if (priv->vifs[i]) { + struct ieee80211_sta *sta; - rcu_read_lock(); - sta = ieee80211_find_sta(priv->vif, priv->vif->bss_conf.bssid); - if (sta) - wireless_mode = rtl8xxxu_wireless_mode(priv->hw, sta); - rcu_read_unlock(); + rcu_read_lock(); + sta = ieee80211_find_sta(priv->vifs[i], priv->vifs[i]->bss_conf.bssid); + if (sta) + wireless_mode = rtl8xxxu_wireless_mode(priv->hw, sta); + rcu_read_unlock(); + } + if (wireless_mode) + break; } if (priv->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ || -- 2.39.2