Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4696836yba; Wed, 8 May 2019 00:53:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3foY7y7oSkJEQWoFYu9SSFWhZDtFRSB1sS6FLAoZGc0RA1q3kqU12+K86N7+4DEtXMgrT X-Received: by 2002:a63:5c25:: with SMTP id q37mr46263635pgb.263.1557302034520; Wed, 08 May 2019 00:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557302034; cv=none; d=google.com; s=arc-20160816; b=l7nkSLS+45+flxA/FxMmdk7ikAlAHPhMl7qFhW8ED8NZxI9HCNo4OueFmlJtnKHrXx /QXcPwb3MYhU6kfCmgBJtKifuIuhEmsuQ1y6jvbF0nTLDI4GaLnx85cRQ68cayyLZxkK 9A7bkjEuhzDHSry38XDSQ7QOftocciEqRE+Tftr8xTwXH1Yt7gYGlB02CRr+NauMjnpf ddHe3IxH/W134/FXJsxI8IGIK4aW4u8o+PCNHR37idDyjtypLT6uD+uHgCjeVdQ7hC8j m6l3BiSoJKjWVPWskSYY5Z096DmAvKg55LnN4IxhgZEhgwrqXTMjFGrflczDv1aM+DK+ 8jJg== 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=/cN6WRI7sbIysvlqGW0RwBgEw6FlNFoLPjTqgcyHv5U=; b=g8+wI9poiLCm99Oek6LJdNhwhJeXVdUOvdnbuV6sMfkWaFlC58NmrYDaADjvbiircz 3qbgUky9R4hgj3UzpY0Stql+wENjVAQrzQbSzkRD8mqqVruGEHCNAhlOcc4fzM5X1hVB A6piFev4yV2oS/5Tca3gBlQJz3ypqefWMvpbELw+5VzMsRCtXLcpOh7NLte65QHR5pxb jJGkKhqub8JLD8dUZ6eeWnQpKWai4g3uDcVxOhRLxBzvzw09jah5ylk2wQrsQ8bUUt6o XSItYodtqADHPkjkyUEkMwBoJJvutx1RWsD7gU6JBaLMqcB10MCsnm8NJLXp7VLpvWnk /eRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=XCXsXlxz; 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 9si8128564pgz.358.2019.05.08.00.53.38; Wed, 08 May 2019 00:53:54 -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=XCXsXlxz; 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 S1726808AbfEHHwY (ORCPT + 99 others); Wed, 8 May 2019 03:52:24 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:56520 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726438AbfEHHva (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 3AAD9C00F1; 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=+bRqanSndBDwhYIr9AZ4tJq7qIJWXtCtdw6+baQLE1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=XCXsXlxzFnlaPcB29aMFSUf82T+uRjthoaA/FBKopyZAvuplcF2kO4vy9kUQjMIIZ 30YMlBvf5KjT1AHdraVHDUZWuTfmde8psj9+bTrk8iDVInAwKR42C1wyfaHCUmb5jq RHozOudoCM24JCTWBtrOmutLhQhTc8uohXI3K+7d1fHKTg3xl6fZ2gzcKx0OFq31/j 1kszT58vKZ8KAULvdxYmv6mj0mRNYwBErssflGGpcGk45LKgSmj0jV1M/9a9W7+ZR3 qqUnp4ckV4K9xMYX5+PGCmzL+l/iI10IwejnWYs8NCmHY0LI6KE06ykwixS46aqgZO ESCdIlD4xf+fw== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 7891AA02D6; 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 EB8DA3D532; 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 09/11] net: stmmac: dwxgmac2: Also pass control frames while in promisc mode Date: Wed, 8 May 2019 09:51:09 +0200 Message-Id: <78a2b49986abea228d2f79d752466450e5f933bb.1557300602.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 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/dwxgmac2.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h index f629ccc8932a..b8296eb41011 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h @@ -40,6 +40,7 @@ #define XGMAC_CORE_INIT_RX 0 #define XGMAC_PACKET_FILTER 0x00000008 #define XGMAC_FILTER_RA BIT(31) +#define XGMAC_FILTER_PCF BIT(7) #define XGMAC_FILTER_PM BIT(4) #define XGMAC_FILTER_HMC BIT(2) #define XGMAC_FILTER_PR BIT(0) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c index c27b3ca052ea..bfa7d6913fd4 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -310,7 +310,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw, u32 value = XGMAC_FILTER_RA; if (dev->flags & IFF_PROMISC) { - value |= XGMAC_FILTER_PR; + value |= XGMAC_FILTER_PR | XGMAC_FILTER_PCF; } else if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > HASH_TABLE_SIZE)) { value |= XGMAC_FILTER_PM; -- 2.7.4