summaryrefslogtreecommitdiffstats
path: root/drivers/net/ifb.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 19:50:51 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-01 01:13:40 -0700
commit424efe9caf6047ffbcd6b383ff4d2347254aabf1 (patch)
treed0ed516baa5b452ed8bc3a88fbd061f6e415bfb9 /drivers/net/ifb.c
parent6518bbb803fe02b15a3211c8db2afdff0ac4f808 (diff)
downloadop-kernel-dev-424efe9caf6047ffbcd6b383ff4d2347254aabf1.zip
op-kernel-dev-424efe9caf6047ffbcd6b383ff4d2347254aabf1.tar.gz
netdev: convert pseudo drivers to netdev_tx_t
These are all drivers that don't touch real hardware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ifb.c')
-rw-r--r--drivers/net/ifb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 0a79b45..801f088 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -59,7 +59,7 @@ struct ifb_private {
static int numifbs = 2;
static void ri_tasklet(unsigned long dev);
-static int ifb_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev);
static int ifb_open(struct net_device *dev);
static int ifb_close(struct net_device *dev);
@@ -160,11 +160,10 @@ static void ifb_setup(struct net_device *dev)
random_ether_addr(dev->dev_addr);
}
-static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ifb_private *dp = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
- int ret = NETDEV_TX_OK;
u32 from = G_TC_FROM(skb->tc_verd);
stats->rx_packets++;
@@ -173,7 +172,7 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->iif) {
dev_kfree_skb(skb);
stats->rx_dropped++;
- return ret;
+ return NETDEV_TX_OK;
}
if (skb_queue_len(&dp->rq) >= dev->tx_queue_len) {
@@ -187,7 +186,7 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
tasklet_schedule(&dp->ifb_tasklet);
}
- return ret;
+ return NETDEV_TX_OK;
}
static int ifb_close(struct net_device *dev)
OpenPOWER on IntegriCloud