Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6516274yba; Tue, 14 May 2019 08:49:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqynZBdvkBg43lPRlmSai8RWjEynsRP/N3S7oCz5eWziXhS3gLT7pmQivJguLI2UspO+VpwU X-Received: by 2002:aa7:96ec:: with SMTP id i12mr28583699pfq.82.1557848987978; Tue, 14 May 2019 08:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557848987; cv=none; d=google.com; s=arc-20160816; b=WSv811aZz+3OGdm9qKDDkE6NZczlWLs9I96wggsko753sVgSPhBjPPDBy/tOawB8aX B/MzwWAYG7T67v7OURPfpzkteD2DSBC3CZqslx31/YjidpCkijHVd28l0etTrJkYrpAW buvvGoiC0cXzkUie9WRNkDZrPEu9GHDkv0M1se5IyAIvEe0vXjMJQ8+0QQuoe0hGcXug bf8jCHiSqEn4A50QiMhWlVRZi2DBMYnW30cigyfmSlLRwlpJfzp0txsVZEiAOlQ/zOMY sjUR0kI6eeBHovMYzn/g6Hk0h98fKPj0C23dlp09wRsaCf0SvXQwDaZ1bpsfMUr/wJMo JBLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=14O3acq/MdTSGrcr8RHTBKwQjQvDxncJ9ykN3+UHGRg=; b=nN+ShdxXj5TB4QUH4HTsWGNSryoMQO0adFLqsaZE1U0y+jDiNN+pp4E7Ni2CMJTUgC AgHGqzsd39vHEYnL5jgdTUYZmT9PQPaqKsOgpYRdnn06j0ZQ8Bn/TmO9Msod3eMgjfRZ ZyI2zxmb4OE3OoNOBx2eQS/D1eSlubGcQb3smd7sbQHECXmQcNXwgjns0S/MFAhsvSK6 IZ8dhrFlMyA8ZPp17B5cZrK8SYttemBV5X2oWAe68alK0fvPyPdU0uGnNb+dEF+LomQV jOn18UsAOZ44X6lCkGqwVc82UPrZMrxCo7KUhhfLdIt2zYXfWcM5zLA90eQNTADwRdE2 ICMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=NEQbE2dj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l96si9162409plb.115.2019.05.14.08.49.33; Tue, 14 May 2019 08:49:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=NEQbE2dj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726900AbfENPrQ (ORCPT + 99 others); Tue, 14 May 2019 11:47:16 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.61.142]:35798 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726174AbfENPpl (ORCPT ); Tue, 14 May 2019 11:45:41 -0400 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 1CA92C015A; Tue, 14 May 2019 15:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1557848732; bh=QXuU1N55lDRWr8n7bWP+fpVnXNv3cPhcRH92zhbwQ5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=NEQbE2djUKsjnhcvO9OhlAvc1KgbTIUdmidFZkk/bFdY3RmGZYf9jEfSzUszkKJcz 1w5f+jf92rSs1HCeNwK1ZOV8ChgWcuknhN1TS+Ait+UxJmpXmCf56Rsuh8VChtFxaX T5MYOcnhRpbOih47ld9ZlyH+YgrpTyCxyOezD4qGvfak0V7kPS3kK0R4Xq9YOqhV5C XsGM9IrUaHvZwbASP5GEWxwuHqEAnN062AjvJpN2x85ToWoc2/Yojv8GlI42+6r+Ov zmTbrDf+ckwSWxtBZh6CMLq886eYo9cKU9hVr1WV1bv+ijeoyLEYSC34PeKkBXlIhy rebB7Yu3dxzuw== Received: from de02.synopsys.com (germany.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 495B3A024A; Tue, 14 May 2019 15:45:41 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id B54693EA2E; Tue, 14 May 2019 17:45:39 +0200 (CEST) From: Jose Abreu To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jose Abreu , Joao Pinto , "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue , Corentin Labbe Subject: [RFC net-next v2 09/14] net: stmmac: dwmac4/5: Also pass control frames while in promisc mode Date: Tue, 14 May 2019 17:45:31 +0200 Message-Id: <3771b7468888ced0b0961138b50bd244dad91d9a.1557848472.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order for the selftests to run the Flow Control selftest we need to also pass pause frames to the stack. Pass this type of frames while in promiscuous mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 3dddd7902b0f..c3cbca804bcd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -64,6 +64,7 @@ #define GMAC_PACKET_FILTER_PR BIT(0) #define GMAC_PACKET_FILTER_HMC BIT(2) #define GMAC_PACKET_FILTER_PM BIT(4) +#define GMAC_PACKET_FILTER_PCF BIT(7) #define GMAC_MAX_PERFECT_ADDRESSES 128 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 2f1a2a6f9b33..02a3a7e2db6e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -404,7 +404,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw, unsigned int value = 0; if (dev->flags & IFF_PROMISC) { - value = GMAC_PACKET_FILTER_PR; + value = GMAC_PACKET_FILTER_PR | GMAC_PACKET_FILTER_PCF; } else if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > HASH_TABLE_SIZE)) { /* Pass all multi */ -- 2.7.4