Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp139683rdh; Mon, 18 Dec 2023 06:39:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYBXsicO+cLtLjeddJjl4dzN4SUwCrVTejNeByp8eUstVkX330sF5Jn/tuZhiR2hfNY2PC X-Received: by 2002:a05:6358:5901:b0:172:d310:d64d with SMTP id g1-20020a056358590100b00172d310d64dmr1082424rwf.27.1702910383410; Mon, 18 Dec 2023 06:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702910383; cv=none; d=google.com; s=arc-20160816; b=j1hv18Pmz2Pi69jN03JVdCui9euiQCKnLqm7UQVGgTvGv0bnFdhppkUIs4CpSMXHfS tX5Kw5XcJP8kc2OgnXNb0G0kKo8iUrizokmom/3AoDgyZjsftptYW+DU/QrQiBWmAfRc dcBhNTqfg12hwoo+J5eBTcmFrISlGTmD/MmzzSvZOqnxWP3XquEnxYazP0BlDW+/wKte ehCA3uKtSOYjnhhnYHyDAAhIPTH7Wd/Vky5m/ksQndjJsr34kvUR+P2vnWk0kVTRY+IL HzzjSVa31Y0Lxeo8CGxraMnCjoSgaR9aVtmlRWCpvMz5URmSxJcX03qE1HWM45r9xMRW SmBg== 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=ILeYXLyZzn3UARL0UAlnYpv8NwrUpQyxGl9/DdeQ9yY=; fh=KsoNWtazjfstHns8t6UZ1pulwZL69aEO39vRs0LPvyo=; b=ktSkmV2+MpKDdUL1QgufBWE7CzZMU/9gayM2XzXrpwEW0UdbQVUUnLY3+lKdrVJ0eP 9b6plYVMVveBBOCzkRCtjfteziAQ2ZtRu7pPMlFHL6tJC7r/erB/6jhrNHhO4pZbRtbi 8anroweXtzc+qgPr3vT6D9ZBRFJNLit5fM1gKjw0OCpMiU/Rt4j1OlRa9xMf+CMBPKl6 kXE6DwmixwoAnq5l4vYf+Qrib2QQtxfYNQX1JaIbLno6xmuWRN01v1eYg68VZxYOld4P 2Y3mSg/shzlv6iQAPjYr48LaCiI2ETfxuMq8YmE2WySKhcmspvCsMrMD2Qla8dEqP/xt XJtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vaRcre4I; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-wireless+bounces-916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-916-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. [147.75.48.161]) by mx.google.com with ESMTPS id p7-20020a635b07000000b005cda46a7c8dsi1268105pgb.798.2023.12.18.06.39.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 06:39:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vaRcre4I; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-wireless+bounces-916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-916-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 A0F7BB22E30 for ; Mon, 18 Dec 2023 14:37:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DFEB3787E; 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="vaRcre4I"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d4qMrxg0" 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 6094B101DB 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=1702910229; 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=ILeYXLyZzn3UARL0UAlnYpv8NwrUpQyxGl9/DdeQ9yY=; b=vaRcre4ICpupNl+2bsG7WABrbNLzfqZGr7hZLEIDJyLVXSwBVPMMPBwp4RbjpyILCT3zX3 9gKA8WPeSXpDuUSKb8pLFRmItffP7cp51kU3DSw26JNbmnHiZLdoWlmhAU2PDNIzU4aIvl rb+B2dEJLwGIU1V3bnXC5ITUSP8dKJAh9a+FXnFF7Xhd0Ts6GrqJxjZrtU2P8i2oQKOB51 5rTAkVoWV1p6/X4WZekWmfT9JrBblkVVM/sZWINeyejGcBbixbcPFBaK9/0m8VoEOIoz+p PTQcuBbP20DZFxpqqgbONd4x32nrDWYg/V005QA1Y0urkw+Kra+a5NErJamBGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702910229; 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=ILeYXLyZzn3UARL0UAlnYpv8NwrUpQyxGl9/DdeQ9yY=; b=d4qMrxg0+onBi3d6SpscDSHYpttsNNnFNRbevKfpqLsgRo6fzZtwaaJFvUuNv319EexFjW 3YaY+WCBGnZXXTBg== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH 11/20] wifi: rtl8xxxu: support multiple interfaces in configure_filter() Date: Mon, 18 Dec 2023 15:36:36 +0100 Message-Id: <20231218143645.433356-12-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 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 --- 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 6683ff0f4d8c7..f54d7b1647792 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -6782,8 +6782,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