Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3694824ybv; Mon, 10 Feb 2020 04:51:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwU3/02C8wtBKWuxexk0DYgKayxdYvvDyjgNhGTg5yzfm6nOWQvS4kXkCTBSWPx0Ki5YXBW X-Received: by 2002:aca:120e:: with SMTP id 14mr668129ois.135.1581339117292; Mon, 10 Feb 2020 04:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339117; cv=none; d=google.com; s=arc-20160816; b=jKQCQ9zh34K5IiIlBLgD6+SBGNDmv0HVlSMkYyfYxwB8gAHHA0/Q8U3E89YydeIkPt +Mx8H7MGxQhWSntKK8v7rLfYJrxjReX1SIzOfwcqKmDaXqaWgTmNkjBXRLgcMGw8dVCQ HXQkt4yryWtlS89qlYo3xZQw8qtPkQvkBHf3ZfgUbdvxfaT6xiW2uGZqguHSGLyg0sU/ AUuDKM6nE5+Gery6QB+VFfWuy2LCClxKB8rRyXQAdJsUpL2hlRbC8KSYQ5diHFjLkpmY J51DN7Gcn4RkjTETIR8jhiZMUo8NcFJMvMMcWknXQT8RgvNrup4YCmhrVGYM0lzEw+zS pQxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=grxFIQ411Xs3S7cBe2vOv2gujo+ShNHVrwLywmHvBMc=; b=wYjSZRlzDXIAkqgDBfEPb/t0NfFwCuUScfR9rg5aPoZ3fbqDIoGDgD3I6LfuEHY5Ch /brnr/AICuG59PJgrXglrP6711OtVb7O/HXEEE2HgfzkOjPtD7pewVilt+zd/vJz7cQ4 LBY6LufexVKCvO0u84AIm8pUJEn1Rsp2i5pJ8GNVLnfaIEE/Cg4Mw5o+Zj9H2y7hskYu ebCGq9ouj0YoeU9Jbr5LXGXYBpNR1OtOnUSi8bY0XeQBhAlD+gyyYYmtoW4w2e84bavi Dsm8wjhcd5cZWEUdF4CmiW0zDkEXyCnRnSvY6a9tmatJPZSMt3t/zZvhw64D6ZmTrOfd F6fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zqv5B1NK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si136684otn.323.2020.02.10.04.51.45; Mon, 10 Feb 2020 04:51:57 -0800 (PST) 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=@kernel.org header.s=default header.b=zqv5B1NK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728402AbgBJMuq (ORCPT + 99 others); Mon, 10 Feb 2020 07:50:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:48006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730564AbgBJMoG (ORCPT ); Mon, 10 Feb 2020 07:44:06 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AB1320873; Mon, 10 Feb 2020 12:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338645; bh=8qFy2P9Vypn24UZq8VITnvCyAMf7Rm5CIXUCo9bYzcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zqv5B1NKK2MkaobL4++aWEe+ZOz7PDHR11ZqkIK6nreFeNxibwS9D0ZvbvXGg9kA8 9XYKF5yXjETiwYgUPi3EYve2UQEwtRayKzM2TI3z4C6Gx3RzRJncg/svW8DTGZt/hi j+RPFck+9jMMpv0PPaMgq6A7DsAcE/00pyO6FhG0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Verma, Aashish" , "Tan, Tee Min" , Ong Boon Leong , "David S. Miller" Subject: [PATCH 5.5 332/367] net: stmmac: fix missing IFF_MULTICAST check in dwmac4_set_filter Date: Mon, 10 Feb 2020 04:34:05 -0800 Message-Id: <20200210122453.473303179@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Verma, Aashish" [ Upstream commit 2ba31cd93784b61813226d259fd94a221ecd9d61 ] Without checking for IFF_MULTICAST flag, it is wrong to assume multicast filtering is always enabled. By checking against IFF_MULTICAST, now the driver behaves correctly when the multicast support is toggled by below command:- ip link set multicast off|on Fixes: 477286b53f55 ("stmmac: add GMAC4 core support") Signed-off-by: Verma, Aashish Tested-by: Tan, Tee Min Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -420,7 +420,7 @@ static void dwmac4_set_filter(struct mac value |= GMAC_PACKET_FILTER_PM; /* Set all the bits of the HASH tab */ memset(mc_filter, 0xff, sizeof(mc_filter)); - } else if (!netdev_mc_empty(dev)) { + } else if (!netdev_mc_empty(dev) && (dev->flags & IFF_MULTICAST)) { struct netdev_hw_addr *ha; /* Hash filter for multicast */