diff options
author | Veaceslav Falico <vfalico@gmail.com> | 2014-05-15 21:39:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 22:34:32 +0200 |
commit | 01844098ecd9564cd5f903e3ff6c1ea96355772d (patch) | |
tree | 4bf2bb8089248698ec1380d8c4e9cd018141466f /drivers/net/bonding/bond_netlink.c | |
parent | bonding: make USES_PRIMARY inline functions (diff) | |
download | linux-01844098ecd9564cd5f903e3ff6c1ea96355772d.tar.xz linux-01844098ecd9564cd5f903e3ff6c1ea96355772d.zip |
bonding: create a macro for bond mode and use it
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_netlink.c')
-rw-r--r-- | drivers/net/bonding/bond_netlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c index 0d06e751dff2..5ab3c1847e67 100644 --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c @@ -56,7 +56,7 @@ static int bond_fill_slave_info(struct sk_buff *skb, if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID, slave->queue_id)) goto nla_put_failure; - if (slave->bond->params.mode == BOND_MODE_8023AD) { + if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) { const struct aggregator *agg; agg = SLAVE_AD_INFO(slave)->port.aggregator; @@ -407,7 +407,7 @@ static int bond_fill_info(struct sk_buff *skb, unsigned int packets_per_slave; int i, targets_added; - if (nla_put_u8(skb, IFLA_BOND_MODE, bond->params.mode)) + if (nla_put_u8(skb, IFLA_BOND_MODE, BOND_MODE(bond))) goto nla_put_failure; if (slave_dev && @@ -505,7 +505,7 @@ static int bond_fill_info(struct sk_buff *skb, bond->params.ad_select)) goto nla_put_failure; - if (bond->params.mode == BOND_MODE_8023AD) { + if (BOND_MODE(bond) == BOND_MODE_8023AD) { struct ad_info info; if (!bond_3ad_get_active_agg_info(bond, &info)) { |