Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp273558rdb; Thu, 21 Dec 2023 08:46:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYLAJA00fPL8Idll9ocktgY1UPA7gDwPz1SVstMhFbPm/UZJyHTPCZDAKDFyBYeuBS/SnU X-Received: by 2002:a17:903:246:b0:1d3:bc96:6c13 with SMTP id j6-20020a170903024600b001d3bc966c13mr8995486plh.35.1703177176639; Thu, 21 Dec 2023 08:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703177176; cv=none; d=google.com; s=arc-20160816; b=SF+uysIo5rGCRUU4AqmeLqWVgSo6uqI8dHaVwZg4QPsboX/MPm+lRCaNCZjvgXStY2 Fbg3BxaG1XDxYsjX4BCMJpCcWWB+Qrj8fE8HUMs5H98MsRa65Nms4lhXtLq4x6f3k8fP Q9Xk2Jwe4foevLZ2eRUR4K+GtRK93lQCoxoKsrb1uHV+93+m+0OO31/LMZBQ/oW0WOop V6O7koV9HoZLjuENyRHHUf3bozQrjnw3Qwsp4HUaAlJznQBlRFcXACGoR99ZyN77NprO 7xW2vyDOkomgWuFSMwIdwHrGFH+K2JyfUZ/Rsqxs75y3JR0DuLYwmXjHTd9CU6x6aIXW I67A== 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=j6s7kkvQAOBUfRax1TIdYRfxEwtEdowAwFlbuI48dos=; fh=KsoNWtazjfstHns8t6UZ1pulwZL69aEO39vRs0LPvyo=; b=Kx4Has88MROoEgA96pAwhglQCDAcNHnUWhUHOhLDFm+odnVkiZWlF1lx19dQCiXHQ7 4DTzZLGLIPMvE+r5Cz5Zq8mKSpU77VN5XVb8+ru7SgCQDk3IgiAjF3B204n09he7GBQe H4i8DzVKMx3a2A6eV3FaGtmB7Xfd0odiaWPUqdwU95aevEQwz3UfykUFB8676Vg9ScT8 DBjnxcXSJMiOh1pc+NtuGNHzAh7xBaW6vqLIhQy8vtdYMVNowgtDUSoMey6RNHAMZYii oqkuLb0WzAkJ1nrR+/cGvPhV0TMKeKWvyD2lIfI7c3ZftLUs8mRs/Ma6AS1oD1+yqpe2 BnBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OYwblMev; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless+bounces-1159-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1159-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 t71-20020a63814a000000b005c1b323da1bsi1876627pgd.695.2023.12.21.08.46.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 08:46:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1159-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=OYwblMev; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless+bounces-1159-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1159-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 60158B24940 for ; Thu, 21 Dec 2023 16:44:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1886A627F2; Thu, 21 Dec 2023 16:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OYwblMev"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Y3mPF7xD" 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 BCD3B55E77 for ; Thu, 21 Dec 2023 16:44:14 +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=1703177044; 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=j6s7kkvQAOBUfRax1TIdYRfxEwtEdowAwFlbuI48dos=; b=OYwblMevBJEW8WoG/04VuZlgdUj6/eaphEU03z9Rg19FahZAyxIBsBjVHSmBV1uD0UeQCk BgT8QMqIjxhZJiSDHXVBF4Br+/tnLNTYcnLJj2ckx8UHek0jQIvYpUk+jGoGgkJ7C6eMfe 4ThPbZNMPl0C4c8w4oy7EYc5k9rA/W8uMRM7eZAIOStIcNBSmF6synLoqdI9ST5te3IGNl nGIl7BoIZrEZV/KYHilMCzfOYWPO0dm6NL8x93jDOC4RXiaYJfspTt82OxI16rz2Ohhnln up96lEzbspf9YWwVpgD+Xx9eIFiq/cpQ8FEeBmFm81d6P23T0Jy+GryhrVUPPw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1703177044; 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=j6s7kkvQAOBUfRax1TIdYRfxEwtEdowAwFlbuI48dos=; b=Y3mPF7xD+Gsn1dKKakAkjnRbAcxsi3d906J12HmDrBozaRe3TJG6Vif1g49XUvMnbvquw1 CkRV+UrDLnXKdzCA== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH v2 12/21] wifi: rtl8xxxu: support multiple interfaces in configure_filter() Date: Thu, 21 Dec 2023 17:43:44 +0100 Message-Id: <20231221164353.603258-13-martin.kaistra@linutronix.de> In-Reply-To: <20231221164353.603258-1-martin.kaistra@linutronix.de> References: <20231221164353.603258-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 As we only want to support AP mode/sending beacons on port 0, change from priv->vif to priv->vifs[0] in the check for AP mode. Additionally, if we are in AP mode, don't filter RX beacon and probe response frames to still allow working STATION mode on the other interface. Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 680dffb9657e1..c5b71892369c9 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -6794,8 +6794,8 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw, else rcr |= RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH; - if (priv->vif && priv->vif->type == NL80211_IFTYPE_AP) - rcr &= ~RCR_CHECK_BSSID_MATCH; + if (priv->vifs[0] && priv->vifs[0]->type == NL80211_IFTYPE_AP) + rcr &= ~(RCR_CHECK_BSSID_MATCH | RCR_CHECK_BSSID_BEACON); if (*total_flags & FIF_CONTROL) rcr |= RCR_ACCEPT_CTRL_FRAME; -- 2.39.2