Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4697718yba; Wed, 8 May 2019 00:55:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1arOSVFs+pX82SKMtvIewq+D0c1JPajA+RSl4Zig10O2jKSeE/IvCmPHwzLV139iDJdb2 X-Received: by 2002:a65:4c86:: with SMTP id m6mr19557666pgt.75.1557302110276; Wed, 08 May 2019 00:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557302110; cv=none; d=google.com; s=arc-20160816; b=cfM522FeAh8aPz/S3MNAzhRoYfe2Oisgr+N9cRmODfSFOWDGLU0WiEr8cRHrYjXQC4 cy7OvJB+YD8vUY3p02p1ieeLIeIihtHyqp6qsasacb0u1r28TEYzpc5GwoHfVj/yWu4s GPpgXfHqeSZs20CQEPXaxekobQJ+VD22Ufevs/sa4cB3gBXFRA+0IHCgRoY3BOim+Hpw LwXmPByO99FnuAjy0E9TSa3yiHQCJZ/kbR5BixFUHxxtAWf6oDqApLraeo3mzH+IkYDq QqLAfBJde5q06D1jbaoa69/E8iT0nZ/o8UYhI8Cyvy5+QX56r0can7ESVKz+LHCMyNkV Dkow== 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=cNFunAeNQm2nLt7eeoEZ/zOGGRUaJqJUPPKZGnF718k=; b=dDBWtfaK1Roc+0SqX03mmJK0icKKrzrMyZQW4CgzriRSK7VYNWzSAJ7HQrgn++IeIs /+cD+l34uUwPLjKbVbb5wb1J8rXuZSjCbOuZ7g5B/sri4QefaW9HaPDuZMwEzRWg1Uu1 SFlrj4CgiZEm6HBzNDT3D1i2xhRAfwiMnwPVSCT5gnLzrgSXfknADuG2Ox85oVPiRVx6 KDejy3CS+xjyLuNPUzeuwUaOzbbKoULaZUvjMV9Y0wvnc0uSlfmi34oC41bqFuwQY4Ov 88Y7oiSkLfe1+pv20P0SAVxbROKe3vRvlGefNpP5geI6gpTDcP8SG2jDKrz6isII7F5g 8CGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=WVutiGfi; 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 l95si22952839plb.365.2019.05.08.00.54.54; Wed, 08 May 2019 00:55:10 -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=WVutiGfi; 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 S1726834AbfEHHwe (ORCPT + 99 others); Wed, 8 May 2019 03:52:34 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.61.142]:53852 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726281AbfEHHva (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 6F7DCC010F; Wed, 8 May 2019 07:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1557301883; bh=W8moFFa7xp4rKGeTRQFofkXQ0t3rTlJTRRuqRazTxBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=WVutiGfizjwixgNM9AbYzUPmuHwOmKf8RqCqK4BN/vd7df0VaKzUNQQ32Gc4rtcy6 h4tC1Dw88sZDD+wrO8QAqIcfI/Ng0JzBOsaW2GMjYNTiL7n8mWuTiIh9FXNwzS1z42 5HY9SGHxiPHjW2spY/XIiJ/FsgRyg8Vs0BE/CpXNkBynOQd7Iqm7jI4/pLfBWR5o3o 7jLac0c20L63qmj25H6Qd1CT1W9D06XBjJKGgwN2jWc7OkwkajYDI8Jazpp33C6aqg IeQMR/jG4TxDol1ZsSSFQHdG9iCIGsFrgyzET/eBjF/5KfA9lasYZI07SXfudzEHMK 6SpTKhNQPJLig== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 7266FA02DC; 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 DAA6B3D52E; 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 08/11] net: stmmac: dwmac4/5: Also pass control frames while in promisc mode Date: Wed, 8 May 2019 09:51:08 +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/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