Browse Source

staging: et131x: Combine two if statements with same effect

Both these if statements have the same effect when true, so combine
them and save a few lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon 11 years ago
parent
commit
668caa674c
1 changed files with 2 additions and 4 deletions
  1. 2 4
      drivers/staging/et131x/et131x.c

+ 2 - 4
drivers/staging/et131x/et131x.c

@@ -4137,10 +4137,8 @@ static void et131x_multicast(struct net_device *netdev)
 	else
 		adapter->packet_filter &= ~ET131X_PACKET_TYPE_PROMISCUOUS;
 
-	if (netdev->flags & IFF_ALLMULTI)
-		adapter->packet_filter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
-
-	if (netdev_mc_count(netdev) > NIC_MAX_MCAST_LIST)
+	if ((netdev->flags & IFF_ALLMULTI) ||
+	    (netdev_mc_count(netdev) > NIC_MAX_MCAST_LIST))
 		adapter->packet_filter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
 
 	if (netdev_mc_count(netdev) < 1) {