Commit 0761248f authored by Roel Kluin's avatar Roel Kluin Committed by Jeff Garzik

ipg: fix receivemode IPG_RM_RECEIVEMULTICAST{,HASH} in ipg_nic_set_multicast_list()

The branches are dead code.  even when dev->flag IFF_MULTICAST (defined
0x1000) is set, dev->flags & IFF_MULTICAST & [boolean] always evaluates to
0.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 513fd370
...@@ -577,12 +577,12 @@ static void ipg_nic_set_multicast_list(struct net_device *dev) ...@@ -577,12 +577,12 @@ static void ipg_nic_set_multicast_list(struct net_device *dev)
/* NIC to be configured in promiscuous mode. */ /* NIC to be configured in promiscuous mode. */
receivemode = IPG_RM_RECEIVEALLFRAMES; receivemode = IPG_RM_RECEIVEALLFRAMES;
} else if ((dev->flags & IFF_ALLMULTI) || } else if ((dev->flags & IFF_ALLMULTI) ||
(dev->flags & IFF_MULTICAST & ((dev->flags & IFF_MULTICAST) &&
(dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) { (dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) {
/* NIC to be configured to receive all multicast /* NIC to be configured to receive all multicast
* frames. */ * frames. */
receivemode |= IPG_RM_RECEIVEMULTICAST; receivemode |= IPG_RM_RECEIVEMULTICAST;
} else if (dev->flags & IFF_MULTICAST & (dev->mc_count > 0)) { } else if ((dev->flags & IFF_MULTICAST) && (dev->mc_count > 0)) {
/* NIC to be configured to receive selected /* NIC to be configured to receive selected
* multicast addresses. */ * multicast addresses. */
receivemode |= IPG_RM_RECEIVEMULTICASTHASH; receivemode |= IPG_RM_RECEIVEMULTICASTHASH;
......
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