diff options
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r-- | include/net/bonding.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h index fb2dd97857c4..04a21e8048be 100644 --- a/include/net/bonding.h +++ b/include/net/bonding.h | |||
@@ -166,7 +166,7 @@ struct slave { | |||
166 | u32 link_failure_count; | 166 | u32 link_failure_count; |
167 | u32 speed; | 167 | u32 speed; |
168 | u16 queue_id; | 168 | u16 queue_id; |
169 | u8 perm_hwaddr[ETH_ALEN]; | 169 | u8 perm_hwaddr[MAX_ADDR_LEN]; |
170 | struct ad_slave_info *ad_info; | 170 | struct ad_slave_info *ad_info; |
171 | struct tlb_slave_info tlb_info; | 171 | struct tlb_slave_info tlb_info; |
172 | #ifdef CONFIG_NET_POLL_CONTROLLER | 172 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -402,6 +402,16 @@ static inline bool bond_slave_can_tx(struct slave *slave) | |||
402 | bond_is_active_slave(slave); | 402 | bond_is_active_slave(slave); |
403 | } | 403 | } |
404 | 404 | ||
405 | static inline void bond_hw_addr_copy(u8 *dst, const u8 *src, unsigned int len) | ||
406 | { | ||
407 | if (len == ETH_ALEN) { | ||
408 | ether_addr_copy(dst, src); | ||
409 | return; | ||
410 | } | ||
411 | |||
412 | memcpy(dst, src, len); | ||
413 | } | ||
414 | |||
405 | #define BOND_PRI_RESELECT_ALWAYS 0 | 415 | #define BOND_PRI_RESELECT_ALWAYS 0 |
406 | #define BOND_PRI_RESELECT_BETTER 1 | 416 | #define BOND_PRI_RESELECT_BETTER 1 |
407 | #define BOND_PRI_RESELECT_FAILURE 2 | 417 | #define BOND_PRI_RESELECT_FAILURE 2 |