diff options
-rw-r--r-- | drivers/net/netconsole.c | 1 | ||||
-rw-r--r-- | include/linux/netpoll.h | 4 | ||||
-rw-r--r-- | net/core/netpoll.c | 23 |
3 files changed, 5 insertions, 23 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index e6e8a9797b6d..69233f6aa05c 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -60,7 +60,6 @@ static struct netpoll np = { | |||
60 | .local_port = 6665, | 60 | .local_port = 6665, |
61 | .remote_port = 6666, | 61 | .remote_port = 6666, |
62 | .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, | 62 | .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
63 | .drop = netpoll_queue, | ||
64 | }; | 63 | }; |
65 | static int configured = 0; | 64 | static int configured = 0; |
66 | 65 | ||
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index c65d12ec7bb0..b7eb008c43de 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -18,7 +18,7 @@ struct netpoll { | |||
18 | struct net_device *dev; | 18 | struct net_device *dev; |
19 | char dev_name[16], *name; | 19 | char dev_name[16], *name; |
20 | void (*rx_hook)(struct netpoll *, int, char *, int); | 20 | void (*rx_hook)(struct netpoll *, int, char *, int); |
21 | void (*drop)(struct sk_buff *skb); | 21 | |
22 | u32 local_ip, remote_ip; | 22 | u32 local_ip, remote_ip; |
23 | u16 local_port, remote_port; | 23 | u16 local_port, remote_port; |
24 | unsigned char local_mac[6], remote_mac[6]; | 24 | unsigned char local_mac[6], remote_mac[6]; |
@@ -44,7 +44,7 @@ int netpoll_trap(void); | |||
44 | void netpoll_set_trap(int trap); | 44 | void netpoll_set_trap(int trap); |
45 | void netpoll_cleanup(struct netpoll *np); | 45 | void netpoll_cleanup(struct netpoll *np); |
46 | int __netpoll_rx(struct sk_buff *skb); | 46 | int __netpoll_rx(struct sk_buff *skb); |
47 | void netpoll_queue(struct sk_buff *skb); | 47 | |
48 | 48 | ||
49 | #ifdef CONFIG_NETPOLL | 49 | #ifdef CONFIG_NETPOLL |
50 | static inline int netpoll_rx(struct sk_buff *skb) | 50 | static inline int netpoll_rx(struct sk_buff *skb) |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 6b34c394672f..0d1de3c47a01 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -77,19 +77,6 @@ static void queue_process(void *p) | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | void netpoll_queue(struct sk_buff *skb) | ||
81 | { | ||
82 | struct net_device *dev = skb->dev; | ||
83 | struct netpoll_info *npinfo = dev->npinfo; | ||
84 | |||
85 | if (!npinfo) | ||
86 | kfree_skb(skb); | ||
87 | else { | ||
88 | skb_queue_tail(&npinfo->txq, skb); | ||
89 | schedule_work(&npinfo->tx_work); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, | 80 | static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, |
94 | unsigned short ulen, u32 saddr, u32 daddr) | 81 | unsigned short ulen, u32 saddr, u32 daddr) |
95 | { | 82 | { |
@@ -256,7 +243,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
256 | } | 243 | } |
257 | 244 | ||
258 | /* don't get messages out of order, and no recursion */ | 245 | /* don't get messages out of order, and no recursion */ |
259 | if ( !(np->drop == netpoll_queue && skb_queue_len(&npinfo->txq)) | 246 | if ( skb_queue_len(&npinfo->txq) == 0 |
260 | && npinfo->poll_owner != smp_processor_id() | 247 | && npinfo->poll_owner != smp_processor_id() |
261 | && netif_tx_trylock(dev)) { | 248 | && netif_tx_trylock(dev)) { |
262 | 249 | ||
@@ -277,11 +264,8 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
277 | } | 264 | } |
278 | 265 | ||
279 | if (status != NETDEV_TX_OK) { | 266 | if (status != NETDEV_TX_OK) { |
280 | /* requeue for later */ | 267 | skb_queue_tail(&npinfo->txq, skb); |
281 | if (np->drop) | 268 | schedule_work(&npinfo->tx_work); |
282 | np->drop(skb); | ||
283 | else | ||
284 | __kfree_skb(skb); | ||
285 | } | 269 | } |
286 | } | 270 | } |
287 | 271 | ||
@@ -809,4 +793,3 @@ EXPORT_SYMBOL(netpoll_setup); | |||
809 | EXPORT_SYMBOL(netpoll_cleanup); | 793 | EXPORT_SYMBOL(netpoll_cleanup); |
810 | EXPORT_SYMBOL(netpoll_send_udp); | 794 | EXPORT_SYMBOL(netpoll_send_udp); |
811 | EXPORT_SYMBOL(netpoll_poll); | 795 | EXPORT_SYMBOL(netpoll_poll); |
812 | EXPORT_SYMBOL(netpoll_queue); | ||