.local_port = 6665,
.remote_port = 6666,
.remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- .drop = netpoll_queue,
};
static int configured = 0;
struct net_device *dev;
char dev_name[16], *name;
void (*rx_hook)(struct netpoll *, int, char *, int);
- void (*drop)(struct sk_buff *skb);
+
u32 local_ip, remote_ip;
u16 local_port, remote_port;
unsigned char local_mac[6], remote_mac[6];
void netpoll_set_trap(int trap);
void netpoll_cleanup(struct netpoll *np);
int __netpoll_rx(struct sk_buff *skb);
-void netpoll_queue(struct sk_buff *skb);
+
#ifdef CONFIG_NETPOLL
static inline int netpoll_rx(struct sk_buff *skb)
}
}
-void netpoll_queue(struct sk_buff *skb)
-{
- struct net_device *dev = skb->dev;
- struct netpoll_info *npinfo = dev->npinfo;
-
- if (!npinfo)
- kfree_skb(skb);
- else {
- skb_queue_tail(&npinfo->txq, skb);
- schedule_work(&npinfo->tx_work);
- }
-}
-
static int checksum_udp(struct sk_buff *skb, struct udphdr *uh,
unsigned short ulen, u32 saddr, u32 daddr)
{
}
/* don't get messages out of order, and no recursion */
- if ( !(np->drop == netpoll_queue && skb_queue_len(&npinfo->txq))
+ if ( skb_queue_len(&npinfo->txq) == 0
&& npinfo->poll_owner != smp_processor_id()
&& netif_tx_trylock(dev)) {
}
if (status != NETDEV_TX_OK) {
- /* requeue for later */
- if (np->drop)
- np->drop(skb);
- else
- __kfree_skb(skb);
+ skb_queue_tail(&npinfo->txq, skb);
+ schedule_work(&npinfo->tx_work);
}
}
EXPORT_SYMBOL(netpoll_cleanup);
EXPORT_SYMBOL(netpoll_send_udp);
EXPORT_SYMBOL(netpoll_poll);
-EXPORT_SYMBOL(netpoll_queue);