]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: systemport: correctly check for RX_STATUS_OVFLOW flag
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 5 Jun 2014 17:22:16 +0000 (10:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Jun 2014 22:36:54 +0000 (15:36 -0700)
We were missing an and comparison with status to check whether
RX_STATUS_OVFLOW is asserted or not in the per-packet status word, fix
that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c

index 4dfc93fe9744f6b2c7be3a35816c90e106c63ee5..fc84aba0cde0852c99c062f5b7f6bf8279e649fc 100644 (file)
@@ -514,7 +514,7 @@ static unsigned int bcm_sysport_desc_rx(struct bcm_sysport_priv *priv,
 
                if (unlikely(status & (RX_STATUS_ERR | RX_STATUS_OVFLOW))) {
                        netif_err(priv, rx_err, ndev, "error packet\n");
-                       if (RX_STATUS_OVFLOW)
+                       if (status & RX_STATUS_OVFLOW)
                                ndev->stats.rx_over_errors++;
                        ndev->stats.rx_dropped++;
                        ndev->stats.rx_errors++;