bonding: use last_arp_rx in slave_last_rx()
authorVeaceslav Falico <vfalico@redhat.com>
Tue, 18 Feb 2014 06:48:43 +0000 (07:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Feb 2014 21:47:15 +0000 (16:47 -0500)
Now that last_arp_rx really has the last time we've received any (validated or
not) ARP, we can use it in slave_last_rx() instead of slave->dev->last_rx.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bonding.h

index ab2e651d7bc3e114b4c6f0553d87f29580c84428..ae20c5a9d00d617ac99e5e9a06f98b95697f7766 100644 (file)
@@ -379,14 +379,10 @@ static inline unsigned long slave_oldest_target_arp_rx(struct bonding *bond,
 static inline unsigned long slave_last_rx(struct bonding *bond,
                                        struct slave *slave)
 {
-       if (slave_do_arp_validate(bond, slave)) {
-               if (bond->params.arp_all_targets == BOND_ARP_TARGETS_ALL)
-                       return slave_oldest_target_arp_rx(bond, slave);
-               else
-                       return slave->last_arp_rx;
-       }
+       if (bond->params.arp_all_targets == BOND_ARP_TARGETS_ALL)
+               return slave_oldest_target_arp_rx(bond, slave);
 
-       return slave->dev->last_rx;
+       return slave->last_arp_rx;
 }
 
 #ifdef CONFIG_NET_POLL_CONTROLLER