dpaa_eth: fix pause capability advertisement logic
authorJake Moroni <mail@jakemoroni.com>
Sun, 18 Feb 2018 20:26:04 +0000 (15:26 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Feb 2018 19:06:20 +0000 (14:06 -0500)
The ADVERTISED_Asym_Pause bit was being improperly set when both
rx and tx pause were enabled. When rx and tx are both enabled, only
the ADVERTISED_Pause bit is supposed to be set.

Signed-off-by: Jake Moroni <mail@jakemoroni.com>
Acked-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c

index faea674094b96743168f1c8edc6e875d0467f59c..85306d1b2acf5b3dbfb64a6d5b2dae46818accec 100644 (file)
@@ -211,7 +211,7 @@ static int dpaa_set_pauseparam(struct net_device *net_dev,
        if (epause->rx_pause)
                newadv = ADVERTISED_Pause | ADVERTISED_Asym_Pause;
        if (epause->tx_pause)
-               newadv |= ADVERTISED_Asym_Pause;
+               newadv ^= ADVERTISED_Asym_Pause;
 
        oldadv = phydev->advertising &
                        (ADVERTISED_Pause | ADVERTISED_Asym_Pause);