From 424efe9caf6047ffbcd6b383ff4d2347254aabf1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 31 Aug 2009 19:50:51 +0000 Subject: netdev: convert pseudo drivers to netdev_tx_t These are all drivers that don't touch real hardware. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/dummy.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'drivers/net/dummy.c') diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index 713ce6c532c5..37dcfdc63456 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -39,8 +39,6 @@ static int numdummies = 1; -static int dummy_xmit(struct sk_buff *skb, struct net_device *dev); - static int dummy_set_address(struct net_device *dev, void *p) { struct sockaddr *sa = p; @@ -57,6 +55,16 @@ static void set_multicast_list(struct net_device *dev) { } + +static netdev_tx_t dummy_xmit(struct sk_buff *skb, struct net_device *dev) +{ + dev->stats.tx_packets++; + dev->stats.tx_bytes += skb->len; + + dev_kfree_skb(skb); + return NETDEV_TX_OK; +} + static const struct net_device_ops dummy_netdev_ops = { .ndo_start_xmit = dummy_xmit, .ndo_validate_addr = eth_validate_addr, @@ -78,16 +86,6 @@ static void dummy_setup(struct net_device *dev) dev->flags &= ~IFF_MULTICAST; random_ether_addr(dev->dev_addr); } - -static int dummy_xmit(struct sk_buff *skb, struct net_device *dev) -{ - dev->stats.tx_packets++; - dev->stats.tx_bytes += skb->len; - - dev_kfree_skb(skb); - return NETDEV_TX_OK; -} - static int dummy_validate(struct nlattr *tb[], struct nlattr *data[]) { if (tb[IFLA_ADDRESS]) { -- cgit v1.2.1