Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 424efe9c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

netdev: convert pseudo drivers to netdev_tx_t



These are all drivers that don't touch real hardware.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6518bbb8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1188,7 +1188,7 @@ static int fwnet_stop(struct net_device *net)
	return 0;
}

static int fwnet_tx(struct sk_buff *skb, struct net_device *net)
static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net)
{
	struct fwnet_header hdr_buf;
	struct fwnet_device *dev = netdev_priv(net);
+1 −1
Original line number Diff line number Diff line
@@ -4450,7 +4450,7 @@ static void bond_set_xmit_hash_policy(struct bonding *bond)
	}
}

static int bond_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t bond_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
	const struct bonding *bond = netdev_priv(dev);

+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static void vcan_rx(struct sk_buff *skb, struct net_device *dev)
	netif_rx(skb);
}

static int vcan_tx(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
{
	struct net_device_stats *stats = &dev->stats;
	int loop;
+10 −12
Original line number Diff line number Diff line
@@ -39,8 +39,6 @@

static int numdummies = 1;

static int dummy_xmit(struct sk_buff *skb, struct net_device *dev);

static int dummy_set_address(struct net_device *dev, void *p)
{
	struct sockaddr *sa = p;
@@ -57,6 +55,16 @@ static void set_multicast_list(struct net_device *dev)
{
}


static netdev_tx_t dummy_xmit(struct sk_buff *skb, struct net_device *dev)
{
	dev->stats.tx_packets++;
	dev->stats.tx_bytes += skb->len;

	dev_kfree_skb(skb);
	return NETDEV_TX_OK;
}

static const struct net_device_ops dummy_netdev_ops = {
	.ndo_start_xmit		= dummy_xmit,
	.ndo_validate_addr	= eth_validate_addr,
@@ -78,16 +86,6 @@ static void dummy_setup(struct net_device *dev)
	dev->flags &= ~IFF_MULTICAST;
	random_ether_addr(dev->dev_addr);
}

static int dummy_xmit(struct sk_buff *skb, struct net_device *dev)
{
	dev->stats.tx_packets++;
	dev->stats.tx_bytes += skb->len;

	dev_kfree_skb(skb);
	return NETDEV_TX_OK;
}

static int dummy_validate(struct nlattr *tb[], struct nlattr *data[])
{
	if (tb[IFLA_ADDRESS]) {
+2 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@
static int eql_open(struct net_device *dev);
static int eql_close(struct net_device *dev);
static int eql_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t eql_slave_xmit(struct sk_buff *skb, struct net_device *dev);

#define eql_is_slave(dev)	((dev->flags & IFF_SLAVE) == IFF_SLAVE)
#define eql_is_master(dev)	((dev->flags & IFF_MASTER) == IFF_MASTER)
@@ -325,7 +325,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
	return best_slave;
}

static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
{
	equalizer_t *eql = netdev_priv(dev);
	slave_t *slave;
Loading