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

netdev: convert bulk of drivers to netdev_tx_t



In a couple of cases collapse some extra code like:
   int retval = NETDEV_TX_OK;
   ...
   return retval;
into
   return NETDEV_TX_OK;

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0cf9c0d
......@@ -257,7 +257,8 @@ static int ieee802154_fake_close(struct net_device *dev)
return 0;
}
static int ieee802154_fake_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ieee802154_fake_xmit(struct sk_buff *skb,
struct net_device *dev)
{
skb->iif = dev->ifindex;
skb->dev = dev;
......
......@@ -736,7 +736,8 @@ static void cp_tx (struct cp_private *cp)
netif_wake_queue(cp->dev);
}
static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
struct net_device *dev)
{
struct cp_private *cp = netdev_priv(dev);
unsigned entry;
......
......@@ -628,8 +628,8 @@ static void mdio_write (struct net_device *dev, int phy_id, int location,
static void rtl8139_start_thread(struct rtl8139_private *tp);
static void rtl8139_tx_timeout (struct net_device *dev);
static void rtl8139_init_ring (struct net_device *dev);
static int rtl8139_start_xmit (struct sk_buff *skb,
struct net_device *dev);
static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
struct net_device *dev);
#ifdef CONFIG_NET_POLL_CONTROLLER
static void rtl8139_poll_controller(struct net_device *dev);
#endif
......@@ -1687,7 +1687,8 @@ static void rtl8139_tx_timeout (struct net_device *dev)
}
}
static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
struct net_device *dev)
{
struct rtl8139_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
......
......@@ -356,7 +356,7 @@ static char init_setup[] =
0x7f /* *multi IA */ };
static int i596_open(struct net_device *dev);
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t i596_interrupt(int irq, void *dev_id);
static int i596_close(struct net_device *dev);
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd);
......@@ -1054,8 +1054,7 @@ static void i596_tx_timeout (struct net_device *dev)
netif_wake_queue (dev);
}
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct i596_private *lp = dev->ml_priv;
struct tx_cmd *tx_cmd;
......
......@@ -17,7 +17,7 @@ int ei_close(struct net_device *dev)
}
EXPORT_SYMBOL(ei_close);
int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
return __ei_start_xmit(skb, dev);
}
......
......@@ -40,7 +40,7 @@ extern int ei_open(struct net_device *dev);
extern int ei_close(struct net_device *dev);
extern irqreturn_t ei_interrupt(int irq, void *dev_id);
extern void ei_tx_timeout(struct net_device *dev);
extern int ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern void ei_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *ei_get_stats(struct net_device *dev);
......@@ -58,7 +58,7 @@ extern int eip_open(struct net_device *dev);
extern int eip_close(struct net_device *dev);
extern irqreturn_t eip_interrupt(int irq, void *dev_id);
extern void eip_tx_timeout(struct net_device *dev);
extern int eip_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern netdev_tx_t eip_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern void eip_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *eip_get_stats(struct net_device *dev);
......
......@@ -22,7 +22,7 @@ int eip_close(struct net_device *dev)
}
EXPORT_SYMBOL(eip_close);
int eip_start_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t eip_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
return __ei_start_xmit(skb, dev);
}
......
......@@ -547,7 +547,8 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(dev);
}
static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t lance_start_xmit (struct sk_buff *skb,
struct net_device *dev)
{
struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll;
......
......@@ -2464,7 +2464,8 @@ ace_load_tx_bd(struct ace_private *ap, struct tx_desc *desc, u64 addr,
}
static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct ace_private *ap = netdev_priv(dev);
struct ace_regs __iomem *regs = ap->regs;
......
......@@ -775,7 +775,8 @@ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs);
static irqreturn_t ace_interrupt(int irq, void *dev_id);
static int ace_load_firmware(struct net_device *dev);
static int ace_open(struct net_device *dev);
static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
struct net_device *dev);
static int ace_close(struct net_device *dev);
static void ace_tasklet(unsigned long dev);
static void ace_dump_trace(struct ace_private *ap);
......
......@@ -1300,7 +1300,8 @@ static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp )
This function will queue the transmit packets to the descriptors and will trigger the send operation. It also initializes the transmit descriptors with buffer physical address, byte count, ownership to hardware etc.
*/
static int amd8111e_start_xmit(struct sk_buff *skb, struct net_device * dev)
static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
struct net_device * dev)
{
struct amd8111e_priv *lp = netdev_priv(dev);
int tx_index;
......
......@@ -591,7 +591,8 @@ static int arcnet_rebuild_header(struct sk_buff *skb)
/* Called by the kernel in order to transmit a packet. */
int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev)
netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
struct net_device *dev)
{
struct arcnet_local *lp = netdev_priv(dev);
struct archdr *pkt;
......
......@@ -115,7 +115,8 @@ struct lancedata {
static int ariadne_open(struct net_device *dev);
static void ariadne_init_ring(struct net_device *dev);
static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb,
struct net_device *dev);
static void ariadne_tx_timeout(struct net_device *dev);
static int ariadne_rx(struct net_device *dev);
static void ariadne_reset(struct net_device *dev);
......@@ -589,7 +590,8 @@ static void ariadne_tx_timeout(struct net_device *dev)
}
static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct ariadne_private *priv = netdev_priv(dev);
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
......
......@@ -159,7 +159,8 @@ struct net_local {
static int at1700_probe1(struct net_device *dev, int ioaddr);
static int read_eeprom(long ioaddr, int location);
static int net_open(struct net_device *dev);
static int net_send_packet(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t net_send_packet(struct sk_buff *skb,
struct net_device *dev);
static irqreturn_t net_interrupt(int irq, void *dev_id);
static void net_rx(struct net_device *dev);
static int net_close(struct net_device *dev);
......@@ -595,7 +596,8 @@ static void net_tx_timeout (struct net_device *dev)
}
static int net_send_packet (struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t net_send_packet (struct sk_buff *skb,
struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;
......
......@@ -2055,7 +2055,8 @@ static void atl1c_tx_queue(struct atl1c_adapter *adapter, struct sk_buff *skb,
AT_WRITE_REG(&adapter->hw, REG_MB_PRIO_PROD_IDX, prod_data);
}
static int atl1c_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{
struct atl1c_adapter *adapter = netdev_priv(netdev);
unsigned long flags;
......
......@@ -1839,7 +1839,8 @@ static void atl1e_tx_queue(struct atl1e_adapter *adapter, u16 count,
AT_WRITE_REG(&adapter->hw, REG_MB_TPD_PROD_IDX, tx_ring->next_to_use);
}
static int atl1e_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{
struct atl1e_adapter *adapter = netdev_priv(netdev);
unsigned long flags;
......
......@@ -2349,7 +2349,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
atomic_set(&tpd_ring->next_to_use, next_to_use);
}
static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{
struct atl1_adapter *adapter = netdev_priv(netdev);
struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
......
......@@ -821,7 +821,8 @@ static inline int TxdFreeBytes(struct atl2_adapter *adapter)
(int) (txd_read_ptr - adapter->txd_write_ptr - 1);
}
static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
struct tx_pkt_header *txph;
......
......@@ -199,7 +199,8 @@ static int net_open(struct net_device *dev);
static void hardware_init(struct net_device *dev);
static void write_packet(long ioaddr, int length, unsigned char *packet, int pad, int mode);
static void trigger_send(long ioaddr, int length);
static int atp_send_packet(struct sk_buff *skb, struct net_device *dev);
static netdev_tx_t atp_send_packet(struct sk_buff *skb,
struct net_device *dev);
static irqreturn_t atp_interrupt(int irq, void *dev_id);
static void net_rx(struct net_device *dev);
static void read_block(long ioaddr, int length, unsigned char *buffer, int data_mode);
......@@ -552,7 +553,8 @@ static void tx_timeout(struct net_device *dev)
dev->stats.tx_errors++;
}
static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t atp_send_packet(struct sk_buff *skb,
struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
long ioaddr = dev->base_addr;
......
......@@ -937,7 +937,7 @@ static int au1000_close(struct net_device *dev)
/*
* Au1000 transmit routine.
*/
static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
{
struct au1000_private *aup = netdev_priv(dev);
struct net_device_stats *ps = &dev->stats;
......
Supports Markdown
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