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: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger
2009-08-31 19:50:58 +00:00
committed by David S. Miller
parent d0cf9c0dad
commit 61357325f3
102 changed files with 253 additions and 173 deletions
+2 -1
View File
@@ -257,7 +257,8 @@ static int ieee802154_fake_close(struct net_device *dev)
return 0; 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->iif = dev->ifindex;
skb->dev = dev; skb->dev = dev;
+2 -1
View File
@@ -736,7 +736,8 @@ static void cp_tx (struct cp_private *cp)
netif_wake_queue(cp->dev); 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); struct cp_private *cp = netdev_priv(dev);
unsigned entry; unsigned entry;
+4 -3
View File
@@ -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_start_thread(struct rtl8139_private *tp);
static void rtl8139_tx_timeout (struct net_device *dev); static void rtl8139_tx_timeout (struct net_device *dev);
static void rtl8139_init_ring (struct net_device *dev); static void rtl8139_init_ring (struct net_device *dev);
static int rtl8139_start_xmit (struct sk_buff *skb, static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
struct net_device *dev); struct net_device *dev);
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
static void rtl8139_poll_controller(struct net_device *dev); static void rtl8139_poll_controller(struct net_device *dev);
#endif #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); struct rtl8139_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr; void __iomem *ioaddr = tp->mmio_addr;
+2 -3
View File
@@ -356,7 +356,7 @@ static char init_setup[] =
0x7f /* *multi IA */ }; 0x7f /* *multi IA */ };
static int i596_open(struct net_device *dev); 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 irqreturn_t i596_interrupt(int irq, void *dev_id);
static int i596_close(struct net_device *dev); static int i596_close(struct net_device *dev);
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd); 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); netif_wake_queue (dev);
} }
static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct i596_private *lp = dev->ml_priv; struct i596_private *lp = dev->ml_priv;
struct tx_cmd *tx_cmd; struct tx_cmd *tx_cmd;
+1 -1
View File
@@ -17,7 +17,7 @@ int ei_close(struct net_device *dev)
} }
EXPORT_SYMBOL(ei_close); 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); return __ei_start_xmit(skb, dev);
} }
+2 -2
View File
@@ -40,7 +40,7 @@ extern int ei_open(struct net_device *dev);
extern int ei_close(struct net_device *dev); extern int ei_close(struct net_device *dev);
extern irqreturn_t ei_interrupt(int irq, void *dev_id); extern irqreturn_t ei_interrupt(int irq, void *dev_id);
extern void ei_tx_timeout(struct net_device *dev); 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 void ei_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *ei_get_stats(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 int eip_close(struct net_device *dev);
extern irqreturn_t eip_interrupt(int irq, void *dev_id); extern irqreturn_t eip_interrupt(int irq, void *dev_id);
extern void eip_tx_timeout(struct net_device *dev); 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 void eip_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *eip_get_stats(struct net_device *dev); extern struct net_device_stats *eip_get_stats(struct net_device *dev);
+1 -1
View File
@@ -22,7 +22,7 @@ int eip_close(struct net_device *dev)
} }
EXPORT_SYMBOL(eip_close); 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); return __ei_start_xmit(skb, dev);
} }
+2 -1
View File
@@ -547,7 +547,8 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(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); struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll; volatile struct lance_regs *ll = lp->ll;
+2 -1
View File
@@ -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_private *ap = netdev_priv(dev);
struct ace_regs __iomem *regs = ap->regs; struct ace_regs __iomem *regs = ap->regs;
+2 -1
View File
@@ -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 irqreturn_t ace_interrupt(int irq, void *dev_id);
static int ace_load_firmware(struct net_device *dev); static int ace_load_firmware(struct net_device *dev);
static int ace_open(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 int ace_close(struct net_device *dev);
static void ace_tasklet(unsigned long dev); static void ace_tasklet(unsigned long dev);
static void ace_dump_trace(struct ace_private *ap); static void ace_dump_trace(struct ace_private *ap);
+2 -1
View File
@@ -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. 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); struct amd8111e_priv *lp = netdev_priv(dev);
int tx_index; int tx_index;
+2 -1
View File
@@ -591,7 +591,8 @@ static int arcnet_rebuild_header(struct sk_buff *skb)
/* Called by the kernel in order to transmit a packet. */ /* 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 arcnet_local *lp = netdev_priv(dev);
struct archdr *pkt; struct archdr *pkt;
+4 -2
View File
@@ -115,7 +115,8 @@ struct lancedata {
static int ariadne_open(struct net_device *dev); static int ariadne_open(struct net_device *dev);
static void ariadne_init_ring(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 void ariadne_tx_timeout(struct net_device *dev);
static int ariadne_rx(struct net_device *dev); static int ariadne_rx(struct net_device *dev);
static void ariadne_reset(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); struct ariadne_private *priv = netdev_priv(dev);
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr; volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
+4 -2
View File
@@ -159,7 +159,8 @@ struct net_local {
static int at1700_probe1(struct net_device *dev, int ioaddr); static int at1700_probe1(struct net_device *dev, int ioaddr);
static int read_eeprom(long ioaddr, int location); static int read_eeprom(long ioaddr, int location);
static int net_open(struct net_device *dev); 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 irqreturn_t net_interrupt(int irq, void *dev_id);
static void net_rx(struct net_device *dev); static void net_rx(struct net_device *dev);
static int net_close(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); struct net_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr; int ioaddr = dev->base_addr;
+2 -1
View File
@@ -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); 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); struct atl1c_adapter *adapter = netdev_priv(netdev);
unsigned long flags; unsigned long flags;
+2 -1
View File
@@ -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); 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); struct atl1e_adapter *adapter = netdev_priv(netdev);
unsigned long flags; unsigned long flags;
+2 -1
View File
@@ -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); 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_adapter *adapter = netdev_priv(netdev);
struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
+2 -1
View File
@@ -821,7 +821,8 @@ static inline int TxdFreeBytes(struct atl2_adapter *adapter)
(int) (txd_read_ptr - adapter->txd_write_ptr - 1); (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 atl2_adapter *adapter = netdev_priv(netdev);
struct tx_pkt_header *txph; struct tx_pkt_header *txph;
+4 -2
View File
@@ -199,7 +199,8 @@ static int net_open(struct net_device *dev);
static void hardware_init(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 write_packet(long ioaddr, int length, unsigned char *packet, int pad, int mode);
static void trigger_send(long ioaddr, int length); 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 irqreturn_t atp_interrupt(int irq, void *dev_id);
static void net_rx(struct net_device *dev); static void net_rx(struct net_device *dev);
static void read_block(long ioaddr, int length, unsigned char *buffer, int data_mode); 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++; 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); struct net_local *lp = netdev_priv(dev);
long ioaddr = dev->base_addr; long ioaddr = dev->base_addr;
+1 -1
View File
@@ -937,7 +937,7 @@ static int au1000_close(struct net_device *dev)
/* /*
* Au1000 transmit routine. * 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 au1000_private *aup = netdev_priv(dev);
struct net_device_stats *ps = &dev->stats; struct net_device_stats *ps = &dev->stats;

Some files were not shown because too many files have changed in this diff Show More