summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianhua Xie <jianhua.xie@freescale.com>2014-04-22 01:17:49 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-22 19:19:17 (GMT)
commit8cc211a153e11a11ecda4aeb7aa5514ac1af82f1 (patch)
tree48764368fc7cc29b022e3dbb3721a684f10756dc
parentb2e1caffbe04436192344e483d09e6964df116d9 (diff)
downloadlinux-fsl-qoriq-8cc211a153e11a11ecda4aeb7aa5514ac1af82f1.tar.xz
bonding: make LAG codes to fit different kernel
Linux kernel API bond_for_each_slave of bonding.h has different params along with different kernel version as below table: Older version: bond_for_each_slave(bond, pos, int cnt), 3.11.0-rc1(dec1e90e8): bond_for_each_slave(bond, pos), 3.12.0-rc1(9caff1e7b): bond_for_each_slave(bond, slave, list_head *iter) This patch is making LAG codes to fit different kernel version. Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: Ifd365cd232aba67a437b156568d88c6e16c44c1a Reviewed-on: http://git.am.freescale.net:8181/11293 Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--drivers/net/bonding/hw_distribution.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/hw_distribution.c b/drivers/net/bonding/hw_distribution.c
index 1403659..e87d016 100644
--- a/drivers/net/bonding/hw_distribution.c
+++ b/drivers/net/bonding/hw_distribution.c
@@ -348,10 +348,9 @@ static bool is_dpa_eth_port(struct net_device *netdev)
bool are_all_slaves_linkup(struct bonding *bond)
{
struct slave *slave;
- struct list_head *iter;
read_lock(&bond->lock);
- bond_for_each_slave(bond, slave, iter)
+ bond_for_each_slave(bond, slave)
if (!(SLAVE_IS_OK(slave))) {
read_unlock(&bond->lock);
return false;