From 6ed106549d17474ca17a16057f4c0ed4eba5a7ca Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 23 Jun 2009 06:03:08 +0000 Subject: net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/netrom/nr_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/netrom/nr_dev.c') diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 351372463fe..c7b7838a051 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c @@ -177,13 +177,13 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev) if (!nr_route_frame(skb, NULL)) { kfree_skb(skb); stats->tx_errors++; - return 0; + return NETDEV_TX_OK; } stats->tx_packets++; stats->tx_bytes += len; - return 0; + return NETDEV_TX_OK; } static const struct header_ops nr_header_ops = { -- cgit v1.2.3-70-g09d2 From 36e4d64a82d9a91a73a2b9b32117aedfe2211fb3 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 31 Aug 2009 19:50:43 +0000 Subject: convert hamradio drivers to netdev_txreturnt_t Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/hamradio/6pack.c | 2 +- drivers/net/hamradio/bpqether.c | 2 +- drivers/net/hamradio/hdlcdrv.c | 3 ++- drivers/net/hamradio/mkiss.c | 2 +- drivers/net/hamradio/scc.c | 5 +++-- drivers/net/hamradio/yam.c | 3 ++- net/netrom/nr_dev.c | 2 +- net/rose/rose_dev.c | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) (limited to 'net/netrom/nr_dev.c') diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 6cb2bdfd7b1..fb588301a05 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -242,7 +242,7 @@ out_drop: /* Encapsulate an IP datagram and kick it into a TTY queue. */ -static int sp_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t sp_xmit(struct sk_buff *skb, struct net_device *dev) { struct sixpack *sp = netdev_priv(dev); diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 4c5f4dfbe05..3c7cc7f4580 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -247,7 +247,7 @@ drop: /* * Send an AX.25 frame via an ethernet interface */ -static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t bpq_xmit(struct sk_buff *skb, struct net_device *dev) { struct sk_buff *newskb; unsigned char *ptr; diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 16b060b9211..0013c409782 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -399,7 +399,8 @@ void hdlcdrv_arbitrate(struct net_device *dev, struct hdlcdrv_state *s) * ===================== network driver interface ========================= */ -static int hdlcdrv_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t hdlcdrv_send_packet(struct sk_buff *skb, + struct net_device *dev) { struct hdlcdrv_state *sm = netdev_priv(dev); diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index ac191ef2119..33b55f72974 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -525,7 +525,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len) } /* Encapsulate an AX.25 packet and kick it into a TTY queue. */ -static int ax_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t ax_xmit(struct sk_buff *skb, struct net_device *dev) { struct mkiss *ax = netdev_priv(dev); diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index c5406525c1a..35c936175bb 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -209,7 +209,8 @@ static void scc_net_setup(struct net_device *dev); static int scc_net_open(struct net_device *dev); static int scc_net_close(struct net_device *dev); static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb); -static int scc_net_tx(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t scc_net_tx(struct sk_buff *skb, + struct net_device *dev); static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); static int scc_net_set_mac_address(struct net_device *dev, void *addr); static struct net_device_stats * scc_net_get_stats(struct net_device *dev); @@ -1634,7 +1635,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb) /* ----> transmit frame <---- */ -static int scc_net_tx(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t scc_net_tx(struct sk_buff *skb, struct net_device *dev) { struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; unsigned long flags; diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index b85aa162314..694132e04af 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -594,7 +594,8 @@ static void ptt_off(struct net_device *dev) outb(PTT_OFF, MCR(dev->base_addr)); } -static int yam_send_packet(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t yam_send_packet(struct sk_buff *skb, + struct net_device *dev) { struct yam_port *yp = netdev_priv(dev); diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index c7b7838a051..7aa11b01b2e 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c @@ -169,7 +169,7 @@ static int nr_close(struct net_device *dev) return 0; } -static int nr_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t nr_xmit(struct sk_buff *skb, struct net_device *dev) { struct net_device_stats *stats = &dev->stats; unsigned int len = skb->len; diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index c711e2edf5c..424b893d145 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c @@ -131,7 +131,7 @@ static int rose_close(struct net_device *dev) return 0; } -static int rose_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t rose_xmit(struct sk_buff *skb, struct net_device *dev) { struct net_device_stats *stats = &dev->stats; -- cgit v1.2.3-70-g09d2