Commit b72c2009 authored by Jaccon Bastiaansen's avatar Jaccon Bastiaansen Committed by David S. Miller

cs89x0 : packet reception not working

The RxCFG register of the CS89x0 could be configured incorrectly
(because of misplaced parentheses), resulting in the disabling
of packet reception.
Signed-off-by: default avatarJaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0dcd5052
...@@ -1243,6 +1243,7 @@ static void set_multicast_list(struct net_device *dev) ...@@ -1243,6 +1243,7 @@ static void set_multicast_list(struct net_device *dev)
{ {
struct net_local *lp = netdev_priv(dev); struct net_local *lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
u16 cfg;
spin_lock_irqsave(&lp->lock, flags); spin_lock_irqsave(&lp->lock, flags);
if (dev->flags & IFF_PROMISC) if (dev->flags & IFF_PROMISC)
...@@ -1260,11 +1261,10 @@ static void set_multicast_list(struct net_device *dev) ...@@ -1260,11 +1261,10 @@ static void set_multicast_list(struct net_device *dev)
/* in promiscuous mode, we accept errored packets, /* in promiscuous mode, we accept errored packets,
* so we have to enable interrupts on them also * so we have to enable interrupts on them also
*/ */
writereg(dev, PP_RxCFG, cfg = lp->curr_rx_cfg;
(lp->curr_rx_cfg | if (lp->rx_mode == RX_ALL_ACCEPT)
(lp->rx_mode == RX_ALL_ACCEPT) cfg |= RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL;
? (RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL) writereg(dev, PP_RxCFG, cfg);
: 0));
spin_unlock_irqrestore(&lp->lock, flags); spin_unlock_irqrestore(&lp->lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment