From e3c265bcf67f21d847e970e71504890f61f37824 Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Mon, 30 Aug 2004 20:38:07 -0700 Subject: [PATCH] [PATCH] netpoll: kill CONFIG_NETPOLL_RX This patch removes CONFIG_NETPOLL_RX, as discussed. Signed-off-by: Jeff Moyer Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/netdevice.h | 2 +- net/core/dev.c | 4 ++-- net/core/netpoll.c | 10 +++------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5edb93f163c12..62d21c00b9cce 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -462,7 +462,7 @@ struct net_device unsigned char *haddr); int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); int (*accept_fastpath)(struct net_device *, struct dst_entry*); -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL int netpoll_rx; #endif #ifdef CONFIG_NET_POLL_CONTROLLER diff --git a/net/core/dev.c b/net/core/dev.c index bd1f159be6505..7a50c543e5057 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1551,7 +1551,7 @@ int netif_rx(struct sk_buff *skb) struct softnet_data *queue; unsigned long flags; -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL if (skb->dev->netpoll_rx && netpoll_rx(skb)) { kfree_skb(skb); return NET_RX_DROP; @@ -1746,7 +1746,7 @@ int netif_receive_skb(struct sk_buff *skb) int ret = NET_RX_DROP; unsigned short type; -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL if (skb->dev->netpoll_rx && skb->dev->poll && netpoll_rx(skb)) { kfree_skb(skb); return NET_RX_DROP; diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 916e8fb9bcf93..ac1295f74441f 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -607,9 +607,7 @@ int netpoll_setup(struct netpoll *np) if(np->rx_hook) { unsigned long flags; -#ifdef CONFIG_NETPOLL_RX np->dev->netpoll_rx = 1; -#endif spin_lock_irqsave(&rx_list_lock, flags); list_add(&np->rx_list, &rx_list); @@ -624,18 +622,16 @@ int netpoll_setup(struct netpoll *np) void netpoll_cleanup(struct netpoll *np) { - if(np->rx_hook) { + if (np->rx_hook) { unsigned long flags; spin_lock_irqsave(&rx_list_lock, flags); list_del(&np->rx_list); -#ifdef CONFIG_NETPOLL_RX - if (np->dev) - np->dev->netpoll_rx = 0; -#endif spin_unlock_irqrestore(&rx_list_lock, flags); } + if (np->dev) + np->dev->netpoll_rx = 0; dev_put(np->dev); np->dev = NULL; } -- 2.53.0