Commit 6fef4c0c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

netdev: convert pseudo-devices to netdev_tx_t

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc1f8bf6
......@@ -169,7 +169,8 @@ static int ether1394_header_cache(const struct neighbour *neigh,
static void ether1394_header_cache_update(struct hh_cache *hh,
const struct net_device *dev,
const unsigned char *haddr);
static int ether1394_tx(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t ether1394_tx(struct sk_buff *skb,
struct net_device *dev);
static void ether1394_iso(struct hpsb_iso *iso);
static struct ethtool_ops ethtool_ops;
......@@ -1555,7 +1556,8 @@ static void ether1394_complete_cb(void *__ptask)
}
/* Transmit a packet (called by kernel) */
static int ether1394_tx(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ether1394_tx(struct sk_buff *skb,
struct net_device *dev)
{
struct eth1394hdr hdr_buf;
struct eth1394_priv *priv = netdev_priv(dev);
......@@ -1694,14 +1696,6 @@ static int ether1394_tx(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_errors++;
spin_unlock_irqrestore(&priv->lock, flags);
/*
* FIXME: According to a patch from 2003-02-26, "returning non-zero
* causes serious problems" here, allegedly. Before that patch,
* -ERRNO was returned which is not appropriate under Linux 2.6.
* Perhaps more needs to be done? Stop the queue in serious
* conditions and restart it elsewhere?
*/
/* return NETDEV_TX_BUSY; */
return NETDEV_TX_OK;
}
......
......@@ -288,7 +288,8 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
return rc;
}
static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
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)
return NETDEV_TX_OK;
}
static int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
u16 vlan_tci;
......
......@@ -165,7 +165,8 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session
}
#endif
static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct bnep_session *s = netdev_priv(dev);
struct sock *sk = s->sock->sk;
......
......@@ -20,7 +20,7 @@
#include "br_private.h"
/* net device transmit always called with no BH (preempt_disabled) */
int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_bridge *br = netdev_priv(dev);
const unsigned char *dest = skb->data;
......
......@@ -143,7 +143,8 @@ static inline int br_is_root_bridge(const struct net_bridge *br)
/* br_device.c */
extern void br_dev_setup(struct net_device *dev);
extern int br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
extern netdev_tx_t br_dev_xmit(struct sk_buff *skb,
struct net_device *dev);
/* br_fdb.c */
extern int br_fdb_init(void);
......
......@@ -3381,7 +3381,7 @@ static void idle(struct pktgen_dev *pkt_dev)
static void pktgen_xmit(struct pktgen_dev *pkt_dev)
{
struct net_device *odev = pkt_dev->odev;
int (*xmit)(struct sk_buff *, struct net_device *)
netdev_tx_t (*xmit)(struct sk_buff *, struct net_device *)
= odev->netdev_ops->ndo_start_xmit;
struct netdev_queue *txq;
u16 queue_map;
......
......@@ -169,13 +169,13 @@ struct net_device *dsa_slave_create(struct dsa_switch *ds,
int port, char *name);
/* tag_dsa.c */
int dsa_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev);
/* tag_edsa.c */
int edsa_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev);
/* tag_trailer.c */
int trailer_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev);
#endif
......@@ -15,7 +15,7 @@
#define DSA_HLEN 4
int dsa_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
u8 *dsa_header;
......
......@@ -16,7 +16,7 @@
#define DSA_HLEN 4
#define EDSA_HLEN 8
int edsa_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
u8 *edsa_header;
......
......@@ -13,7 +13,7 @@
#include <linux/netdevice.h>
#include "dsa_priv.h"
int trailer_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
struct sk_buff *nskb;
......
......@@ -662,7 +662,7 @@ static int ipgre_rcv(struct sk_buff *skb)
return(0);
}
static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct net_device_stats *stats = &tunnel->dev->stats;
......
......@@ -387,7 +387,7 @@ static int ipip_rcv(struct sk_buff *skb)
* and that skb is filled properly by that function.
*/
static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct net_device_stats *stats = &tunnel->dev->stats;
......
......@@ -201,7 +201,7 @@ struct net_device *ipmr_new_tunnel(struct net *net, struct vifctl *v)
#ifdef CONFIG_IP_PIMSM
static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net *net = dev_net(dev);
......
......@@ -1036,7 +1036,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
return 0;
}
static int
static netdev_tx_t
ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip6_tnl *t = netdev_priv(dev);
......
......@@ -416,7 +416,8 @@ static struct inet6_protocol pim6_protocol = {
/* Service routines creating virtual interfaces: PIMREG */
static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct net *net = dev_net(dev);
......
......@@ -609,7 +609,8 @@ static inline __be32 try_6to4(struct in6_addr *v6dst)
* and that skb is filled properly by that function.
*/
static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
struct net_device_stats *stats = &tunnel->dev->stats;
......
......@@ -268,7 +268,7 @@ static inline int teql_resolve(struct sk_buff *skb,
return __teql_resolve(skb, skb_res, dev);
}
static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct teql_master *master = netdev_priv(dev);
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
......@@ -307,7 +307,7 @@ static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
if (!netif_tx_queue_stopped(slave_txq) &&
!netif_tx_queue_frozen(slave_txq) &&
slave_ops->ndo_start_xmit(skb, slave) == 0) {
slave_ops->ndo_start_xmit(skb, slave) == NETDEV_TX_OK) {
txq_trans_update(slave_txq);
__netif_tx_unlock(slave_txq);
master->slaves = NEXT_SLAVE(q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment