Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4696712yba; Wed, 8 May 2019 00:53:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5dF3St6E8jrNelReA/4zEBeloeT1qCvyCdcKFP1QxYv1vzIOIR1WlXHj8DJreRiQ1DeOj X-Received: by 2002:a17:902:8bca:: with SMTP id r10mr45638761plo.67.1557302022019; Wed, 08 May 2019 00:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557302022; cv=none; d=google.com; s=arc-20160816; b=nSOwN92esVa1jI132Hg5L+7K9DPXBH1VJ95i55IQPZcrNMmnU7qhRJR6coNg7J2n6K DQYzWnUllraVS7KduNGj9njj7nudk0LzA43xYly2921H2v3kTdyIqUCQrRdEWrVHyVqM HUS/1t8tD/kZqcMIrtySkE8S82YUb4rI8e31KdKu2hginQhett789Vw2eBLACIVtKZOq 9cVUZfiAXuH6AKubEGhWOuXj1KIgZMnJqU0tleP5mKe+LtQEHR8Z9FvBmOon+bbTOXKC VMC8gkG+q12W1cTKzXKlg2Yd//1L7DX0Tmc3mRYYgmMvVtKruEBZmGlpeP94oUbWinjg LeYw== 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=ihW9aLD9O1ta0gUhAwadVoLJiqEgwrmfmkH3pn5ToMo=; b=pdqp2fwaz90S/t/4uOD0D+LO7FQeiU1LFdpLdXOwwdEHR7u4tAXfj34abxhWjzj8g/ hiFh2bJm73LdRcYRPWumf/NdBs9z/j2I24G3Wmics/dCArHztKCcfRUukuLBJPMJb/Zl pTg3ZMZTKgybRkNJvtTqnD6m56zphHXYgNXawHYQOc/hGGoFazy4mqOZ4DfVodaEDPhm Z3SmbFNmcRK8DDLT5JONK0dsQRpwwZHhspe5I7Jl+R8RhijXZE9GmfP520pWWpOePCbe GgR239eRhi5rimsJOjTITnovnk4Pe4n6Mbx6SHUHNv9ytJ2dbcjf/s3DJqZv1/EeSXaC GIzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=gZGR55yo; 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 bg2si22129160plb.117.2019.05.08.00.53.26; Wed, 08 May 2019 00:53:42 -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=gZGR55yo; 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 S1726771AbfEHHv7 (ORCPT + 99 others); Wed, 8 May 2019 03:51:59 -0400 Received: from dc8-smtprelay2.synopsys.com ([198.182.47.102]:56524 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726476AbfEHHva (ORCPT ); Wed, 8 May 2019 03:51:30 -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 3AE11C00F3; Wed, 8 May 2019 07:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1557301893; bh=fWgB9Ny93mClVBJJxGQQRvjftxPGjarT+amG5YS65hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=gZGR55yooVWA/914gOAPIRyJxELMhjeQGdutBW5bx+blJEtYIgIOHUob9uVlQoq1v zDsR7kmxVEU/ALEdALsPZ7+CoUwxM87BRWr5tEGRi4R7B76tXlVImqlld7zuU4jkCZ DiLtbIVv43roBXztNOBeSMT+8KPJTxMJ/VjiucmuF83iF3wHVa1BnsDkaMoEwbOK+z wTHk3tAWtlZxF5yTDmkYoKGXWVgv+PafG0cVUKEbCtYsVdA6ICGi4xvMcg5MW49mka hwVdEH28MklG+FgHMX+cYrhenq0zoXQOwqypNyIaVo5dvGLEao5iOrUirTWaDK2G4W d6RMjJd2EoPOg== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 72605A02D4; Wed, 8 May 2019 07:51:29 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id C70853D52B; Wed, 8 May 2019 09:51:27 +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 Subject: [PATCH net-next 07/11] net: stmmac: dwmac1000: Also pass control frames while in promisc mode Date: Wed, 8 May 2019 09:51:07 +0200 Message-Id: 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 control 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 --- drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h index 184ca13c8f79..56a69fb6f0b9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -146,6 +146,7 @@ enum inter_frame_gap { #define GMAC_FRAME_FILTER_DAIF 0x00000008 /* DA Inverse Filtering */ #define GMAC_FRAME_FILTER_PM 0x00000010 /* Pass all multicast */ #define GMAC_FRAME_FILTER_DBF 0x00000020 /* Disable Broadcast frames */ +#define GMAC_FRAME_FILTER_PCF 0x00000080 /* Pass Control frames */ #define GMAC_FRAME_FILTER_SAIF 0x00000100 /* Inverse Filtering */ #define GMAC_FRAME_FILTER_SAF 0x00000200 /* Source Address Filter */ #define GMAC_FRAME_FILTER_HPF 0x00000400 /* Hash or perfect Filter */ diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c index 398303c783f4..8ca73bd15e07 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c @@ -172,7 +172,7 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, memset(mc_filter, 0, sizeof(mc_filter)); if (dev->flags & IFF_PROMISC) { - value = GMAC_FRAME_FILTER_PR; + value = GMAC_FRAME_FILTER_PR | GMAC_FRAME_FILTER_PCF; } else if (dev->flags & IFF_ALLMULTI) { value = GMAC_FRAME_FILTER_PM; /* pass all multi */ } else if (!netdev_mc_empty(dev)) { -- 2.7.4