[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231026224509.112353-6-florian.fainelli@broadcom.com>
Date: Thu, 26 Oct 2023 15:45:09 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: netdev@...r.kernel.org
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
Doug Berger <opendmb@...il.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Vladimir Oltean <vladimir.oltean@....com>,
Tariq Toukan <tariqt@...dia.com>,
Gal Pressman <gal@...dia.com>,
Willem de Bruijn <willemb@...gle.com>,
Daniil Tatianin <d-tatianin@...dex-team.ru>,
Simon Horman <horms@...nel.org>,
Justin Chen <justin.chen@...adcom.com>,
Ratheesh Kannoth <rkannoth@...vell.com>,
Joe Damato <jdamato@...tly.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Jiri Pirko <jiri@...nulli.us>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH net-next v2 5/5] net: bcmgenet: Interrogate PHY for WAKE_FILTER programming
Determine whether the PHY can support waking up from the user programmed
network filter, and if it can utilize it.
Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 9282403d1bf6..9d01c13552eb 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1524,6 +1524,14 @@ static int bcmgenet_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
struct bcmgenet_priv *priv = netdev_priv(dev);
int err = 0;
+ if (dev->phydev) {
+ err = phy_ethtool_set_rxnfc(dev->phydev, cmd);
+ if (err != -EOPNOTSUPP)
+ return err;
+
+ err = 0;
+ }
+
switch (cmd->cmd) {
case ETHTOOL_SRXCLSRLINS:
err = bcmgenet_insert_flow(dev, cmd);
@@ -1579,6 +1587,14 @@ static int bcmgenet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
int err = 0;
int i = 0;
+ if (dev->phydev) {
+ err = phy_ethtool_get_rxnfc(dev->phydev, cmd, rule_locs);
+ if (err != -EOPNOTSUPP)
+ return err;
+
+ err = 0;
+ }
+
switch (cmd->cmd) {
case ETHTOOL_GRXRINGS:
cmd->data = priv->hw_params->rx_queues ?: 1;
--
2.34.1
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)
Powered by blists - more mailing lists