aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 15:50:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:13:07 -0400
commit6fef4c0c8eeff7de13007a5f56113475444a253d (patch)
tree216bafb88ab84c5e0a048598cd6c05f7eb8f438d
parentdc1f8bf68b311b1537cb65893430b6796118498a (diff)
netdev: convert pseudo-devices to netdev_tx_t
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/ieee1394/eth1394.c14
-rw-r--r--net/8021q/vlan_dev.c7
-rw-r--r--net/bluetooth/bnep/netdev.c3
-rw-r--r--net/bridge/br_device.c2
-rw-r--r--net/bridge/br_private.h3
-rw-r--r--net/core/pktgen.c2
-rw-r--r--net/dsa/dsa_priv.h6
-rw-r--r--net/dsa/tag_dsa.c2
-rw-r--r--net/dsa/tag_edsa.c2
-rw-r--r--net/dsa/tag_trailer.c2
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ipip.c2
-rw-r--r--net/ipv4/ipmr.c2
-rw-r--r--net/ipv6/ip6_tunnel.c2
-rw-r--r--net/ipv6/ip6mr.c3
-rw-r--r--net/ipv6/sit.c3
-rw-r--r--net/sched/sch_teql.c4
17 files changed, 30 insertions, 31 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index f5c586c2bba..1ad8785e398 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -169,7 +169,8 @@ static int ether1394_header_cache(const struct neighbour *neigh,
169static void ether1394_header_cache_update(struct hh_cache *hh, 169static void ether1394_header_cache_update(struct hh_cache *hh,
170 const struct net_device *dev, 170 const struct net_device *dev,
171 const unsigned char *haddr); 171 const unsigned char *haddr);
172static int ether1394_tx(struct sk_buff *skb, struct net_device *dev); 172static netdev_tx_t ether1394_tx(struct sk_buff *skb,
173 struct net_device *dev);
173static void ether1394_iso(struct hpsb_iso *iso); 174static void ether1394_iso(struct hpsb_iso *iso);
174 175
175static struct ethtool_ops ethtool_ops; 176static struct ethtool_ops ethtool_ops;
@@ -1555,7 +1556,8 @@ static void ether1394_complete_cb(void *__ptask)
1555} 1556}
1556 1557
1557/* Transmit a packet (called by kernel) */ 1558/* Transmit a packet (called by kernel) */
1558static int ether1394_tx(struct sk_buff *skb, struct net_device *dev) 1559static netdev_tx_t ether1394_tx(struct sk_buff *skb,
1560 struct net_device *dev)
1559{ 1561{
1560 struct eth1394hdr hdr_buf; 1562 struct eth1394hdr hdr_buf;
1561 struct eth1394_priv *priv = netdev_priv(dev); 1563 struct eth1394_priv *priv = netdev_priv(dev);
@@ -1694,14 +1696,6 @@ fail:
1694 dev->stats.tx_errors++; 1696 dev->stats.tx_errors++;
1695 spin_unlock_irqrestore(&priv->lock, flags); 1697 spin_unlock_irqrestore(&priv->lock, flags);
1696 1698
1697 /*
1698 * FIXME: According to a patch from 2003-02-26, "returning non-zero
1699 * causes serious problems" here, allegedly. Before that patch,
1700 * -ERRNO was returned which is not appropriate under Linux 2.6.
1701 * Perhaps more needs to be done? Stop the queue in serious
1702 * conditions and restart it elsewhere?
1703 */
1704 /* return NETDEV_TX_BUSY; */
1705 return NETDEV_TX_OK; 1699 return NETDEV_TX_OK;
1706} 1700}
1707 1701
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 6e695acd1ae..84a2be43185 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -288,7 +288,8 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
288 return rc; 288 return rc;
289} 289}
290 290
291static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 291static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
292 struct net_device *dev)
292{ 293{
293 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); 294 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
294 struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data); 295 struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
@@ -325,8 +326,8 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
325 return NETDEV_TX_OK; 326 return NETDEV_TX_OK;
326} 327}
327 328
328static int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, 329static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
329 struct net_device *dev) 330 struct net_device *dev)
330{ 331{
331 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); 332 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
332 u16 vlan_tci; 333 u16 vlan_tci;
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index 9c42990126a..26fb831ef7e 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -165,7 +165,8 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session
165} 165}
166#endif 166#endif
167 167
168static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) 168static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
169 struct net_device *dev)
169{ 170{
170 struct bnep_session *s = netdev_priv(dev); 171 struct bnep_session *s = netdev_priv(dev);
171 struct sock *sk = s->sock->sk; 172 struct sock *sk = s->sock->sk;
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 15d43ba86b5..07a07770c8b 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -20,7 +20,7 @@
20#include "br_private.h" 20#include "br_private.h"
21 21
22/* net device transmit always called with no BH (preempt_disabled) */ 22/* net device transmit always called with no BH (preempt_disabled) */
23int br_dev_xmit(struct sk_buff *skb, struct net_device *dev) 23netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
24{ 24{
25 struct net_bridge *br = netdev_priv(dev); 25 struct net_bridge *br = netdev_priv(dev);
26 const unsigned char *dest = skb->data; 26 const unsigned char *dest = skb->data;
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 8319247dad5..2114e45682e 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -143,7 +143,8 @@ static inline int br_is_root_bridge(const struct net_bridge *br)
143 143
144/* br_device.c */ 144/* br_device.c */
145extern void br_dev_setup(struct net_device *dev); 145extern void br_dev_setup(struct net_device *dev);
146extern int br_dev_xmit(struct sk_buff *skb, struct net_device *dev); 146extern netdev_tx_t br_dev_xmit(struct sk_buff *skb,
147 struct net_device *dev);
147 148
148/* br_fdb.c */ 149/* br_fdb.c */
149extern int br_fdb_init(void); 150extern int br_fdb_init(void);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 2001cb1cf5c..0bcecbf0658 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3381,7 +3381,7 @@ static void idle(struct pktgen_dev *pkt_dev)
3381static void pktgen_xmit(struct pktgen_dev *pkt_dev) 3381static void pktgen_xmit(struct pktgen_dev *pkt_dev)
3382{ 3382{
3383 struct net_device *odev = pkt_dev->odev; 3383 struct net_device *odev = pkt_dev->odev;
3384 int (*xmit)(struct sk_buff *, struct net_device *) 3384 netdev_tx_t (*xmit)(struct sk_buff *, struct net_device *)
3385 = odev->netdev_ops->ndo_start_xmit; 3385 = odev->netdev_ops->ndo_start_xmit;
3386 struct netdev_queue *txq; 3386 struct netdev_queue *txq;
3387 u16 queue_map; 3387 u16 queue_map;
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 41055f33d28..4b0ea054044 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -169,13 +169,13 @@ struct net_device *dsa_slave_create(struct dsa_switch *ds,
169 int port, char *name); 169 int port, char *name);
170 170
171/* tag_dsa.c */ 171/* tag_dsa.c */
172int dsa_xmit(struct sk_buff *skb, struct net_device *dev); 172netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev);
173 173
174/* tag_edsa.c */ 174/* tag_edsa.c */
175int edsa_xmit(struct sk_buff *skb, struct net_device *dev); 175netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev);
176 176
177/* tag_trailer.c */ 177/* tag_trailer.c */
178int trailer_xmit(struct sk_buff *skb, struct net_device *dev); 178netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev);
179 179
180 180
181#endif 181#endif
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c
index 8fa25bafe6c..cdf2d28a029 100644
--- a/net/dsa/tag_dsa.c
+++ b/net/dsa/tag_dsa.c
@@ -15,7 +15,7 @@
15 15
16#define DSA_HLEN 4 16#define DSA_HLEN 4
17 17
18int dsa_xmit(struct sk_buff *skb, struct net_device *dev) 18netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev)
19{ 19{
20 struct dsa_slave_priv *p = netdev_priv(dev); 20 struct dsa_slave_priv *p = netdev_priv(dev);
21 u8 *dsa_header; 21 u8 *dsa_header;
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
index 815607bd286..8f53948cff4 100644
--- a/net/dsa/tag_edsa.c
+++ b/net/dsa/tag_edsa.c
@@ -16,7 +16,7 @@
16#define DSA_HLEN 4 16#define DSA_HLEN 4
17#define EDSA_HLEN 8 17#define EDSA_HLEN 8
18 18
19int edsa_xmit(struct sk_buff *skb, struct net_device *dev) 19netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev)
20{ 20{
21 struct dsa_slave_priv *p = netdev_priv(dev); 21 struct dsa_slave_priv *p = netdev_priv(dev);
22 u8 *edsa_header; 22 u8 *edsa_header;
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index 1c3e30c38b8..a85c829853c 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -13,7 +13,7 @@
13#include <linux/netdevice.h> 13#include <linux/netdevice.h>
14#include "dsa_priv.h" 14#include "dsa_priv.h"
15 15
16int trailer_xmit(struct sk_buff *skb, struct net_device *dev) 16netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
17{ 17{
18 struct dsa_slave_priv *p = netdev_priv(dev); 18 struct dsa_slave_priv *p = netdev_priv(dev);
19 struct sk_buff *nskb; 19 struct sk_buff *nskb;
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index b902ef55be7..5b1af70cd80 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -662,7 +662,7 @@ drop_nolock:
662 return(0); 662 return(0);
663} 663}
664 664
665static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 665static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
666{ 666{
667 struct ip_tunnel *tunnel = netdev_priv(dev); 667 struct ip_tunnel *tunnel = netdev_priv(dev);
668 struct net_device_stats *stats = &tunnel->dev->stats; 668 struct net_device_stats *stats = &tunnel->dev->stats;
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 98075b6d619..62548cb0923 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -387,7 +387,7 @@ static int ipip_rcv(struct sk_buff *skb)
387 * and that skb is filled properly by that function. 387 * and that skb is filled properly by that function.
388 */ 388 */
389 389
390static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 390static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
391{ 391{
392 struct ip_tunnel *tunnel = netdev_priv(dev); 392 struct ip_tunnel *tunnel = netdev_priv(dev);
393 struct net_device_stats *stats = &tunnel->dev->stats; 393 struct net_device_stats *stats = &tunnel->dev->stats;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 06c33fb6b32..65d421cf5bc 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -201,7 +201,7 @@ failure:
201 201
202#ifdef CONFIG_IP_PIMSM 202#ifdef CONFIG_IP_PIMSM
203 203
204static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) 204static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
205{ 205{
206 struct net *net = dev_net(dev); 206 struct net *net = dev_net(dev);
207 207
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index a1d6045c469..7d25bbe3211 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1036,7 +1036,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
1036 return 0; 1036 return 0;
1037} 1037}
1038 1038
1039static int 1039static netdev_tx_t
1040ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) 1040ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
1041{ 1041{
1042 struct ip6_tnl *t = netdev_priv(dev); 1042 struct ip6_tnl *t = netdev_priv(dev);
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 07ded5075b3..19c8dec2ead 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -416,7 +416,8 @@ static struct inet6_protocol pim6_protocol = {
416 416
417/* Service routines creating virtual interfaces: PIMREG */ 417/* Service routines creating virtual interfaces: PIMREG */
418 418
419static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) 419static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
420 struct net_device *dev)
420{ 421{
421 struct net *net = dev_net(dev); 422 struct net *net = dev_net(dev);
422 423
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 1d25a4dff0a..0ae4f644818 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -609,7 +609,8 @@ static inline __be32 try_6to4(struct in6_addr *v6dst)
609 * and that skb is filled properly by that function. 609 * and that skb is filled properly by that function.
610 */ 610 */
611 611
612static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 612static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
613 struct net_device *dev)
613{ 614{
614 struct ip_tunnel *tunnel = netdev_priv(dev); 615 struct ip_tunnel *tunnel = netdev_priv(dev);
615 struct net_device_stats *stats = &tunnel->dev->stats; 616 struct net_device_stats *stats = &tunnel->dev->stats;
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 12434b6c204..5a002c24723 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -268,7 +268,7 @@ static inline int teql_resolve(struct sk_buff *skb,
268 return __teql_resolve(skb, skb_res, dev); 268 return __teql_resolve(skb, skb_res, dev);
269} 269}
270 270
271static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) 271static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
272{ 272{
273 struct teql_master *master = netdev_priv(dev); 273 struct teql_master *master = netdev_priv(dev);
274 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); 274 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
@@ -307,7 +307,7 @@ restart:
307 307
308 if (!netif_tx_queue_stopped(slave_txq) && 308 if (!netif_tx_queue_stopped(slave_txq) &&
309 !netif_tx_queue_frozen(slave_txq) && 309 !netif_tx_queue_frozen(slave_txq) &&
310 slave_ops->ndo_start_xmit(skb, slave) == 0) { 310 slave_ops->ndo_start_xmit(skb, slave) == NETDEV_TX_OK) {
311 txq_trans_update(slave_txq); 311 txq_trans_update(slave_txq);
312 __netif_tx_unlock(slave_txq); 312 __netif_tx_unlock(slave_txq);
313 master->slaves = NEXT_SLAVE(q); 313 master->slaves = NEXT_SLAVE(q);