Netdev List
 help / color / mirror / Atom feed
From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: <netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <robh+dt@kernel.org>,
	<UNGLinuxDriver@microchip.com>, <linux@armlinux.org.uk>,
	<f.fainelli@gmail.com>, <vivien.didelot@gmail.com>,
	<vladimir.oltean@nxp.com>, <andrew@lunn.ch>,
	Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [PATCH net-next v5 5/9] net: lan966x: Remove .ndo_change_rx_flags
Date: Wed, 15 Dec 2021 13:13:05 +0100	[thread overview]
Message-ID: <20211215121309.3669119-6-horatiu.vultur@microchip.com> (raw)
In-Reply-To: <20211215121309.3669119-1-horatiu.vultur@microchip.com>

The function lan966x_port_change_rx_flags() was used only when
IFF_PROMISC flag was set. In that case it was setting to copy all the
frames to the CPU instead of removing any RX filters. Therefore remove
it.

Fixes: d28d6d2e37d10d ("net: lan966x: add port module support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 .../ethernet/microchip/lan966x/lan966x_main.c | 23 -------------------
 1 file changed, 23 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index 7c6d6293611a..dc40ac2eb246 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -298,28 +298,6 @@ static int lan966x_port_xmit(struct sk_buff *skb, struct net_device *dev)
 	return lan966x_port_ifh_xmit(skb, ifh, dev);
 }
 
-static void lan966x_set_promisc(struct lan966x_port *port, bool enable)
-{
-	struct lan966x *lan966x = port->lan966x;
-
-	lan_rmw(ANA_CPU_FWD_CFG_SRC_COPY_ENA_SET(enable),
-		ANA_CPU_FWD_CFG_SRC_COPY_ENA,
-		lan966x, ANA_CPU_FWD_CFG(port->chip_port));
-}
-
-static void lan966x_port_change_rx_flags(struct net_device *dev, int flags)
-{
-	struct lan966x_port *port = netdev_priv(dev);
-
-	if (!(flags & IFF_PROMISC))
-		return;
-
-	if (dev->flags & IFF_PROMISC)
-		lan966x_set_promisc(port, true);
-	else
-		lan966x_set_promisc(port, false);
-}
-
 static int lan966x_port_change_mtu(struct net_device *dev, int new_mtu)
 {
 	struct lan966x_port *port = netdev_priv(dev);
@@ -369,7 +347,6 @@ static const struct net_device_ops lan966x_port_netdev_ops = {
 	.ndo_open			= lan966x_port_open,
 	.ndo_stop			= lan966x_port_stop,
 	.ndo_start_xmit			= lan966x_port_xmit,
-	.ndo_change_rx_flags		= lan966x_port_change_rx_flags,
 	.ndo_change_mtu			= lan966x_port_change_mtu,
 	.ndo_set_rx_mode		= lan966x_port_set_rx_mode,
 	.ndo_get_phys_port_name		= lan966x_port_get_phys_port_name,
-- 
2.33.0


  parent reply	other threads:[~2021-12-15 12:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 12:13 [PATCH net-next v5 0/9] net: lan966x: Add switchdev and vlan support Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 1/9] net: lan966x: Add registers that are used for switch and vlan functionality Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 2/9] dt-bindings: net: lan966x: Extend with the analyzer interrupt Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 3/9] net: lan966x: add support for interrupts from analyzer Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 4/9] net: lan966x: More MAC table functionality Horatiu Vultur
2021-12-15 12:13 ` Horatiu Vultur [this message]
2021-12-15 12:13 ` [PATCH net-next v5 6/9] net: lan966x: Add support to offload the forwarding Horatiu Vultur
2021-12-15 23:50   ` Vladimir Oltean
2021-12-16 14:34     ` Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 7/9] net: lan966x: Add vlan support Horatiu Vultur
2021-12-16  0:44   ` Vladimir Oltean
2021-12-17 11:38     ` Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 8/9] net: lan966x: Extend switchdev bridge flags Horatiu Vultur
2021-12-15 12:13 ` [PATCH net-next v5 9/9] net: lan966x: Extend switchdev with fdb support Horatiu Vultur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215121309.3669119-6-horatiu.vultur@microchip.com \
    --to=horatiu.vultur@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox