aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ifb.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 15:50:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:13:40 -0400
commit424efe9caf6047ffbcd6b383ff4d2347254aabf1 (patch)
treed0ed516baa5b452ed8bc3a88fbd061f6e415bfb9 /drivers/net/ifb.c
parent6518bbb803fe02b15a3211c8db2afdff0ac4f808 (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.c9
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 {
59static int numifbs = 2; 59static int numifbs = 2;
60 60
61static void ri_tasklet(unsigned long dev); 61static void ri_tasklet(unsigned long dev);
62static int ifb_xmit(struct sk_buff *skb, struct net_device *dev); 62static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev);
63static int ifb_open(struct net_device *dev); 63static int ifb_open(struct net_device *dev);
64static int ifb_close(struct net_device *dev); 64static 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
163static int ifb_xmit(struct sk_buff *skb, struct net_device *dev) 163static 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
193static int ifb_close(struct net_device *dev) 192static int ifb_close(struct net_device *dev)