diff options
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 31fe980e4e28..0a3e00b220b7 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/if_bonding.h> | 20 | #include <linux/if_bonding.h> |
21 | #include <linux/cpumask.h> | 21 | #include <linux/cpumask.h> |
22 | #include <linux/in6.h> | 22 | #include <linux/in6.h> |
23 | #include <linux/netpoll.h> | ||
23 | #include "bond_3ad.h" | 24 | #include "bond_3ad.h" |
24 | #include "bond_alb.h" | 25 | #include "bond_alb.h" |
25 | 26 | ||
@@ -198,6 +199,9 @@ struct slave { | |||
198 | u16 queue_id; | 199 | u16 queue_id; |
199 | struct ad_slave_info ad_info; /* HUGE - better to dynamically alloc */ | 200 | struct ad_slave_info ad_info; /* HUGE - better to dynamically alloc */ |
200 | struct tlb_slave_info tlb_info; | 201 | struct tlb_slave_info tlb_info; |
202 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
203 | struct netpoll *np; | ||
204 | #endif | ||
201 | }; | 205 | }; |
202 | 206 | ||
203 | /* | 207 | /* |
@@ -323,6 +327,22 @@ static inline unsigned long slave_last_rx(struct bonding *bond, | |||
323 | return slave->dev->last_rx; | 327 | return slave->dev->last_rx; |
324 | } | 328 | } |
325 | 329 | ||
330 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
331 | static inline void bond_netpoll_send_skb(const struct slave *slave, | ||
332 | struct sk_buff *skb) | ||
333 | { | ||
334 | struct netpoll *np = slave->np; | ||
335 | |||
336 | if (np) | ||
337 | netpoll_send_skb(np, skb); | ||
338 | } | ||
339 | #else | ||
340 | static inline void bond_netpoll_send_skb(const struct slave *slave, | ||
341 | struct sk_buff *skb) | ||
342 | { | ||
343 | } | ||
344 | #endif | ||
345 | |||
326 | static inline void bond_set_slave_inactive_flags(struct slave *slave) | 346 | static inline void bond_set_slave_inactive_flags(struct slave *slave) |
327 | { | 347 | { |
328 | struct bonding *bond = netdev_priv(slave->dev->master); | 348 | struct bonding *bond = netdev_priv(slave->dev->master); |