diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 01db7b88a2b1..f4169bbb60eb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -433,8 +433,7 @@ struct net_device | |||
433 | 433 | ||
434 | /* register/unregister state machine */ | 434 | /* register/unregister state machine */ |
435 | enum { NETREG_UNINITIALIZED=0, | 435 | enum { NETREG_UNINITIALIZED=0, |
436 | NETREG_REGISTERING, /* called register_netdevice */ | 436 | NETREG_REGISTERED, /* completed register_netdevice */ |
437 | NETREG_REGISTERED, /* completed register todo */ | ||
438 | NETREG_UNREGISTERING, /* called unregister_netdevice */ | 437 | NETREG_UNREGISTERING, /* called unregister_netdevice */ |
439 | NETREG_UNREGISTERED, /* completed unregister todo */ | 438 | NETREG_UNREGISTERED, /* completed unregister todo */ |
440 | NETREG_RELEASED, /* called free_netdev */ | 439 | NETREG_RELEASED, /* called free_netdev */ |
@@ -506,6 +505,8 @@ struct net_device | |||
506 | 505 | ||
507 | /* class/net/name entry */ | 506 | /* class/net/name entry */ |
508 | struct class_device class_dev; | 507 | struct class_device class_dev; |
508 | /* space for optional statistics and wireless sysfs groups */ | ||
509 | struct attribute_group *sysfs_groups[3]; | ||
509 | }; | 510 | }; |
510 | 511 | ||
511 | #define NETDEV_ALIGN 32 | 512 | #define NETDEV_ALIGN 32 |
@@ -829,21 +830,19 @@ static inline void netif_rx_schedule(struct net_device *dev) | |||
829 | __netif_rx_schedule(dev); | 830 | __netif_rx_schedule(dev); |
830 | } | 831 | } |
831 | 832 | ||
832 | 833 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). | |
833 | static inline void __netif_rx_reschedule(struct net_device *dev, int undo) | 834 | * Do not inline this? |
834 | { | 835 | */ |
835 | dev->quota += undo; | ||
836 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
837 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
838 | } | ||
839 | |||
840 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
841 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) | 836 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) |
842 | { | 837 | { |
843 | if (netif_rx_schedule_prep(dev)) { | 838 | if (netif_rx_schedule_prep(dev)) { |
844 | unsigned long flags; | 839 | unsigned long flags; |
840 | |||
841 | dev->quota += undo; | ||
842 | |||
845 | local_irq_save(flags); | 843 | local_irq_save(flags); |
846 | __netif_rx_reschedule(dev, undo); | 844 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); |
845 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
847 | local_irq_restore(flags); | 846 | local_irq_restore(flags); |
848 | return 1; | 847 | return 1; |
849 | } | 848 | } |