diff options
-rw-r--r-- | drivers/net/bonding/bond_procfs.c | 3 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c index bb09d0442aa8..a3948f8d1e53 100644 --- a/drivers/net/bonding/bond_procfs.c +++ b/drivers/net/bonding/bond_procfs.c | |||
@@ -73,8 +73,7 @@ static void bond_info_show_master(struct seq_file *seq) | |||
73 | 73 | ||
74 | seq_printf(seq, "\n"); | 74 | seq_printf(seq, "\n"); |
75 | 75 | ||
76 | if (BOND_MODE(bond) == BOND_MODE_XOR || | 76 | if (bond_mode_uses_xmit_hash(bond)) { |
77 | BOND_MODE(bond) == BOND_MODE_8023AD) { | ||
78 | optval = bond_opt_get_val(BOND_OPT_XMIT_HASH, | 77 | optval = bond_opt_get_val(BOND_OPT_XMIT_HASH, |
79 | bond->params.xmit_policy); | 78 | bond->params.xmit_policy); |
80 | seq_printf(seq, "Transmit Hash Policy: %s (%d)\n", | 79 | seq_printf(seq, "Transmit Hash Policy: %s (%d)\n", |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 57917e63b4e6..5b022da9cad2 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -274,6 +274,13 @@ static inline bool bond_is_nondyn_tlb(const struct bonding *bond) | |||
274 | (bond->params.tlb_dynamic_lb == 0); | 274 | (bond->params.tlb_dynamic_lb == 0); |
275 | } | 275 | } |
276 | 276 | ||
277 | static inline bool bond_mode_uses_xmit_hash(const struct bonding *bond) | ||
278 | { | ||
279 | return (BOND_MODE(bond) == BOND_MODE_8023AD || | ||
280 | BOND_MODE(bond) == BOND_MODE_XOR || | ||
281 | bond_is_nondyn_tlb(bond)); | ||
282 | } | ||
283 | |||
277 | static inline bool bond_mode_uses_arp(int mode) | 284 | static inline bool bond_mode_uses_arp(int mode) |
278 | { | 285 | { |
279 | return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB && | 286 | return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB && |