diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-08-31 15:50:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-01 04:13:40 -0400 |
commit | 424efe9caf6047ffbcd6b383ff4d2347254aabf1 (patch) | |
tree | d0ed516baa5b452ed8bc3a88fbd061f6e415bfb9 /drivers/net/ifb.c | |
parent | 6518bbb803fe02b15a3211c8db2afdff0ac4f808 (diff) |
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.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 0a79b4517804..801f088c134f 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -59,7 +59,7 @@ struct ifb_private { | |||
59 | static int numifbs = 2; | 59 | static int numifbs = 2; |
60 | 60 | ||
61 | static void ri_tasklet(unsigned long dev); | 61 | static void ri_tasklet(unsigned long dev); |
62 | static int ifb_xmit(struct sk_buff *skb, struct net_device *dev); | 62 | static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev); |
63 | static int ifb_open(struct net_device *dev); | 63 | static int ifb_open(struct net_device *dev); |
64 | static int ifb_close(struct net_device *dev); | 64 | static int ifb_close(struct net_device *dev); |
65 | 65 | ||
@@ -160,11 +160,10 @@ static void ifb_setup(struct net_device *dev) | |||
160 | random_ether_addr(dev->dev_addr); | 160 | random_ether_addr(dev->dev_addr); |
161 | } | 161 | } |
162 | 162 | ||
163 | static int ifb_xmit(struct sk_buff *skb, struct net_device *dev) | 163 | static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev) |
164 | { | 164 | { |
165 | struct ifb_private *dp = netdev_priv(dev); | 165 | struct ifb_private *dp = netdev_priv(dev); |
166 | struct net_device_stats *stats = &dev->stats; | 166 | struct net_device_stats *stats = &dev->stats; |
167 | int ret = NETDEV_TX_OK; | ||
168 | u32 from = G_TC_FROM(skb->tc_verd); | 167 | u32 from = G_TC_FROM(skb->tc_verd); |
169 | 168 | ||
170 | stats->rx_packets++; | 169 | stats->rx_packets++; |
@@ -173,7 +172,7 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev) | |||
173 | if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->iif) { | 172 | if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->iif) { |
174 | dev_kfree_skb(skb); | 173 | dev_kfree_skb(skb); |
175 | stats->rx_dropped++; | 174 | stats->rx_dropped++; |
176 | return ret; | 175 | return NETDEV_TX_OK; |
177 | } | 176 | } |
178 | 177 | ||
179 | if (skb_queue_len(&dp->rq) >= dev->tx_queue_len) { | 178 | 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) | |||
187 | tasklet_schedule(&dp->ifb_tasklet); | 186 | tasklet_schedule(&dp->ifb_tasklet); |
188 | } | 187 | } |
189 | 188 | ||
190 | return ret; | 189 | return NETDEV_TX_OK; |
191 | } | 190 | } |
192 | 191 | ||
193 | static int ifb_close(struct net_device *dev) | 192 | static int ifb_close(struct net_device *dev) |