* [PATCH 07/19] tokenring: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: tokenring-tx.patch --]
[-- Type: text/plain, Size: 7476 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/tokenring/3c359.c | 4 ++--
drivers/net/tokenring/ibmtr.c | 6 ++++--
drivers/net/tokenring/lanstreamer.c | 6 ++++--
drivers/net/tokenring/olympic.c | 6 ++++--
drivers/net/tokenring/smctr.c | 6 ++++--
drivers/net/tokenring/tms380tr.c | 19 +++++++++++--------
6 files changed, 29 insertions(+), 18 deletions(-)
--- a/drivers/net/tokenring/3c359.c 2009-08-31 16:17:53.201090186 -0700
+++ b/drivers/net/tokenring/3c359.c 2009-08-31 16:26:58.753608726 -0700
@@ -128,7 +128,7 @@ static int xl_init(struct net_device *de
static int xl_open(struct net_device *dev);
static int xl_open_hw(struct net_device *dev) ;
static int xl_hw_reset(struct net_device *dev);
-static int xl_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev);
static void xl_dn_comp(struct net_device *dev);
static int xl_close(struct net_device *dev);
static void xl_set_rx_mode(struct net_device *dev);
@@ -1193,7 +1193,7 @@ static irqreturn_t xl_interrupt(int irq,
* Tx - Polling configuration
*/
-static int xl_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t xl_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct xl_private *xl_priv=netdev_priv(dev);
struct xl_tx_desc *txd ;
--- a/drivers/net/tokenring/ibmtr.c 2009-08-31 16:17:53.191088706 -0700
+++ b/drivers/net/tokenring/ibmtr.c 2009-08-31 16:26:58.753608726 -0700
@@ -191,7 +191,8 @@ static int tok_init_card(struct net_dev
static void tok_open_adapter(unsigned long dev_addr);
static void open_sap(unsigned char type, struct net_device *dev);
static void tok_set_multicast_list(struct net_device *dev);
-static int tok_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t tok_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static int tok_close(struct net_device *dev);
static irqreturn_t tok_interrupt(int irq, void *dev_id);
static void initial_tok_int(struct net_device *dev);
@@ -1022,7 +1023,8 @@ static void tok_set_multicast_list(struc
#define STATION_ID_OFST 4
-static int tok_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tok_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct tok_info *ti;
unsigned long flags;
--- a/drivers/net/tokenring/lanstreamer.c 2009-08-31 16:17:53.181109436 -0700
+++ b/drivers/net/tokenring/lanstreamer.c 2009-08-31 16:26:58.753608726 -0700
@@ -203,7 +203,8 @@ static int streamer_ioctl(struct net_dev
static int streamer_reset(struct net_device *dev);
static int streamer_open(struct net_device *dev);
-static int streamer_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t streamer_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int streamer_close(struct net_device *dev);
static void streamer_set_rx_mode(struct net_device *dev);
static irqreturn_t streamer_interrupt(int irq, void *dev_id);
@@ -1141,7 +1142,8 @@ static irqreturn_t streamer_interrupt(in
return IRQ_HANDLED;
}
-static int streamer_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t streamer_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct streamer_private *streamer_priv =
netdev_priv(dev);
--- a/drivers/net/tokenring/olympic.c 2009-08-31 16:17:53.191088706 -0700
+++ b/drivers/net/tokenring/olympic.c 2009-08-31 16:26:58.753608726 -0700
@@ -182,7 +182,8 @@ MODULE_DEVICE_TABLE(pci,olympic_pci_tbl)
static int olympic_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static int olympic_init(struct net_device *dev);
static int olympic_open(struct net_device *dev);
-static int olympic_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t olympic_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int olympic_close(struct net_device *dev);
static void olympic_set_rx_mode(struct net_device *dev);
static void olympic_freemem(struct net_device *dev) ;
@@ -1030,7 +1031,8 @@ static irqreturn_t olympic_interrupt(int
return IRQ_HANDLED;
}
-static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t olympic_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct olympic_private *olympic_priv=netdev_priv(dev);
u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio;
--- a/drivers/net/tokenring/smctr.c 2009-08-31 16:17:53.171107816 -0700
+++ b/drivers/net/tokenring/smctr.c 2009-08-31 16:26:58.753608726 -0700
@@ -234,7 +234,8 @@ static int smctr_rx_frame(struct net_dev
/* S */
static int smctr_send_dat(struct net_device *dev);
-static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t smctr_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static int smctr_send_lobe_media_test(struct net_device *dev);
static int smctr_send_rpt_addr(struct net_device *dev, MAC_HEADER *rmf,
__u16 correlator);
@@ -4571,7 +4572,8 @@ static void smctr_timeout(struct net_dev
/*
* Gets skb from system, queues it and checks if it can be sent
*/
-static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smctr_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct net_local *tp = netdev_priv(dev);
--- a/drivers/net/tokenring/tms380tr.c 2009-08-31 16:17:53.161108571 -0700
+++ b/drivers/net/tokenring/tms380tr.c 2009-08-31 16:26:58.753608726 -0700
@@ -144,8 +144,8 @@ static void tms380tr_exec_sifcmd(struct
/* "G" */
static struct net_device_stats *tms380tr_get_stats(struct net_device *dev);
/* "H" */
-static int tms380tr_hardware_send_packet(struct sk_buff *skb,
- struct net_device *dev);
+static netdev_tx_t tms380tr_hardware_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
/* "I" */
static int tms380tr_init_adapter(struct net_device *dev);
static void tms380tr_init_ipb(struct net_local *tp);
@@ -165,7 +165,8 @@ static int tms380tr_reset_adapter(struc
static void tms380tr_reset_interrupt(struct net_device *dev);
static void tms380tr_ring_status_irq(struct net_device *dev);
/* "S" */
-static int tms380tr_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t tms380tr_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static void tms380tr_set_multicast_list(struct net_device *dev);
static int tms380tr_set_mac_address(struct net_device *dev, void *addr);
/* "T" */
@@ -599,21 +600,23 @@ static void tms380tr_timeout(struct net_
/*
* Gets skb from system, queues it and checks if it can be sent
*/
-static int tms380tr_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tms380tr_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct net_local *tp = netdev_priv(dev);
- int err;
+ netdev_tx_t rc;
- err = tms380tr_hardware_send_packet(skb, dev);
+ rc = tms380tr_hardware_send_packet(skb, dev);
if(tp->TplFree->NextTPLPtr->BusyFlag)
netif_stop_queue(dev);
- return (err);
+ return rc;
}
/*
* Move frames into adapter tx queue
*/
-static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tms380tr_hardware_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
TPL *tpl;
short length;
--
^ permalink raw reply
* [PATCH 05/19] isdn: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Karsten Keil; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: isdn-tx.patch --]
[-- Type: text/plain, Size: 1578 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/isdn/hysdn/hysdn_net.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/isdn/hysdn/hysdn_net.c 2009-08-31 16:17:53.311128475 -0700
+++ b/drivers/isdn/hysdn/hysdn_net.c 2009-08-31 16:26:00.361108706 -0700
@@ -119,7 +119,7 @@ net_close(struct net_device *dev)
/* send a packet on this interface. */
/* new style for kernel >= 2.3.33 */
/************************************/
-static int
+static netdev_tx_t
net_send_packet(struct sk_buff *skb, struct net_device *dev)
{
struct net_local *lp = (struct net_local *) dev;
--- a/drivers/isdn/i4l/isdn_net.c 2009-08-31 16:17:53.301109604 -0700
+++ b/drivers/isdn/i4l/isdn_net.c 2009-08-31 16:26:00.361108706 -0700
@@ -176,7 +176,8 @@ static __inline__ void isdn_net_zero_fra
/* Prototypes */
static int isdn_net_force_dial_lp(isdn_net_local *);
-static int isdn_net_start_xmit(struct sk_buff *, struct net_device *);
+static netdev_tx_t isdn_net_start_xmit(struct sk_buff *,
+ struct net_device *);
static void isdn_net_ciscohdlck_connected(isdn_net_local *lp);
static void isdn_net_ciscohdlck_disconnected(isdn_net_local *lp);
@@ -1160,7 +1161,7 @@ static void isdn_net_tx_timeout(struct n
* If this interface isn't connected to a ISDN-Channel, find a free channel,
* and start dialing.
*/
-static int
+static netdev_tx_t
isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
--
^ permalink raw reply
* [PATCH 08/19] wan: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Krzysztof Halasa; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: wan-tx.patch --]
[-- Type: text/plain, Size: 15928 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/wan/cosa.c | 7 ++++---
drivers/net/wan/cycx_x25.c | 8 ++++----
drivers/net/wan/dlci.c | 13 +++++++------
drivers/net/wan/dscc4.c | 6 ++++--
drivers/net/wan/farsync.c | 2 +-
drivers/net/wan/hd64570.c | 4 ++--
drivers/net/wan/hd64572.c | 4 ++--
drivers/net/wan/hdlc.c | 2 +-
drivers/net/wan/hdlc_fr.c | 2 +-
drivers/net/wan/hdlc_raw_eth.c | 2 +-
drivers/net/wan/hdlc_x25.c | 6 +++---
drivers/net/wan/hostess_sv11.c | 3 ++-
drivers/net/wan/lapbether.c | 3 ++-
drivers/net/wan/lmc/lmc_main.c | 9 +++++----
drivers/net/wan/sbni.c | 7 ++++---
drivers/net/wan/sdla.c | 5 +++--
drivers/net/wan/sealevel.c | 3 ++-
drivers/net/wan/wanxl.c | 2 +-
drivers/net/wan/x25_asy.c | 3 ++-
drivers/net/wan/z85230.c | 9 ++++-----
drivers/net/wan/z85230.h | 3 ++-
21 files changed, 57 insertions(+), 46 deletions(-)
--- a/drivers/net/wan/hdlc.c 2009-08-31 16:17:53.131107761 -0700
+++ b/drivers/net/wan/hdlc.c 2009-08-31 16:27:02.091109721 -0700
@@ -66,7 +66,7 @@ static int hdlc_rcv(struct sk_buff *skb,
return hdlc->proto->netif_rx(skb);
}
-int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
--- a/drivers/net/wan/hdlc_fr.c 2009-08-31 16:17:53.041107499 -0700
+++ b/drivers/net/wan/hdlc_fr.c 2009-08-31 16:27:02.091109721 -0700
@@ -407,7 +407,7 @@ static int pvc_ioctl(struct net_device *
return -EINVAL;
}
-static int pvc_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t pvc_xmit(struct sk_buff *skb, struct net_device *dev)
{
pvc_device *pvc = dev->ml_priv;
--- a/drivers/net/wan/cosa.c 2009-08-31 16:17:53.041107499 -0700
+++ b/drivers/net/wan/cosa.c 2009-08-31 16:27:02.091109721 -0700
@@ -279,7 +279,7 @@ static int cosa_net_attach(struct net_de
static int cosa_net_open(struct net_device *d);
static int cosa_net_close(struct net_device *d);
static void cosa_net_timeout(struct net_device *d);
-static int cosa_net_tx(struct sk_buff *skb, struct net_device *d);
+static netdev_tx_t cosa_net_tx(struct sk_buff *skb, struct net_device *d);
static char *cosa_net_setup_rx(struct channel_data *channel, int size);
static int cosa_net_rx_done(struct channel_data *channel);
static int cosa_net_tx_done(struct channel_data *channel, int size);
@@ -672,7 +672,8 @@ static int cosa_net_open(struct net_devi
return 0;
}
-static int cosa_net_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t cosa_net_tx(struct sk_buff *skb,
+ struct net_device *dev)
{
struct channel_data *chan = dev_to_chan(dev);
@@ -680,7 +681,7 @@ static int cosa_net_tx(struct sk_buff *s
chan->tx_skb = skb;
cosa_start_tx(chan, skb->data, skb->len);
- return 0;
+ return NETDEV_TX_OK;
}
static void cosa_net_timeout(struct net_device *dev)
--- a/drivers/net/wan/dscc4.c 2009-08-31 16:17:53.081083527 -0700
+++ b/drivers/net/wan/dscc4.c 2009-08-31 16:27:02.091109721 -0700
@@ -359,7 +359,8 @@ static void dscc4_tx_irq(struct dscc4_pc
static int dscc4_found1(struct pci_dev *, void __iomem *ioaddr);
static int dscc4_init_one(struct pci_dev *, const struct pci_device_id *ent);
static int dscc4_open(struct net_device *);
-static int dscc4_start_xmit(struct sk_buff *, struct net_device *);
+static netdev_tx_t dscc4_start_xmit(struct sk_buff *,
+ struct net_device *);
static int dscc4_close(struct net_device *);
static int dscc4_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static int dscc4_init_ring(struct net_device *);
@@ -1148,7 +1149,8 @@ static int dscc4_tx_poll(struct dscc4_de
}
#endif /* DSCC4_POLLING */
-static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t dscc4_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct dscc4_dev_priv *dpriv = dscc4_priv(dev);
struct dscc4_pci_priv *ppriv = dpriv->pci_priv;
--- a/drivers/net/wan/farsync.c 2009-08-31 16:17:53.051086769 -0700
+++ b/drivers/net/wan/farsync.c 2009-08-31 16:27:02.091109721 -0700
@@ -2274,7 +2274,7 @@ fst_tx_timeout(struct net_device *dev)
port->start = 0;
}
-static int
+static netdev_tx_t
fst_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct fst_card_info *card;
--- a/drivers/net/wan/hd64570.c 2009-08-31 16:17:53.011106130 -0700
+++ b/drivers/net/wan/hd64570.c 2009-08-31 16:27:02.101108828 -0700
@@ -620,7 +620,7 @@ static void sca_dump_rings(struct net_de
#endif /* DEBUG_RINGS */
-static int sca_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev)
{
port_t *port = dev_to_port(dev);
card_t *card = port_to_card(port);
@@ -674,7 +674,7 @@ static int sca_xmit(struct sk_buff *skb,
spin_unlock_irq(&port->lock);
dev_kfree_skb(skb);
- return 0;
+ return NETDEV_TX_OK;
}
--- a/drivers/net/wan/hdlc_raw_eth.c 2009-08-31 16:17:53.101091935 -0700
+++ b/drivers/net/wan/hdlc_raw_eth.c 2009-08-31 16:27:02.101108828 -0700
@@ -25,7 +25,7 @@
static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr);
-static int eth_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t eth_tx(struct sk_buff *skb, struct net_device *dev)
{
int pad = ETH_ZLEN - skb->len;
if (pad > 0) { /* Pad the frame with zeros */
--- a/drivers/net/wan/hdlc_x25.c 2009-08-31 16:17:53.141108055 -0700
+++ b/drivers/net/wan/hdlc_x25.c 2009-08-31 16:27:02.101108828 -0700
@@ -87,7 +87,7 @@ static void x25_data_transmit(struct net
-static int x25_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
{
int result;
@@ -98,7 +98,7 @@ static int x25_xmit(struct sk_buff *skb,
skb_pull(skb, 1);
if ((result = lapb_data_request(dev, skb)) != LAPB_OK)
dev_kfree_skb(skb);
- return 0;
+ return NETDEV_TX_OK;
case 1:
if ((result = lapb_connect_request(dev))!= LAPB_OK) {
@@ -129,7 +129,7 @@ static int x25_xmit(struct sk_buff *skb,
}
dev_kfree_skb(skb);
- return 0;
+ return NETDEV_TX_OK;
}
--- a/drivers/net/wan/hostess_sv11.c 2009-08-31 16:17:53.071106841 -0700
+++ b/drivers/net/wan/hostess_sv11.c 2009-08-31 16:27:02.101108828 -0700
@@ -156,7 +156,8 @@ static int hostess_ioctl(struct net_devi
* Passed network frames, fire them downwind.
*/
-static int hostess_queue_xmit(struct sk_buff *skb, struct net_device *d)
+static netdev_tx_t hostess_queue_xmit(struct sk_buff *skb,
+ struct net_device *d)
{
return z8530_queue_xmit(&dev_to_sv(d)->chanA, skb);
}
--- a/drivers/net/wan/lmc/lmc_main.c 2009-08-31 16:17:53.111106337 -0700
+++ b/drivers/net/wan/lmc/lmc_main.c 2009-08-31 16:27:02.101108828 -0700
@@ -89,7 +89,8 @@ MODULE_DEVICE_TABLE(pci, lmc_pci_tbl);
MODULE_LICENSE("GPL v2");
-static int lmc_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t lmc_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int lmc_rx (struct net_device *dev);
static int lmc_open(struct net_device *dev);
static int lmc_close(struct net_device *dev);
@@ -1423,12 +1424,12 @@ lmc_int_fail_out:
return IRQ_RETVAL(handled);
}
-static int lmc_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lmc_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
lmc_softc_t *sc = dev_to_sc(dev);
u32 flag;
int entry;
- int ret = NETDEV_TX_OK;
unsigned long flags;
lmc_trace(dev, "lmc_start_xmit in");
@@ -1510,7 +1511,7 @@ static int lmc_start_xmit(struct sk_buff
spin_unlock_irqrestore(&sc->lmc_lock, flags);
lmc_trace(dev, "lmc_start_xmit_out");
- return ret;
+ return NETDEV_TX_OK;
}
--- a/drivers/net/wan/sealevel.c 2009-08-31 16:17:53.121081138 -0700
+++ b/drivers/net/wan/sealevel.c 2009-08-31 16:27:02.101108828 -0700
@@ -156,7 +156,8 @@ static int sealevel_ioctl(struct net_dev
* Passed network frames, fire them downwind.
*/
-static int sealevel_queue_xmit(struct sk_buff *skb, struct net_device *d)
+static netdev_tx_t sealevel_queue_xmit(struct sk_buff *skb,
+ struct net_device *d)
{
return z8530_queue_xmit(dev_to_chan(d)->chan, skb);
}
--- a/drivers/net/wan/wanxl.c 2009-08-31 16:17:53.071106841 -0700
+++ b/drivers/net/wan/wanxl.c 2009-08-31 16:27:02.101108828 -0700
@@ -268,7 +268,7 @@ static irqreturn_t wanxl_intr(int irq, v
-static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
{
port_t *port = dev_to_port(dev);
desc_t *desc;
--- a/drivers/net/wan/z85230.c 2009-08-31 16:17:53.091107078 -0700
+++ b/drivers/net/wan/z85230.c 2009-08-31 16:27:02.101108828 -0700
@@ -1727,15 +1727,14 @@ static inline int spans_boundary(struct
* point.
*/
-int z8530_queue_xmit(struct z8530_channel *c, struct sk_buff *skb)
+netdev_tx_t z8530_queue_xmit(struct z8530_channel *c, struct sk_buff *skb)
{
unsigned long flags;
netif_stop_queue(c->netdevice);
if(c->tx_next_skb)
- {
- return 1;
- }
+ return NETDEV_TX_BUSY;
+
/* PC SPECIFIC - DMA limits */
@@ -1767,7 +1766,7 @@ int z8530_queue_xmit(struct z8530_channe
z8530_tx_begin(c);
spin_unlock_irqrestore(c->lock, flags);
- return 0;
+ return NETDEV_TX_OK;
}
EXPORT_SYMBOL(z8530_queue_xmit);
--- a/drivers/net/wan/cycx_x25.c 2009-08-31 16:17:53.061081056 -0700
+++ b/drivers/net/wan/cycx_x25.c 2009-08-31 16:27:02.101108828 -0700
@@ -139,8 +139,8 @@ static int cycx_netdevice_hard_header(st
const void *daddr, const void *saddr,
unsigned len);
static int cycx_netdevice_rebuild_header(struct sk_buff *skb);
-static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
- struct net_device *dev);
+static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static struct net_device_stats *
cycx_netdevice_get_stats(struct net_device *dev);
@@ -593,8 +593,8 @@ static int cycx_netdevice_rebuild_header
* bottom half" (with interrupts enabled).
* 2. Setting tbusy flag will inhibit further transmit requests from the
* protocol stack and can be used for flow control with protocol layer. */
-static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
- struct net_device *dev)
+static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct cycx_x25_channel *chan = netdev_priv(dev);
struct cycx_device *card = chan->card;
--- a/drivers/net/wan/dlci.c 2009-08-31 16:17:53.021089173 -0700
+++ b/drivers/net/wan/dlci.c 2009-08-31 16:27:02.101108828 -0700
@@ -186,12 +186,11 @@ static void dlci_receive(struct sk_buff
dev_kfree_skb(skb);
}
-static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t dlci_transmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct dlci_local *dlp;
- int ret;
-
- ret = 0;
+ netdev_tx_t ret;
if (!skb || !dev)
return NETDEV_TX_OK;
@@ -200,6 +199,8 @@ static int dlci_transmit(struct sk_buff
netif_stop_queue(dev);
+ /* This is hackish, overloads driver specific return values
+ on top of normal transmit return! */
ret = dlp->slave->netdev_ops->ndo_start_xmit(skb, dlp->slave);
switch (ret)
{
@@ -207,11 +208,11 @@ static int dlci_transmit(struct sk_buff
dev->stats.tx_packets++;
ret = NETDEV_TX_OK;
break;
- case DLCI_RET_ERR:
+ case DLCI_RET_ERR:
dev->stats.tx_errors++;
ret = NETDEV_TX_OK;
break;
- case DLCI_RET_DROP:
+ case DLCI_RET_DROP:
dev->stats.tx_dropped++;
ret = NETDEV_TX_BUSY;
break;
--- a/drivers/net/wan/lapbether.c 2009-08-31 16:17:53.031081364 -0700
+++ b/drivers/net/wan/lapbether.c 2009-08-31 16:27:02.101108828 -0700
@@ -147,7 +147,8 @@ static int lapbeth_data_indication(struc
/*
* Send a LAPB frame via an ethernet interface
*/
-static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
int err;
--- a/drivers/net/wan/sbni.c 2009-08-31 16:17:53.021089173 -0700
+++ b/drivers/net/wan/sbni.c 2009-08-31 16:27:02.101108828 -0700
@@ -114,7 +114,8 @@ static int sbni_pci_probe( struct net_d
static struct net_device *sbni_probe1(struct net_device *, unsigned long, int);
static int sbni_open( struct net_device * );
static int sbni_close( struct net_device * );
-static int sbni_start_xmit( struct sk_buff *, struct net_device * );
+static netdev_tx_t sbni_start_xmit(struct sk_buff *,
+ struct net_device * );
static int sbni_ioctl( struct net_device *, struct ifreq *, int );
static void set_multicast_list( struct net_device * );
@@ -444,7 +445,7 @@ sbni_probe1( struct net_device *dev, u
#ifdef CONFIG_SBNI_MULTILINE
-static int
+static netdev_tx_t
sbni_start_xmit( struct sk_buff *skb, struct net_device *dev )
{
struct net_device *p;
@@ -472,7 +473,7 @@ sbni_start_xmit( struct sk_buff *skb,
#else /* CONFIG_SBNI_MULTILINE */
-static int
+static netdev_tx_t
sbni_start_xmit( struct sk_buff *skb, struct net_device *dev )
{
struct net_local *nl = netdev_priv(dev);
--- a/drivers/net/wan/sdla.c 2009-08-31 16:17:53.081083527 -0700
+++ b/drivers/net/wan/sdla.c 2009-08-31 16:27:02.101108828 -0700
@@ -651,7 +651,8 @@ static int sdla_dlci_conf(struct net_dev
**************************/
/* NOTE: the DLCI driver deals with freeing the SKB!! */
-static int sdla_transmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sdla_transmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct frad_local *flp;
int ret, addr, accept, i;
@@ -737,7 +738,7 @@ static int sdla_transmit(struct sk_buff
if(flp->master[i]!=NULL)
netif_wake_queue(flp->master[i]);
}
- return(ret);
+ return NETDEV_TX_OK;
}
static void sdla_receive(struct net_device *dev)
--- a/drivers/net/wan/x25_asy.c 2009-08-31 16:17:53.131107761 -0700
+++ b/drivers/net/wan/x25_asy.c 2009-08-31 16:27:02.101108828 -0700
@@ -299,7 +299,8 @@ static void x25_asy_timeout(struct net_d
/* Encapsulate an IP datagram and kick it into a TTY queue. */
-static int x25_asy_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t x25_asy_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct x25_asy *sl = netdev_priv(dev);
int err;
--- a/drivers/net/wan/z85230.h 2009-08-31 16:17:53.061081056 -0700
+++ b/drivers/net/wan/z85230.h 2009-08-31 16:27:02.101108828 -0700
@@ -406,7 +406,8 @@ extern int z8530_sync_dma_close(struct n
extern int z8530_sync_txdma_open(struct net_device *, struct z8530_channel *);
extern int z8530_sync_txdma_close(struct net_device *, struct z8530_channel *);
extern int z8530_channel_load(struct z8530_channel *, u8 *);
-extern int z8530_queue_xmit(struct z8530_channel *c, struct sk_buff *skb);
+extern netdev_tx_t z8530_queue_xmit(struct z8530_channel *c,
+ struct sk_buff *skb);
extern void z8530_null_rx(struct z8530_channel *c, struct sk_buff *skb);
--- a/drivers/net/wan/hd64572.c 2009-08-31 16:17:53.111106337 -0700
+++ b/drivers/net/wan/hd64572.c 2009-08-31 16:27:02.111107585 -0700
@@ -562,7 +562,7 @@ static void sca_dump_rings(struct net_de
#endif /* DEBUG_RINGS */
-static int sca_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev)
{
port_t *port = dev_to_port(dev);
card_t *card = port->card;
@@ -601,7 +601,7 @@ static int sca_xmit(struct sk_buff *skb,
spin_unlock_irq(&port->lock);
dev_kfree_skb(skb);
- return 0;
+ return NETDEV_TX_OK;
}
--
^ permalink raw reply
* [PATCH 09/19] hdlc: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Krzysztof Halasa; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: hdlc-tx.patch --]
[-- Type: text/plain, Size: 4965 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/char/pcmcia/synclink_cs.c | 7 +++----
drivers/char/synclink.c | 7 +++----
drivers/char/synclink_gt.c | 7 +++----
drivers/char/synclinkmp.c | 7 +++----
include/linux/hdlc.h | 8 ++++----
5 files changed, 16 insertions(+), 20 deletions(-)
--- a/include/linux/hdlc.h 2009-08-31 16:17:52.981107416 -0700
+++ b/include/linux/hdlc.h 2009-08-31 16:27:04.181091272 -0700
@@ -38,7 +38,7 @@ struct hdlc_proto {
int (*ioctl)(struct net_device *dev, struct ifreq *ifr);
__be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev);
int (*netif_rx)(struct sk_buff *skb);
- int (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
struct module *module;
struct hdlc_proto *next; /* next protocol in the list */
};
@@ -51,7 +51,7 @@ typedef struct hdlc_device {
unsigned short encoding, unsigned short parity);
/* hardware driver must handle this instead of dev->hard_start_xmit */
- int (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
/* Things below are for HDLC layer internal use only */
const struct hdlc_proto *proto;
@@ -60,7 +60,7 @@ typedef struct hdlc_device {
spinlock_t state_lock;
void *state;
void *priv;
-}hdlc_device;
+} hdlc_device;
@@ -106,7 +106,7 @@ void hdlc_close(struct net_device *dev);
/* May be used by hardware driver */
int hdlc_change_mtu(struct net_device *dev, int new_mtu);
/* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */
-int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev);
int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto,
size_t size);
--- a/drivers/char/pcmcia/synclink_cs.c 2009-08-31 16:17:52.961081267 -0700
+++ b/drivers/char/pcmcia/synclink_cs.c 2009-08-31 16:27:04.181091272 -0700
@@ -4005,10 +4005,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
MGSLPC_INFO *info = dev_to_port(dev);
unsigned long flags;
@@ -4043,7 +4042,7 @@ static int hdlcdev_xmit(struct sk_buff *
}
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclink.c 2009-08-31 16:17:52.971081211 -0700
+++ b/drivers/char/synclink.c 2009-08-31 16:27:04.181091272 -0700
@@ -7697,10 +7697,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct mgsl_struct *info = dev_to_port(dev);
unsigned long flags;
@@ -7731,7 +7730,7 @@ static int hdlcdev_xmit(struct sk_buff *
usc_start_transmitter(info);
spin_unlock_irqrestore(&info->irq_spinlock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclink_gt.c 2009-08-31 16:17:52.971081211 -0700
+++ b/drivers/char/synclink_gt.c 2009-08-31 16:27:04.191109445 -0700
@@ -1497,10 +1497,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct slgt_info *info = dev_to_port(dev);
unsigned long flags;
@@ -1529,7 +1528,7 @@ static int hdlcdev_xmit(struct sk_buff *
update_tx_timer(info);
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclinkmp.c 2009-08-31 16:17:52.961081267 -0700
+++ b/drivers/char/synclinkmp.c 2009-08-31 16:27:04.191109445 -0700
@@ -1608,10 +1608,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
SLMP_INFO *info = dev_to_port(dev);
unsigned long flags;
@@ -1642,7 +1641,7 @@ static int hdlcdev_xmit(struct sk_buff *
tx_start(info);
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--
^ permalink raw reply
* [PATCH 12/19] netdev: convert pseudo drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: more-misc.patch --]
[-- Type: text/plain, Size: 8263 bytes --]
These are all drivers that don't touch real hardware.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/firewire/net.c | 2 +-
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/can/vcan.c | 2 +-
drivers/net/dummy.c | 22 ++++++++++------------
drivers/net/eql.c | 4 ++--
drivers/net/ifb.c | 9 ++++-----
drivers/net/macvlan.c | 3 ++-
drivers/net/ppp_generic.c | 2 +-
drivers/net/slip.c | 2 +-
drivers/net/tun.c | 2 +-
drivers/net/veth.c | 2 +-
drivers/net/virtio_net.c | 2 +-
net/phonet/pep-gprs.c | 2 +-
13 files changed, 27 insertions(+), 29 deletions(-)
--- a/drivers/net/ifb.c 2009-08-31 16:17:52.671091194 -0700
+++ b/drivers/net/ifb.c 2009-08-31 16:27:13.201091438 -0700
@@ -59,7 +59,7 @@ struct ifb_private {
static int numifbs = 2;
static void ri_tasklet(unsigned long dev);
-static int ifb_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev);
static int ifb_open(struct net_device *dev);
static int ifb_close(struct net_device *dev);
@@ -160,11 +160,10 @@ static void ifb_setup(struct net_device
random_ether_addr(dev->dev_addr);
}
-static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ifb_private *dp = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
- int ret = NETDEV_TX_OK;
u32 from = G_TC_FROM(skb->tc_verd);
stats->rx_packets++;
@@ -173,7 +172,7 @@ static int ifb_xmit(struct sk_buff *skb,
if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->iif) {
dev_kfree_skb(skb);
stats->rx_dropped++;
- return ret;
+ return NETDEV_TX_OK;
}
if (skb_queue_len(&dp->rq) >= dev->tx_queue_len) {
@@ -187,7 +186,7 @@ static int ifb_xmit(struct sk_buff *skb,
tasklet_schedule(&dp->ifb_tasklet);
}
- return ret;
+ return NETDEV_TX_OK;
}
static int ifb_close(struct net_device *dev)
--- a/drivers/net/macvlan.c 2009-08-31 16:17:52.721091262 -0700
+++ b/drivers/net/macvlan.c 2009-08-31 16:27:47.322328136 -0700
@@ -184,7 +184,8 @@ static struct sk_buff *macvlan_handle_fr
return NULL;
}
-static int macvlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
const struct macvlan_dev *vlan = netdev_priv(dev);
unsigned int len = skb->len;
--- a/drivers/net/virtio_net.c 2009-08-31 16:17:52.701107507 -0700
+++ b/drivers/net/virtio_net.c 2009-08-31 16:28:02.602319381 -0700
@@ -519,7 +519,7 @@ static void xmit_tasklet(unsigned long d
netif_tx_unlock_bh(vi->dev);
}
-static int start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);
--- a/drivers/net/dummy.c 2009-08-31 16:17:52.711091877 -0700
+++ b/drivers/net/dummy.c 2009-08-31 16:28:20.634332248 -0700
@@ -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 ne
{
}
+
+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_devic
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]) {
--- a/drivers/net/tun.c 2009-08-31 16:17:52.691107284 -0700
+++ b/drivers/net/tun.c 2009-08-31 16:28:30.394333166 -0700
@@ -358,7 +358,7 @@ static int tun_net_close(struct net_devi
}
/* Net device start xmit */
-static int tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
--- a/drivers/net/veth.c 2009-08-31 16:17:52.691107284 -0700
+++ b/drivers/net/veth.c 2009-08-31 16:27:13.211106957 -0700
@@ -148,7 +148,7 @@ static struct ethtool_ops veth_ethtool_o
* xmit
*/
-static int veth_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_device *rcv = NULL;
struct veth_priv *priv, *rcv_priv;
--- a/drivers/firewire/net.c 2009-08-31 16:17:52.731143867 -0700
+++ b/drivers/firewire/net.c 2009-08-31 16:27:13.211106957 -0700
@@ -1188,7 +1188,7 @@ static int fwnet_stop(struct net_device
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);
--- a/drivers/net/bonding/bond_main.c 2009-08-31 16:17:52.661107314 -0700
+++ b/drivers/net/bonding/bond_main.c 2009-08-31 16:28:48.571114507 -0700
@@ -4450,7 +4450,7 @@ static void bond_set_xmit_hash_policy(st
}
}
-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);
--- a/drivers/net/can/vcan.c 2009-08-31 16:17:52.681081639 -0700
+++ b/drivers/net/can/vcan.c 2009-08-31 16:27:13.211106957 -0700
@@ -83,7 +83,7 @@ static void vcan_rx(struct sk_buff *skb,
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;
--- a/drivers/net/eql.c 2009-08-31 16:17:52.681081639 -0700
+++ b/drivers/net/eql.c 2009-08-31 16:29:03.411105414 -0700
@@ -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(sl
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;
--- a/drivers/net/ppp_generic.c 2009-08-31 16:17:52.671091194 -0700
+++ b/drivers/net/ppp_generic.c 2009-08-31 16:27:13.211106957 -0700
@@ -951,7 +951,7 @@ out:
/*
* Network interface unit routines.
*/
-static int
+static netdev_tx_t
ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ppp *ppp = netdev_priv(dev);
--- a/drivers/net/slip.c 2009-08-31 16:17:52.711091877 -0700
+++ b/drivers/net/slip.c 2009-08-31 16:27:13.211106957 -0700
@@ -474,7 +474,7 @@ out:
/* Encapsulate an IP datagram and kick it into a TTY queue. */
-static int
+static netdev_tx_t
sl_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct slip *sl = netdev_priv(dev);
--- a/net/phonet/pep-gprs.c 2009-08-31 16:17:52.651081529 -0700
+++ b/net/phonet/pep-gprs.c 2009-08-31 16:27:13.211106957 -0700
@@ -183,7 +183,7 @@ static int gprs_close(struct net_device
return 0;
}
-static int gprs_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t gprs_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct gprs_dev *gp = netdev_priv(dev);
struct sock *sk = gp->sk;
--
^ permalink raw reply
* [PATCH 18/19] wireless: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: wireless.patch --]
[-- Type: text/plain, Size: 24164 bytes --]
Mostly just simple conversions:
* ray_cs had bogus return of NET_TX_LOCKED but driver
was not using NETIF_F_LLTX
* hostap and ipw2x00 had some code that returned value
from a called function that also had to change to return netdev_tx_t
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/wimax/i2400m/netdev.c | 12 ++++++------
drivers/net/wireless/airo.c | 12 +++++++++---
drivers/net/wireless/arlan-main.c | 4 ++--
drivers/net/wireless/atmel.c | 2 +-
drivers/net/wireless/hostap/hostap_80211.h | 10 +++++++---
drivers/net/wireless/hostap/hostap_80211_tx.c | 11 +++++++----
drivers/net/wireless/ipw2x00/ipw2100.c | 10 +++++-----
drivers/net/wireless/ipw2x00/ipw2200.c | 9 +++++----
drivers/net/wireless/ipw2x00/libipw.h | 7 ++++---
drivers/net/wireless/ipw2x00/libipw_tx.c | 6 +++---
drivers/net/wireless/libertas/decl.h | 5 +++--
drivers/net/wireless/libertas/main.c | 3 ++-
drivers/net/wireless/libertas/tx.c | 6 ++----
drivers/net/wireless/mac80211_hwsim.c | 3 ++-
drivers/net/wireless/netwave_cs.c | 6 ++++--
drivers/net/wireless/orinoco/main.c | 2 +-
drivers/net/wireless/prism54/islpci_eth.c | 2 +-
drivers/net/wireless/prism54/islpci_eth.h | 2 +-
drivers/net/wireless/ray_cs.c | 14 +++++++++-----
drivers/net/wireless/strip.c | 2 +-
drivers/net/wireless/wavelan.c | 3 ++-
drivers/net/wireless/wavelan.p.h | 2 +-
drivers/net/wireless/wavelan_cs.c | 2 +-
drivers/net/wireless/wavelan_cs.p.h | 2 +-
drivers/net/wireless/wl3501_cs.c | 3 ++-
drivers/net/wireless/zd1201.c | 3 ++-
net/mac80211/ieee80211_i.h | 6 ++++--
net/mac80211/tx.c | 8 ++++----
28 files changed, 92 insertions(+), 65 deletions(-)
--- a/drivers/net/wireless/hostap/hostap_80211.h 2009-08-31 16:17:52.221080855 -0700
+++ b/drivers/net/wireless/hostap/hostap_80211.h 2009-08-31 16:33:06.481101881 -0700
@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <linux/skbuff.h>
+#include <linux/netdevice.h>
struct hostap_ieee80211_mgmt {
__le16 frame_control;
@@ -85,8 +86,11 @@ void hostap_dump_rx_80211(const char *na
struct hostap_80211_rx_status *rx_stats);
void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
-int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev);
-int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev);
-int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
#endif /* HOSTAP_80211_H */
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c 2009-08-31 16:17:52.221080855 -0700
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c 2009-08-31 16:33:42.131158031 -0700
@@ -53,7 +53,8 @@ void hostap_dump_tx_80211(const char *na
/* hard_start_xmit function for data interfaces (wlan#, wlan#wds#, wlan#sta)
* Convert Ethernet header into a suitable IEEE 802.11 header depending on
* device configuration. */
-int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct hostap_interface *iface;
local_info_t *local;
@@ -261,7 +262,8 @@ int hostap_data_start_xmit(struct sk_buf
/* hard_start_xmit function for hostapd wlan#ap interfaces */
-int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct hostap_interface *iface;
local_info_t *local;
@@ -373,11 +375,12 @@ static struct sk_buff * hostap_tx_encryp
/* hard_start_xmit function for master radio interface wifi#.
* AP processing (TX rate control, power save buffering, etc.).
* Use hardware TX function to send the frame. */
-int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct hostap_interface *iface;
local_info_t *local;
- int ret = NETDEV_TX_BUSY;
+ netdev_tx_t ret = NETDEV_TX_BUSY;
u16 fc;
struct hostap_tx_data tx;
ap_tx_ret tx_ret;
--- a/drivers/net/wireless/ipw2x00/ipw2200.c 2009-08-31 16:17:52.321081485 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c 2009-08-31 16:34:38.021326615 -0700
@@ -10459,12 +10459,12 @@ static void ipw_handle_promiscuous_tx(st
}
#endif
-static int ipw_net_hard_start_xmit(struct libipw_txb *txb,
- struct net_device *dev, int pri)
+static netdev_tx_t ipw_net_hard_start_xmit(struct libipw_txb *txb,
+ struct net_device *dev, int pri)
{
struct ipw_priv *priv = libipw_priv(dev);
unsigned long flags;
- int ret;
+ netdev_tx_t ret;
IPW_DEBUG_TX("dev->xmit(%d bytes)\n", txb->payload_size);
spin_lock_irqsave(&priv->lock, flags);
@@ -11602,7 +11602,8 @@ static int ipw_prom_stop(struct net_devi
return 0;
}
-static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
IPW_DEBUG_INFO("prom dev->xmit\n");
dev_kfree_skb(skb);
--- a/drivers/net/wireless/ipw2x00/libipw.h 2009-08-31 16:17:52.301107927 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw.h 2009-08-31 16:34:56.121117022 -0700
@@ -867,8 +867,8 @@ struct libipw_device {
/* Callback functions */
void (*set_security) (struct net_device * dev,
struct libipw_security * sec);
- int (*hard_start_xmit) (struct libipw_txb * txb,
- struct net_device * dev, int pri);
+ netdev_tx_t (*hard_start_xmit) (struct libipw_txb * txb,
+ struct net_device * dev, int pri);
int (*reset_port) (struct net_device * dev);
int (*is_queue_full) (struct net_device * dev, int pri);
@@ -1028,7 +1028,8 @@ extern void libipw_networks_age(struct l
extern int libipw_set_encryption(struct libipw_device *ieee);
/* libipw_tx.c */
-extern int libipw_xmit(struct sk_buff *skb, struct net_device *dev);
+extern netdev_tx_t libipw_xmit(struct sk_buff *skb,
+ struct net_device *dev);
extern void libipw_txb_free(struct libipw_txb *);
/* libipw_rx.c */
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c 2009-08-31 16:17:52.301107927 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c 2009-08-31 16:35:03.781105301 -0700
@@ -252,7 +252,7 @@ static int libipw_classify(struct sk_buf
/* Incoming skb is converted to a txb which consists of
* a block of 802.11 fragment packets (stored as skbs) */
-int libipw_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct libipw_device *ieee = netdev_priv(dev);
struct libipw_txb *txb = NULL;
@@ -523,8 +523,8 @@ int libipw_xmit(struct sk_buff *skb, str
dev_kfree_skb_any(skb);
if (txb) {
- int ret = (*ieee->hard_start_xmit) (txb, dev, priority);
- if (ret == 0) {
+ netdev_tx_t ret = (*ieee->hard_start_xmit)(txb, dev, priority);
+ if (ret == NETDEV_TX_OK) {
dev->stats.tx_packets++;
dev->stats.tx_bytes += txb->payload_size;
return NETDEV_TX_OK;
--- a/drivers/net/wimax/i2400m/netdev.c 2009-08-31 16:17:52.191080883 -0700
+++ b/drivers/net/wimax/i2400m/netdev.c 2009-08-31 16:32:16.163627458 -0700
@@ -334,12 +334,12 @@ int i2400m_net_tx(struct i2400m *i2400m,
* that will sleep. See i2400m_net_wake_tx() for details.
*/
static
-int i2400m_hard_start_xmit(struct sk_buff *skb,
- struct net_device *net_dev)
+netdev_tx_t i2400m_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *net_dev)
{
- int result;
struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
struct device *dev = i2400m_dev(i2400m);
+ int result;
d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
if (i2400m->state == I2400M_SS_IDLE)
@@ -353,9 +353,9 @@ int i2400m_hard_start_xmit(struct sk_buf
net_dev->stats.tx_bytes += skb->len;
}
kfree_skb(skb);
- result = NETDEV_TX_OK;
- d_fnend(3, dev, "(skb %p net_dev %p) = %d\n", skb, net_dev, result);
- return result;
+
+ d_fnend(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
+ return NETDEV_TX_OK;
}
--- a/drivers/net/wireless/airo.c 2009-08-31 16:17:52.251122313 -0700
+++ b/drivers/net/wireless/airo.c 2009-08-31 16:32:16.163627458 -0700
@@ -1920,7 +1920,9 @@ static int airo_open(struct net_device *
return 0;
}
-static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) {
+static netdev_tx_t mpi_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
int npacks, pending;
unsigned long flags;
struct airo_info *ai = dev->ml_priv;
@@ -2119,7 +2121,9 @@ static void airo_end_xmit(struct net_dev
dev_kfree_skb(skb);
}
-static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) {
+static netdev_tx_t airo_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
s16 len;
int i, j;
struct airo_info *priv = dev->ml_priv;
@@ -2184,7 +2188,9 @@ static void airo_end_xmit11(struct net_d
dev_kfree_skb(skb);
}
-static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) {
+static netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
+ struct net_device *dev)
+{
s16 len;
int i, j;
struct airo_info *priv = dev->ml_priv;
--- a/drivers/net/wireless/arlan-main.c 2009-08-31 16:17:52.201081246 -0700
+++ b/drivers/net/wireless/arlan-main.c 2009-08-31 16:32:16.173591015 -0700
@@ -77,7 +77,7 @@ struct arlan_conf_stru arlan_conf[MAX_AR
static int arlans_found;
static int arlan_open(struct net_device *dev);
-static int arlan_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t arlan_interrupt(int irq, void *dev_id);
static int arlan_close(struct net_device *dev);
static struct net_device_stats *
@@ -1169,7 +1169,7 @@ static void arlan_tx_timeout (struct net
}
-static int arlan_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev)
{
short length;
unsigned char *buf;
--- a/drivers/net/wireless/atmel.c 2009-08-31 16:17:52.351091725 -0700
+++ b/drivers/net/wireless/atmel.c 2009-08-31 16:32:16.173591015 -0700
@@ -781,7 +781,7 @@ static void tx_update_descriptor(struct
priv->tx_free_mem -= len;
}
-static int start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
static const u8 SNAP_RFC1024[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
struct atmel_private *priv = netdev_priv(dev);
--- a/drivers/net/wireless/libertas/decl.h 2009-08-31 16:17:52.281153994 -0700
+++ b/drivers/net/wireless/libertas/decl.h 2009-08-31 16:35:07.071275355 -0700
@@ -6,7 +6,7 @@
#ifndef _LBS_DECL_H_
#define _LBS_DECL_H_
-#include <linux/device.h>
+#include <linux/netdevice.h>
#include "defs.h"
@@ -41,7 +41,8 @@ u8 lbs_data_rate_to_fw_index(u32 rate);
int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len);
void lbs_complete_command(struct lbs_private *priv, struct cmd_ctrl_node *cmd,
int result);
-int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band);
int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
--- a/drivers/net/wireless/libertas/main.c 2009-08-31 16:17:52.291081163 -0700
+++ b/drivers/net/wireless/libertas/main.c 2009-08-31 16:35:10.491118027 -0700
@@ -1647,7 +1647,8 @@ static int lbs_rtap_stop(struct net_devi
return 0;
}
-static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lbs_rtap_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
netif_stop_queue(dev);
return NETDEV_TX_BUSY;
--- a/drivers/net/wireless/libertas/tx.c 2009-08-31 16:17:52.281153994 -0700
+++ b/drivers/net/wireless/libertas/tx.c 2009-08-31 16:35:15.351107216 -0700
@@ -57,19 +57,17 @@ static u32 convert_radiotap_rate_to_mv(u
* @param skb A pointer to skb which includes TX packet
* @return 0 or -1
*/
-int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long flags;
struct lbs_private *priv = dev->ml_priv;
struct txpd *txpd;
char *p802x_hdr;
uint16_t pkt_len;
- int ret;
+ netdev_tx_t ret = NETDEV_TX_OK;
lbs_deb_enter(LBS_DEB_TX);
- ret = NETDEV_TX_OK;
-
/* We need to protect against the queues being restarted before
we get round to stopping them */
spin_lock_irqsave(&priv->driver_lock, flags);
--- a/drivers/net/wireless/mac80211_hwsim.c 2009-08-31 16:17:52.331108249 -0700
+++ b/drivers/net/wireless/mac80211_hwsim.c 2009-08-31 16:32:16.173591015 -0700
@@ -312,7 +312,8 @@ struct hwsim_radiotap_hdr {
} __attribute__ ((packed));
-static int hwsim_mon_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
/* TODO: allow packet injection */
dev_kfree_skb(skb);
--- a/drivers/net/wireless/netwave_cs.c 2009-08-31 16:17:52.241107004 -0700
+++ b/drivers/net/wireless/netwave_cs.c 2009-08-31 16:32:16.173591015 -0700
@@ -203,7 +203,8 @@ static int netwave_open(struct net_devic
static int netwave_close(struct net_device *dev); /* Close the device */
/* Packet transmission and Packet reception */
-static int netwave_start_xmit( struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t netwave_start_xmit( struct sk_buff *skb,
+ struct net_device *dev);
static int netwave_rx( struct net_device *dev);
/* Interrupt routines */
@@ -1026,7 +1027,8 @@ static int netwave_hw_xmit(unsigned char
return 0;
}
-static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) {
+static netdev_tx_t netwave_start_xmit(struct sk_buff *skb,
+ struct net_device *dev) {
/* This flag indicate that the hardware can't perform a transmission.
* Theoritically, NET3 check it before sending a packet to the driver,
* but in fact it never do that and pool continuously.
--- a/drivers/net/wireless/orinoco/main.c 2009-08-31 16:17:52.291081163 -0700
+++ b/drivers/net/wireless/orinoco/main.c 2009-08-31 16:35:20.123589613 -0700
@@ -337,7 +337,7 @@ static int orinoco_change_mtu(struct net
/* Tx path */
/********************************************************************/
-static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct orinoco_private *priv = ndev_priv(dev);
struct net_device_stats *stats = &priv->stats;
--- a/drivers/net/wireless/prism54/islpci_eth.c 2009-08-31 16:17:52.261081191 -0700
+++ b/drivers/net/wireless/prism54/islpci_eth.c 2009-08-31 16:32:16.173591015 -0700
@@ -72,7 +72,7 @@ islpci_eth_cleanup_transmit(islpci_priva
}
}
-int
+netdev_tx_t
islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
{
islpci_private *priv = netdev_priv(ndev);
--- a/drivers/net/wireless/prism54/islpci_eth.h 2009-08-31 16:17:52.271108094 -0700
+++ b/drivers/net/wireless/prism54/islpci_eth.h 2009-08-31 16:32:16.173591015 -0700
@@ -64,7 +64,7 @@ struct avs_80211_1_header {
};
void islpci_eth_cleanup_transmit(islpci_private *, isl38xx_control_block *);
-int islpci_eth_transmit(struct sk_buff *, struct net_device *);
+netdev_tx_t islpci_eth_transmit(struct sk_buff *, struct net_device *);
int islpci_eth_receive(islpci_private *);
void islpci_eth_tx_timeout(struct net_device *);
void islpci_do_reset_and_wake(struct work_struct *);
--- a/drivers/net/wireless/ray_cs.c 2009-08-31 16:17:52.361105988 -0700
+++ b/drivers/net/wireless/ray_cs.c 2009-08-31 16:32:16.173591015 -0700
@@ -104,7 +104,8 @@ static int ray_dev_init(struct net_devic
static const struct ethtool_ops netdev_ethtool_ops;
static int ray_open(struct net_device *dev);
-static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static void ray_update_multi_list(struct net_device *dev, int all);
static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
@@ -915,16 +916,19 @@ static int ray_dev_config(struct net_dev
}
/*===========================================================================*/
-static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
ray_dev_t *local = netdev_priv(dev);
struct pcmcia_device *link = local->finder;
short length = skb->len;
- if (!(pcmcia_dev_present(link))) {
+ if (!pcmcia_dev_present(link)) {
DEBUG(2, "ray_dev_start_xmit - device not present\n");
- return NETDEV_TX_LOCKED;
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
}
+
DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev);
if (local->authentication_state == NEED_TO_AUTH) {
DEBUG(0, "ray_cs Sending authentication request.\n");
@@ -951,8 +955,8 @@ static int ray_dev_start_xmit(struct sk_
default:
dev->trans_start = jiffies;
dev_kfree_skb(skb);
- return NETDEV_TX_OK;
}
+
return NETDEV_TX_OK;
} /* ray_dev_start_xmit */
--- a/drivers/net/wireless/strip.c 2009-08-31 16:17:52.201081246 -0700
+++ b/drivers/net/wireless/strip.c 2009-08-31 16:32:16.183606045 -0700
@@ -1533,7 +1533,7 @@ static void strip_send(struct strip *str
}
/* Encapsulate a datagram and kick it into a TTY queue. */
-static int strip_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t strip_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct strip *strip_info = netdev_priv(dev);
--- a/drivers/net/wireless/wavelan.c 2009-08-31 16:17:52.211107939 -0700
+++ b/drivers/net/wireless/wavelan.c 2009-08-31 16:32:16.183606045 -0700
@@ -2841,7 +2841,8 @@ static int wv_packet_write(struct net_de
* the packet. We also prevent reentrance. Then we call the function
* to send the packet.
*/
-static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
+static netdev_tx_t wavelan_packet_xmit(struct sk_buff *skb,
+ struct net_device * dev)
{
net_local *lp = netdev_priv(dev);
unsigned long flags;
--- a/drivers/net/wireless/wavelan_cs.c 2009-08-31 16:17:52.231081009 -0700
+++ b/drivers/net/wireless/wavelan_cs.c 2009-08-31 16:32:16.183606045 -0700
@@ -3078,7 +3078,7 @@ wv_packet_write(struct net_device * dev,
* the packet. We also prevent reentrance. Then, we call the function
* to send the packet...
*/
-static int
+static netdev_tx_t
wavelan_packet_xmit(struct sk_buff * skb,
struct net_device * dev)
{
--- a/drivers/net/wireless/wl3501_cs.c 2009-08-31 16:17:52.331108249 -0700
+++ b/drivers/net/wireless/wl3501_cs.c 2009-08-31 16:32:16.183606045 -0700
@@ -1333,7 +1333,8 @@ static void wl3501_tx_timeout(struct net
* 1 - Could not transmit (dev_queue_xmit will queue it)
* and try to sent it later
*/
-static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t wl3501_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
int enabled, rc;
struct wl3501_card *this = netdev_priv(dev);
--- a/drivers/net/wireless/zd1201.c 2009-08-31 16:17:52.341091082 -0700
+++ b/drivers/net/wireless/zd1201.c 2009-08-31 16:32:16.183606045 -0700
@@ -779,7 +779,8 @@ static int zd1201_net_stop(struct net_de
(llc+snap+type+payload)
zd 1 null byte, zd1201 packet type
*/
-static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t zd1201_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct zd1201 *zd = netdev_priv(dev);
unsigned char *txbuf = zd->txdata;
--- a/drivers/net/wireless/wavelan.p.h 2009-08-31 16:17:52.251122313 -0700
+++ b/drivers/net/wireless/wavelan.p.h 2009-08-31 16:32:16.183606045 -0700
@@ -611,7 +611,7 @@ static inline int
wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer. */
void *,
short);
-static int
+static netdev_tx_t
wavelan_packet_xmit(struct sk_buff *, /* Send a packet. */
struct net_device *);
/* -------------------- HARDWARE CONFIGURATION -------------------- */
--- a/drivers/net/wireless/wavelan_cs.p.h 2009-08-31 16:17:52.341091082 -0700
+++ b/drivers/net/wireless/wavelan_cs.p.h 2009-08-31 16:32:16.183606045 -0700
@@ -707,7 +707,7 @@ static void
wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer */
void *,
short);
-static int
+static netdev_tx_t
wavelan_packet_xmit(struct sk_buff *, /* Send a packet */
struct net_device *);
/* -------------------- HARDWARE CONFIGURATION -------------------- */
--- a/drivers/net/wireless/ipw2x00/ipw2100.c 2009-08-31 16:17:52.311180087 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c 2009-08-31 16:34:41.791081639 -0700
@@ -3330,8 +3330,8 @@ static irqreturn_t ipw2100_interrupt(int
return IRQ_NONE;
}
-static int ipw2100_tx(struct libipw_txb *txb, struct net_device *dev,
- int pri)
+static netdev_tx_t ipw2100_tx(struct libipw_txb *txb,
+ struct net_device *dev, int pri)
{
struct ipw2100_priv *priv = libipw_priv(dev);
struct list_head *element;
@@ -3369,12 +3369,12 @@ static int ipw2100_tx(struct libipw_txb
ipw2100_tx_send_data(priv);
spin_unlock_irqrestore(&priv->low_lock, flags);
- return 0;
+ return NETDEV_TX_OK;
- fail_unlock:
+fail_unlock:
netif_stop_queue(dev);
spin_unlock_irqrestore(&priv->low_lock, flags);
- return 1;
+ return NETDEV_TX_BUSY;
}
static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
--- a/net/mac80211/ieee80211_i.h 2009-08-31 16:17:52.181107339 -0700
+++ b/net/mac80211/ieee80211_i.h 2009-08-31 16:36:09.011107509 -0700
@@ -1050,8 +1050,10 @@ void ieee80211_recalc_idle(struct ieee80
/* tx handling */
void ieee80211_clear_tx_pending(struct ieee80211_local *local);
void ieee80211_tx_pending(unsigned long data);
-int ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
-int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
/* HT */
void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
--- a/net/mac80211/tx.c 2009-08-31 16:17:52.191080883 -0700
+++ b/net/mac80211/tx.c 2009-08-31 16:36:13.706387007 -0700
@@ -1483,8 +1483,8 @@ static void ieee80211_xmit(struct ieee80
dev_put(sdata->dev);
}
-int ieee80211_monitor_start_xmit(struct sk_buff *skb,
- struct net_device *dev)
+netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_channel *chan = local->hw.conf.channel;
@@ -1568,8 +1568,8 @@ fail:
* encapsulated packet will then be passed to master interface, wlan#.11, for
* transmission (through low-level driver).
*/
-int ieee80211_subif_start_xmit(struct sk_buff *skb,
- struct net_device *dev)
+netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
--
^ permalink raw reply
* [PATCH 06/19] usbnet: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, David Brownell
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: usb-tx.patch --]
[-- Type: text/plain, Size: 6161 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/usb/catc.c | 3 ++-
drivers/net/usb/cdc-phonet.c | 6 +++---
drivers/net/usb/hso.c | 3 ++-
drivers/net/usb/kaweth.c | 3 ++-
drivers/net/usb/pegasus.c | 3 ++-
drivers/net/usb/rtl8150.c | 3 ++-
drivers/net/usb/usbnet.c | 8 ++++----
drivers/usb/gadget/u_ether.c | 3 ++-
include/linux/usb/usbnet.h | 3 ++-
9 files changed, 21 insertions(+), 14 deletions(-)
--- a/drivers/net/usb/catc.c 2009-08-31 16:17:53.251107228 -0700
+++ b/drivers/net/usb/catc.c 2009-08-31 16:26:12.571081682 -0700
@@ -411,7 +411,8 @@ static void catc_tx_done(struct urb *urb
spin_unlock_irqrestore(&catc->tx_lock, flags);
}
-static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t catc_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct catc *catc = netdev_priv(netdev);
unsigned long flags;
--- a/drivers/net/usb/cdc-phonet.c 2009-08-31 16:17:53.231091626 -0700
+++ b/drivers/net/usb/cdc-phonet.c 2009-08-31 16:26:12.571081682 -0700
@@ -55,7 +55,7 @@ static void rx_complete(struct urb *req)
/*
* Network device callbacks
*/
-static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct usbpn_dev *pnd = netdev_priv(dev);
struct urb *req = NULL;
@@ -82,12 +82,12 @@ static int usbpn_xmit(struct sk_buff *sk
if (pnd->tx_queue >= dev->tx_queue_len)
netif_stop_queue(dev);
spin_unlock_irqrestore(&pnd->tx_lock, flags);
- return 0;
+ return NETDEV_TX_OK;
drop:
dev_kfree_skb(skb);
dev->stats.tx_dropped++;
- return 0;
+ return NETDEV_TX_OK;
}
static void tx_complete(struct urb *req)
--- a/drivers/net/usb/hso.c 2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/hso.c 2009-08-31 16:26:12.571081682 -0700
@@ -771,7 +771,8 @@ static void write_bulk_callback(struct u
}
/* called by kernel when we need to transmit a packet */
-static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
{
struct hso_net *odev = netdev_priv(net);
int result;
--- a/drivers/net/usb/kaweth.c 2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/kaweth.c 2009-08-31 16:26:12.571081682 -0700
@@ -803,7 +803,8 @@ static void kaweth_usb_transmit_complete
/****************************************************************
* kaweth_start_xmit
****************************************************************/
-static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t kaweth_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
{
struct kaweth_device *kaweth = netdev_priv(net);
__le16 *private_header;
--- a/drivers/net/usb/pegasus.c 2009-08-31 16:17:53.251107228 -0700
+++ b/drivers/net/usb/pegasus.c 2009-08-31 16:26:12.571081682 -0700
@@ -876,7 +876,8 @@ static void pegasus_tx_timeout(struct ne
pegasus->stats.tx_errors++;
}
-static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
{
pegasus_t *pegasus = netdev_priv(net);
int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
--- a/drivers/net/usb/rtl8150.c 2009-08-31 16:17:53.261106055 -0700
+++ b/drivers/net/usb/rtl8150.c 2009-08-31 16:26:12.571081682 -0700
@@ -727,7 +727,8 @@ static void rtl8150_set_multicast(struct
netif_wake_queue(netdev);
}
-static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
rtl8150_t *dev = netdev_priv(netdev);
int count, res;
--- a/drivers/net/usb/usbnet.c 2009-08-31 16:17:53.241081443 -0700
+++ b/drivers/net/usb/usbnet.c 2009-08-31 16:26:12.571081682 -0700
@@ -1007,15 +1007,16 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
/*-------------------------------------------------------------------------*/
-int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
+netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
+ struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
int length;
- int retval = NET_XMIT_SUCCESS;
struct urb *urb = NULL;
struct skb_data *entry;
struct driver_info *info = dev->driver_info;
unsigned long flags;
+ int retval;
// some devices want funky USB-level framing, for
// win32 driver (usually) and/or hardware quirks
@@ -1079,7 +1080,6 @@ int usbnet_start_xmit (struct sk_buff *s
if (netif_msg_tx_err (dev))
devdbg (dev, "drop, code %d", retval);
drop:
- retval = NET_XMIT_SUCCESS;
dev->net->stats.tx_dropped++;
if (skb)
dev_kfree_skb_any (skb);
@@ -1088,7 +1088,7 @@ drop:
devdbg (dev, "> tx, len %d, type 0x%x",
length, skb->protocol);
}
- return retval;
+ return NETDEV_TX_OK;
}
EXPORT_SYMBOL_GPL(usbnet_start_xmit);
--- a/include/linux/usb/usbnet.h 2009-08-31 16:17:53.281109296 -0700
+++ b/include/linux/usb/usbnet.h 2009-08-31 16:26:53.171108362 -0700
@@ -182,7 +182,8 @@ struct skb_data { /* skb->cb is one of t
extern int usbnet_open (struct net_device *net);
extern int usbnet_stop (struct net_device *net);
-extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net);
+extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
+ struct net_device *net);
extern void usbnet_tx_timeout (struct net_device *net);
extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
--- a/drivers/usb/gadget/u_ether.c 2009-08-31 16:17:53.271081695 -0700
+++ b/drivers/usb/gadget/u_ether.c 2009-08-31 16:26:12.571081682 -0700
@@ -465,7 +465,8 @@ static inline int is_promisc(u16 cdc_fil
return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS;
}
-static int eth_start_xmit(struct sk_buff *skb, struct net_device *net)
+static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
{
struct eth_dev *dev = netdev_priv(net);
int length = skb->len;
--
^ permalink raw reply
* [PATCH 19/19] netdev: convert bulk of drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: netdriver-tx.patch --]
[-- Type: text/plain, Size: 78529 bytes --]
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>
---
drivers/ieee802154/fakehard.c | 3 ++-
drivers/net/8139cp.c | 3 ++-
drivers/net/8139too.c | 7 ++++---
drivers/net/82596.c | 5 ++---
drivers/net/8390.c | 2 +-
drivers/net/8390.h | 4 ++--
drivers/net/8390p.c | 2 +-
drivers/net/a2065.c | 3 ++-
drivers/net/acenic.c | 3 ++-
drivers/net/acenic.h | 3 ++-
drivers/net/amd8111e.c | 3 ++-
drivers/net/arcnet/arcnet.c | 3 ++-
drivers/net/ariadne.c | 6 ++++--
drivers/net/at1700.c | 6 ++++--
drivers/net/atl1c/atl1c_main.c | 3 ++-
drivers/net/atl1e/atl1e_main.c | 3 ++-
drivers/net/atlx/atl1.c | 3 ++-
drivers/net/atlx/atl2.c | 3 ++-
drivers/net/atp.c | 6 ++++--
drivers/net/au1000_eth.c | 2 +-
drivers/net/b44.c | 2 +-
drivers/net/benet/be_main.c | 3 ++-
drivers/net/bnx2.c | 2 +-
drivers/net/bnx2x_main.c | 2 +-
drivers/net/can/sja1000/sja1000.c | 3 ++-
drivers/net/cassini.c | 2 +-
drivers/net/chelsio/sge.c | 2 +-
drivers/net/chelsio/sge.h | 2 +-
drivers/net/cs89x0.c | 4 ++--
drivers/net/cxgb3/adapter.h | 2 +-
drivers/net/cxgb3/sge.c | 2 +-
drivers/net/defxx.c | 10 ++++------
drivers/net/depca.c | 6 ++++--
drivers/net/dl2k.c | 4 ++--
drivers/net/dnet.c | 2 +-
drivers/net/eepro.c | 6 ++++--
drivers/net/eexpress.c | 5 +++--
drivers/net/enc28j60.c | 3 ++-
drivers/net/enic/enic_main.c | 3 ++-
drivers/net/epic100.c | 5 +++--
drivers/net/eth16i.c | 4 ++--
drivers/net/ethoc.c | 2 +-
drivers/net/ewrk3.c | 4 ++--
drivers/net/fealnx.c | 4 ++--
drivers/net/forcedeth.c | 5 +++--
drivers/net/hamachi.c | 6 ++++--
drivers/net/hp100.c | 13 ++++++++-----
drivers/net/ibmlana.c | 2 +-
drivers/net/ibmveth.c | 3 ++-
drivers/net/ipg.c | 3 ++-
drivers/net/jme.c | 2 +-
drivers/net/ks8842.c | 3 ++-
drivers/net/ks8851.c | 5 +++--
drivers/net/lance.c | 6 ++++--
drivers/net/lib8390.c | 3 ++-
drivers/net/loopback.c | 3 ++-
drivers/net/lp486e.c | 4 ++--
drivers/net/mlx4/en_tx.c | 2 +-
drivers/net/mlx4/mlx4_en.h | 2 +-
drivers/net/myri10ge/myri10ge.c | 11 +++++++----
drivers/net/natsemi.c | 4 ++--
drivers/net/netxen/netxen_nic_main.c | 5 +++--
drivers/net/ni52.c | 5 +++--
drivers/net/ni65.c | 6 ++++--
drivers/net/niu.c | 3 ++-
drivers/net/ns83820.c | 3 ++-
drivers/net/pcnet32.c | 6 ++++--
drivers/net/qla3xxx.c | 3 ++-
drivers/net/qlge/qlge_main.c | 2 +-
drivers/net/r6040.c | 10 +++++-----
drivers/net/r8169.c | 12 ++++++------
drivers/net/rrunner.c | 3 ++-
drivers/net/rrunner.h | 3 ++-
drivers/net/s2io.c | 2 +-
drivers/net/sb1000.c | 5 +++--
drivers/net/sc92031.c | 3 ++-
drivers/net/seeq8005.c | 6 ++++--
drivers/net/sfc/efx.h | 5 +++--
drivers/net/sfc/selftest.c | 3 ++-
drivers/net/sfc/tx.c | 18 ++++++++----------
drivers/net/sfc/tx.h | 3 ++-
drivers/net/sis190.c | 3 ++-
drivers/net/sis900.c | 5 +++--
drivers/net/skfp/skfddi.c | 6 ++++--
drivers/net/skge.c | 3 ++-
drivers/net/sky2.c | 3 ++-
drivers/net/smc9194.c | 6 ++++--
drivers/net/smsc9420.c | 3 ++-
drivers/net/starfire.c | 4 ++--
drivers/net/sundance.c | 4 ++--
drivers/net/sungem.c | 3 ++-
drivers/net/sunhme.c | 3 ++-
drivers/net/tehuti.c | 3 ++-
drivers/net/tg3.c | 9 ++++++---
drivers/net/tlan.c | 4 ++--
drivers/net/typhoon.c | 2 +-
drivers/net/via-rhine.c | 6 ++++--
drivers/net/via-velocity.c | 3 ++-
drivers/net/vxge/vxge-main.c | 2 +-
drivers/net/yellowfin.c | 6 ++++--
drivers/net/znet.c | 5 +++--
include/linux/arcdevice.h | 3 ++-
102 files changed, 253 insertions(+), 173 deletions(-)
--- a/drivers/net/8139cp.c 2009-08-31 16:17:52.021091264 -0700
+++ b/drivers/net/8139cp.c 2009-08-31 16:36:24.671092307 -0700
@@ -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;
--- a/drivers/net/8139too.c 2009-08-31 16:17:51.771107041 -0700
+++ b/drivers/net/8139too.c 2009-08-31 16:36:58.033614074 -0700
@@ -628,8 +628,8 @@ static void mdio_write (struct net_devic
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 n
}
}
-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;
--- a/drivers/net/82596.c 2009-08-31 16:17:51.681103561 -0700
+++ b/drivers/net/82596.c 2009-08-31 16:37:49.261564620 -0700
@@ -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_
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;
--- a/drivers/net/8390.c 2009-08-31 16:17:51.591127388 -0700
+++ b/drivers/net/8390.c 2009-08-31 16:36:24.671092307 -0700
@@ -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);
}
--- a/drivers/net/8390p.c 2009-08-31 16:17:51.791080739 -0700
+++ b/drivers/net/8390p.c 2009-08-31 16:36:24.671092307 -0700
@@ -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);
}
--- a/drivers/net/a2065.c 2009-08-31 16:17:51.701108128 -0700
+++ b/drivers/net/a2065.c 2009-08-31 16:38:04.931106629 -0700
@@ -547,7 +547,8 @@ static void lance_tx_timeout(struct net_
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;
--- a/drivers/net/acenic.c 2009-08-31 16:17:52.071101739 -0700
+++ b/drivers/net/acenic.c 2009-08-31 16:38:08.682395971 -0700
@@ -2464,7 +2464,8 @@ ace_load_tx_bd(struct ace_private *ap, s
}
-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;
--- a/drivers/net/at1700.c 2009-08-31 16:17:51.751109387 -0700
+++ b/drivers/net/at1700.c 2009-08-31 16:40:36.018425688 -0700
@@ -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_d
}
-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;
--- a/drivers/net/ks8842.c 2009-08-31 16:17:51.691086184 -0700
+++ b/drivers/net/ks8842.c 2009-08-31 16:42:55.394438559 -0700
@@ -551,7 +551,8 @@ static int ks8842_close(struct net_devic
return 0;
}
-static int ks8842_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ks8842_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
int ret;
struct ks8842_adapter *adapter = netdev_priv(netdev);
--- a/drivers/net/lib8390.c 2009-08-31 16:17:51.861094040 -0700
+++ b/drivers/net/lib8390.c 2009-08-31 16:42:54.338438353 -0700
@@ -299,7 +299,8 @@ static void __ei_tx_timeout(struct net_d
* Sends a packet to an 8390 network device.
*/
-static int __ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
--- a/drivers/net/skge.c 2009-08-31 16:17:51.621091253 -0700
+++ b/drivers/net/skge.c 2009-08-31 16:42:47.811106110 -0700
@@ -2746,7 +2746,8 @@ static inline int skge_avail(const struc
+ (ring->to_clean - ring->to_use) - 1;
}
-static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
+ struct net_device *dev)
{
struct skge_port *skge = netdev_priv(dev);
struct skge_hw *hw = skge->hw;
--- a/drivers/net/sky2.c 2009-08-31 16:17:51.821080852 -0700
+++ b/drivers/net/sky2.c 2009-08-31 16:42:47.346437068 -0700
@@ -1574,7 +1574,8 @@ static void sky2_tx_unmap(struct pci_dev
* the number of ring elements will probably be less than the number
* of list elements used.
*/
-static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sky2_xmit_frame(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
--- a/drivers/net/via-rhine.c 2009-08-31 16:17:51.651089690 -0700
+++ b/drivers/net/via-rhine.c 2009-08-31 16:43:44.834449718 -0700
@@ -408,7 +408,8 @@ static int mdio_read(struct net_device
static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int rhine_open(struct net_device *dev);
static void rhine_tx_timeout(struct net_device *dev);
-static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t rhine_start_tx(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t rhine_interrupt(int irq, void *dev_instance);
static void rhine_tx(struct net_device *dev);
static int rhine_rx(struct net_device *dev, int limit);
@@ -1213,7 +1214,8 @@ static void rhine_tx_timeout(struct net_
netif_wake_queue(dev);
}
-static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t rhine_start_tx(struct sk_buff *skb,
+ struct net_device *dev)
{
struct rhine_private *rp = netdev_priv(dev);
void __iomem *ioaddr = rp->base;
--- a/drivers/ieee802154/fakehard.c 2009-08-31 16:17:52.131105595 -0700
+++ b/drivers/ieee802154/fakehard.c 2009-08-31 16:36:24.681107336 -0700
@@ -257,7 +257,8 @@ static int ieee802154_fake_close(struct
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;
--- a/drivers/net/acenic.h 2009-08-31 16:17:52.061091529 -0700
+++ b/drivers/net/acenic.h 2009-08-31 16:38:11.466407413 -0700
@@ -775,7 +775,8 @@ static void ace_load_jumbo_rx_ring(struc
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);
--- a/drivers/net/amd8111e.c 2009-08-31 16:17:52.101081038 -0700
+++ b/drivers/net/amd8111e.c 2009-08-31 16:38:13.842397169 -0700
@@ -1300,7 +1300,8 @@ static int amd8111e_tx_queue_avail(struc
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;
--- a/drivers/net/ariadne.c 2009-08-31 16:17:51.851091302 -0700
+++ b/drivers/net/ariadne.c 2009-08-31 16:38:19.354407841 -0700
@@ -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 ne
}
-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;
--- a/drivers/net/atl1c/atl1c_main.c 2009-08-31 16:17:52.101081038 -0700
+++ b/drivers/net/atl1c/atl1c_main.c 2009-08-31 16:36:24.681107336 -0700
@@ -2055,7 +2055,8 @@ static void atl1c_tx_queue(struct atl1c_
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;
--- a/drivers/net/atl1e/atl1e_main.c 2009-08-31 16:17:52.001107231 -0700
+++ b/drivers/net/atl1e/atl1e_main.c 2009-08-31 16:36:24.691127813 -0700
@@ -1839,7 +1839,8 @@ static void atl1e_tx_queue(struct atl1e_
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;
--- a/drivers/net/atlx/atl2.c 2009-08-31 16:17:51.631107610 -0700
+++ b/drivers/net/atlx/atl2.c 2009-08-31 16:36:24.691127813 -0700
@@ -821,7 +821,8 @@ static inline int TxdFreeBytes(struct at
(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;
--- a/drivers/net/atp.c 2009-08-31 16:17:51.731107333 -0700
+++ b/drivers/net/atp.c 2009-08-31 16:40:35.581127580 -0700
@@ -199,7 +199,8 @@ static int net_open(struct net_device *d
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->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;
--- a/drivers/net/au1000_eth.c 2009-08-31 16:17:52.011106546 -0700
+++ b/drivers/net/au1000_eth.c 2009-08-31 16:36:24.691127813 -0700
@@ -937,7 +937,7 @@ static int au1000_close(struct net_devic
/*
* 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;
--- a/drivers/net/b44.c 2009-08-31 16:17:51.801107922 -0700
+++ b/drivers/net/b44.c 2009-08-31 16:38:33.626404356 -0700
@@ -946,7 +946,7 @@ static void b44_tx_timeout(struct net_de
netif_wake_queue(dev);
}
-static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct b44 *bp = netdev_priv(dev);
int rc = NETDEV_TX_OK;
--- a/drivers/net/eepro.c 2009-08-31 16:17:51.751109387 -0700
+++ b/drivers/net/eepro.c 2009-08-31 16:39:28.091106432 -0700
@@ -309,7 +309,8 @@ struct eepro_local {
static int eepro_probe1(struct net_device *dev, int autoprobe);
static int eepro_open(struct net_device *dev);
-static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t eepro_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t eepro_interrupt(int irq, void *dev_id);
static void eepro_rx(struct net_device *dev);
static void eepro_transmit_interrupt(struct net_device *dev);
@@ -1133,7 +1134,8 @@ static void eepro_tx_timeout (struct net
}
-static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t eepro_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct eepro_local *lp = netdev_priv(dev);
unsigned long flags;
--- a/drivers/net/netxen/netxen_nic_main.c 2009-08-31 16:17:52.091080675 -0700
+++ b/drivers/net/netxen/netxen_nic_main.c 2009-08-31 16:36:24.691127813 -0700
@@ -63,7 +63,8 @@ static int __devinit netxen_nic_probe(st
static void __devexit netxen_nic_remove(struct pci_dev *pdev);
static int netxen_nic_open(struct net_device *netdev);
static int netxen_nic_close(struct net_device *netdev);
-static int netxen_nic_xmit_frame(struct sk_buff *, struct net_device *);
+static netdev_tx_t netxen_nic_xmit_frame(struct sk_buff *,
+ struct net_device *);
static void netxen_tx_timeout(struct net_device *netdev);
static void netxen_reset_task(struct work_struct *work);
static void netxen_watchdog(unsigned long);
@@ -1599,7 +1600,7 @@ netxen_clear_cmddesc(u64 *desc)
desc[2] = 0ULL;
}
-static int
+static netdev_tx_t
netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
{
struct netxen_adapter *adapter = netdev_priv(netdev);
--- a/drivers/net/niu.c 2009-08-31 16:17:51.941091292 -0700
+++ b/drivers/net/niu.c 2009-08-31 16:42:52.811091094 -0700
@@ -6657,7 +6657,8 @@ static u64 niu_compute_tx_flags(struct s
return ret;
}
-static int niu_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct niu *np = netdev_priv(dev);
unsigned long align, headroom;
--- a/drivers/net/tg3.c 2009-08-31 16:17:52.031107202 -0700
+++ b/drivers/net/tg3.c 2009-08-31 16:42:44.842436766 -0700
@@ -5135,7 +5135,8 @@ static void tg3_set_txd(struct tg3_napi
/* hard_start_xmit for devices that don't have any bugs and
* support TG3_FLG2_HW_TSO_2 only.
*/
-static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tg3_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct tg3 *tp = netdev_priv(dev);
u32 len, entry, base_flags, mss;
@@ -5251,7 +5252,8 @@ out_unlock:
return NETDEV_TX_OK;
}
-static int tg3_start_xmit_dma_bug(struct sk_buff *, struct net_device *);
+static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *,
+ struct net_device *);
/* Use GSO to workaround a rare TSO bug that may be triggered when the
* TSO header is greater than 80 bytes.
@@ -5290,7 +5292,8 @@ tg3_tso_bug_end:
/* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and
* support TG3_FLG2_HW_TSO_1 or firmware TSO only.
*/
-static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
+ struct net_device *dev)
{
struct tg3 *tp = netdev_priv(dev);
u32 len, entry, base_flags, mss;
--- a/drivers/net/arcnet/arcnet.c 2009-08-31 16:17:51.731107333 -0700
+++ b/drivers/net/arcnet/arcnet.c 2009-08-31 16:36:24.701106875 -0700
@@ -591,7 +591,8 @@ static int arcnet_rebuild_header(struct
/* 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;
--- a/drivers/net/atlx/atl1.c 2009-08-31 16:17:51.641113072 -0700
+++ b/drivers/net/atlx/atl1.c 2009-08-31 16:36:24.701106875 -0700
@@ -2349,7 +2349,8 @@ static void atl1_tx_queue(struct atl1_ad
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;
--- a/drivers/net/benet/be_main.c 2009-08-31 16:17:52.041117203 -0700
+++ b/drivers/net/benet/be_main.c 2009-08-31 16:36:24.701106875 -0700
@@ -427,7 +427,8 @@ static int make_tx_wrbs(struct be_adapte
return copied;
}
-static int be_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t be_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct be_adapter *adapter = netdev_priv(netdev);
struct be_tx_obj *tx_obj = &adapter->tx_obj;
--- a/drivers/net/can/sja1000/sja1000.c 2009-08-31 16:17:51.741089258 -0700
+++ b/drivers/net/can/sja1000/sja1000.c 2009-08-31 16:36:24.711080559 -0700
@@ -238,7 +238,8 @@ static void chipset_init(struct net_devi
* xx xx xx xx ff ll 00 11 22 33 44 55 66 77
* [ can-id ] [flags] [len] [can data (up to 8 bytes]
*/
-static int sja1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sja1000_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sja1000_priv *priv = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
--- a/drivers/net/cs89x0.c 2009-08-31 16:17:51.911090062 -0700
+++ b/drivers/net/cs89x0.c 2009-08-31 16:38:49.481122968 -0700
@@ -246,7 +246,7 @@ struct net_local {
static int cs89x0_probe1(struct net_device *dev, int ioaddr, int modular);
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 set_multicast_list(struct net_device *dev);
static void net_timeout(struct net_device *dev);
@@ -1518,7 +1518,7 @@ static void net_timeout(struct net_devic
netif_wake_queue(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);
unsigned long flags;
--- a/drivers/net/cxgb3/adapter.h 2009-08-31 16:17:51.611108000 -0700
+++ b/drivers/net/cxgb3/adapter.h 2009-08-31 16:36:24.711080559 -0700
@@ -309,7 +309,7 @@ void t3_stop_sge_timers(struct adapter *
void t3_free_sge_resources(struct adapter *adap);
void t3_sge_err_intr_handler(struct adapter *adapter);
irq_handler_t t3_intr_handler(struct adapter *adap, int polling);
-int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev);
int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb);
void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p);
int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
--- a/drivers/net/cxgb3/sge.c 2009-08-31 16:17:51.601091224 -0700
+++ b/drivers/net/cxgb3/sge.c 2009-08-31 16:36:24.711080559 -0700
@@ -1216,7 +1216,7 @@ static inline void t3_stop_tx_queue(stru
*
* Add a packet to an SGE Tx queue. Runs with softirqs disabled.
*/
-int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
{
int qidx;
unsigned int ndesc, pidx, credits, gen, compl;
--- a/drivers/net/dl2k.c 2009-08-31 16:17:51.621091253 -0700
+++ b/drivers/net/dl2k.c 2009-08-31 16:39:09.146409342 -0700
@@ -59,7 +59,7 @@ static int rio_open (struct net_device *
static void rio_timer (unsigned long data);
static void rio_tx_timeout (struct net_device *dev);
static void alloc_list (struct net_device *dev);
-static int start_xmit (struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_xmit (struct sk_buff *skb, struct net_device *dev);
static irqreturn_t rio_interrupt (int irq, void *dev_instance);
static void rio_free_tx (struct net_device *dev, int irq);
static void tx_error (struct net_device *dev, int tx_status);
@@ -600,7 +600,7 @@ alloc_list (struct net_device *dev)
return;
}
-static int
+static netdev_tx_t
start_xmit (struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
--- a/drivers/net/dnet.c 2009-08-31 16:17:51.851091302 -0700
+++ b/drivers/net/dnet.c 2009-08-31 16:39:16.011085789 -0700
@@ -541,7 +541,7 @@ static inline void dnet_print_skb(struct
#define dnet_print_skb(skb) do {} while (0)
#endif
-static int dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct dnet *bp = netdev_priv(dev);
--- a/drivers/net/enic/enic_main.c 2009-08-31 16:17:51.901107298 -0700
+++ b/drivers/net/enic/enic_main.c 2009-08-31 16:36:24.711080559 -0700
@@ -622,7 +622,8 @@ static inline void enic_queue_wq_skb(str
}
/* netif_tx_lock held, process context with BHs disabled, or BH */
-static int enic_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct enic *enic = netdev_priv(netdev);
struct vnic_wq *wq = &enic->wq[0];
--- a/drivers/net/mlx4/en_tx.c 2009-08-31 16:17:51.921107815 -0700
+++ b/drivers/net/mlx4/en_tx.c 2009-08-31 16:36:24.711080559 -0700
@@ -588,7 +588,7 @@ u16 mlx4_en_select_queue(struct net_devi
return skb_tx_hash(dev, skb);
}
-int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
--- a/drivers/net/mlx4/mlx4_en.h 2009-08-31 16:17:51.931091627 -0700
+++ b/drivers/net/mlx4/mlx4_en.h 2009-08-31 16:36:24.711080559 -0700
@@ -518,7 +518,7 @@ int mlx4_en_arm_cq(struct mlx4_en_priv *
void mlx4_en_poll_tx_cq(unsigned long data);
void mlx4_en_tx_irq(struct mlx4_cq *mcq);
u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb);
-int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev);
int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring,
u32 size, u16 stride);
--- a/drivers/net/myri10ge/myri10ge.c 2009-08-31 16:17:52.031107202 -0700
+++ b/drivers/net/myri10ge/myri10ge.c 2009-08-31 16:36:24.721107741 -0700
@@ -360,7 +360,8 @@ MODULE_PARM_DESC(myri10ge_dca, "Enable D
#define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8)
static void myri10ge_set_multicast_list(struct net_device *dev);
-static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
+ struct net_device *dev);
static inline void put_be32(__be32 val, __be32 __iomem * p)
{
@@ -2656,7 +2657,8 @@ myri10ge_submit_req(struct myri10ge_tx_b
* it and try again.
*/
-static int myri10ge_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t myri10ge_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct myri10ge_priv *mgp = netdev_priv(dev);
struct myri10ge_slice_state *ss;
@@ -2947,12 +2949,13 @@ drop:
}
-static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sk_buff *segs, *curr;
struct myri10ge_priv *mgp = netdev_priv(dev);
struct myri10ge_slice_state *ss;
- int status;
+ netdev_tx_t status;
segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO6);
if (IS_ERR(segs))
--- a/drivers/net/qla3xxx.c 2009-08-31 16:17:52.021091264 -0700
+++ b/drivers/net/qla3xxx.c 2009-08-31 16:42:51.402437620 -0700
@@ -2572,7 +2572,8 @@ map_error:
* The IOCB is always the top of the chain followed by one or more
* OALs (when necessary).
*/
-static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t ql3xxx_send(struct sk_buff *skb,
+ struct net_device *ndev)
{
struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
--- a/drivers/net/qlge/qlge_main.c 2009-08-31 16:17:51.831081285 -0700
+++ b/drivers/net/qlge/qlge_main.c 2009-08-31 16:36:24.721107741 -0700
@@ -2103,7 +2103,7 @@ static void ql_hw_csum_setup(struct sk_b
iph->daddr, len, iph->protocol, 0);
}
-static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
{
struct tx_ring_desc *tx_ring_desc;
struct ob_mac_iocb_req *mac_iocb_ptr;
--- a/drivers/net/r8169.c 2009-08-31 16:17:51.871108023 -0700
+++ b/drivers/net/r8169.c 2009-08-31 16:41:54.586435235 -0700
@@ -507,7 +507,8 @@ MODULE_LICENSE("GPL");
MODULE_VERSION(RTL8169_VERSION);
static int rtl8169_open(struct net_device *dev);
-static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance);
static int rtl8169_init_ring(struct net_device *dev);
static void rtl_hw_start(struct net_device *dev);
@@ -3357,7 +3358,8 @@ static inline u32 rtl8169_tso_csum(struc
return 0;
}
-static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
unsigned int frags, entry = tp->cur_tx % NUM_TX_DESC;
@@ -3366,7 +3368,6 @@ static int rtl8169_start_xmit(struct sk_
dma_addr_t mapping;
u32 status, len;
u32 opts1;
- int ret = NETDEV_TX_OK;
if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {
if (netif_msg_drv(tp)) {
@@ -3418,13 +3419,12 @@ static int rtl8169_start_xmit(struct sk_
}
out:
- return ret;
+ return NETDEV_TX_OK;
err_stop:
netif_stop_queue(dev);
- ret = NETDEV_TX_BUSY;
dev->stats.tx_dropped++;
- goto out;
+ return NETDEV_TX_BUSY;
}
static void rtl8169_pcierr_interrupt(struct net_device *dev)
--- a/drivers/net/s2io.c 2009-08-31 16:17:51.591127388 -0700
+++ b/drivers/net/s2io.c 2009-08-31 16:36:24.721107741 -0700
@@ -4072,7 +4072,7 @@ static int s2io_close(struct net_device
* 0 on success & 1 on failure.
*/
-static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct s2io_nic *sp = netdev_priv(dev);
u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;
--- a/drivers/net/sfc/selftest.c 2009-08-31 16:17:51.971102858 -0700
+++ b/drivers/net/sfc/selftest.c 2009-08-31 16:36:24.721107741 -0700
@@ -400,7 +400,8 @@ static int efx_begin_loopback(struct efx
struct efx_loopback_state *state = efx->loopback_selftest;
struct efx_loopback_payload *payload;
struct sk_buff *skb;
- int i, rc;
+ int i;
+ netdev_tx_t rc;
/* Transmit N copies of buffer */
for (i = 0; i < state->packet_count; i++) {
--- a/drivers/net/sfc/tx.c 2009-08-31 16:17:51.981175158 -0700
+++ b/drivers/net/sfc/tx.c 2009-08-31 16:36:24.731107057 -0700
@@ -138,8 +138,8 @@ static void efx_tsoh_free(struct efx_tx_
* Returns NETDEV_TX_OK or NETDEV_TX_BUSY
* You must hold netif_tx_lock() to call this function.
*/
-static int efx_enqueue_skb(struct efx_tx_queue *tx_queue,
- struct sk_buff *skb)
+static netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue,
+ struct sk_buff *skb)
{
struct efx_nic *efx = tx_queue->efx;
struct pci_dev *pci_dev = efx->pci_dev;
@@ -152,7 +152,7 @@ static int efx_enqueue_skb(struct efx_tx
unsigned int dma_len;
bool unmap_single;
int q_space, i = 0;
- int rc = NETDEV_TX_OK;
+ netdev_tx_t rc = NETDEV_TX_OK;
EFX_BUG_ON_PARANOID(tx_queue->write_count != tx_queue->insert_count);
@@ -353,14 +353,11 @@ static void efx_dequeue_buffers(struct e
*
* Context: netif_tx_lock held
*/
-inline int efx_xmit(struct efx_nic *efx,
- struct efx_tx_queue *tx_queue, struct sk_buff *skb)
+inline netdev_tx_t efx_xmit(struct efx_nic *efx,
+ struct efx_tx_queue *tx_queue, struct sk_buff *skb)
{
- int rc;
-
/* Map fragments for DMA and add to TX queue */
- rc = efx_enqueue_skb(tx_queue, skb);
- return rc;
+ return efx_enqueue_skb(tx_queue, skb);
}
/* Initiate a packet transmission. We use one channel per CPU
@@ -372,7 +369,8 @@ inline int efx_xmit(struct efx_nic *efx,
* Note that returning anything other than NETDEV_TX_OK will cause the
* OS to free the skb.
*/
-int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
+netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *net_dev)
{
struct efx_nic *efx = netdev_priv(net_dev);
struct efx_tx_queue *tx_queue;
--- a/drivers/net/skfp/skfddi.c 2009-08-31 16:17:51.741089258 -0700
+++ b/drivers/net/skfp/skfddi.c 2009-08-31 16:36:24.731107057 -0700
@@ -107,7 +107,8 @@ static void skfp_ctl_set_multicast_list(
static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev);
static int skfp_ctl_set_mac_address(struct net_device *dev, void *addr);
static int skfp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t skfp_send_pkt(struct sk_buff *skb,
+ struct net_device *dev);
static void send_queued_packets(struct s_smc *smc);
static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr);
static void ResetAdapter(struct s_smc *smc);
@@ -1056,7 +1057,8 @@ static int skfp_ioctl(struct net_device
* Side Effects:
* None
*/
-static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t skfp_send_pkt(struct sk_buff *skb,
+ struct net_device *dev)
{
struct s_smc *smc = netdev_priv(dev);
skfddi_priv *bp = &smc->os;
--- a/drivers/net/vxge/vxge-main.c 2009-08-31 16:17:51.931091627 -0700
+++ b/drivers/net/vxge/vxge-main.c 2009-08-31 16:36:24.731107057 -0700
@@ -812,7 +812,7 @@ static int vxge_learn_mac(struct vxgedev
* NOTE: when device cant queue the pkt, just the trans_start variable will
* not be upadted.
*/
-static int
+static netdev_tx_t
vxge_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct vxge_fifo *fifo = NULL;
--- a/drivers/net/8390.h 2009-08-31 16:17:52.131105595 -0700
+++ b/drivers/net/8390.h 2009-08-31 16:40:36.434427859 -0700
@@ -40,7 +40,7 @@ extern int ei_open(struct net_device *de
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 *d
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);
--- a/drivers/net/bnx2.c 2009-08-31 16:17:51.661107653 -0700
+++ b/drivers/net/bnx2.c 2009-08-31 16:36:24.731107057 -0700
@@ -6283,7 +6283,7 @@ bnx2_vlan_rx_register(struct net_device
* bnx2_tx_int() runs without netif_tx_lock unless it needs to call
* netif_wake_queue().
*/
-static int
+static netdev_tx_t
bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct bnx2 *bp = netdev_priv(dev);
--- a/drivers/net/bnx2x_main.c 2009-08-31 16:17:51.891154077 -0700
+++ b/drivers/net/bnx2x_main.c 2009-08-31 16:38:39.354410495 -0700
@@ -10936,7 +10936,7 @@ exit_lbl:
* bnx2x_tx_int() runs without netif_tx_lock unless it needs to call
* netif_wake_queue()
*/
-static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct bnx2x *bp = netdev_priv(dev);
struct bnx2x_fastpath *fp, *fp_stat;
--- a/drivers/net/cassini.c 2009-08-31 16:17:51.671091953 -0700
+++ b/drivers/net/cassini.c 2009-08-31 16:38:42.266410766 -0700
@@ -2918,7 +2918,7 @@ static inline int cas_xmit_tx_ringN(stru
return 0;
}
-static int cas_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t cas_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct cas *cp = netdev_priv(dev);
--- a/drivers/net/epic100.c 2009-08-31 16:17:52.091080675 -0700
+++ b/drivers/net/epic100.c 2009-08-31 16:39:51.594420051 -0700
@@ -298,7 +298,8 @@ static void epic_restart(struct net_devi
static void epic_timer(unsigned long data);
static void epic_tx_timeout(struct net_device *dev);
static void epic_init_ring(struct net_device *dev);
-static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t epic_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int epic_rx(struct net_device *dev, int budget);
static int epic_poll(struct napi_struct *napi, int budget);
static irqreturn_t epic_interrupt(int irq, void *dev_instance);
@@ -961,7 +962,7 @@ static void epic_init_ring(struct net_de
return;
}
-static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t epic_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct epic_private *ep = netdev_priv(dev);
int entry, free_count;
--- a/drivers/net/ethoc.c 2009-08-31 16:17:51.791080739 -0700
+++ b/drivers/net/ethoc.c 2009-08-31 16:40:02.458421479 -0700
@@ -802,7 +802,7 @@ static struct net_device_stats *ethoc_st
return &priv->stats;
}
-static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ethoc *priv = netdev_priv(dev);
struct ethoc_bd bd;
--- a/drivers/net/fealnx.c 2009-08-31 16:17:51.681103561 -0700
+++ b/drivers/net/fealnx.c 2009-08-31 16:36:24.741106722 -0700
@@ -433,7 +433,7 @@ static void netdev_timer(unsigned long d
static void reset_timer(unsigned long data);
static void fealnx_tx_timeout(struct net_device *dev);
static void init_ring(struct net_device *dev);
-static int start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
static int netdev_rx(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
@@ -1305,7 +1305,7 @@ static void init_ring(struct net_device
}
-static int start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
unsigned long flags;
--- a/drivers/net/hamachi.c 2009-08-31 16:17:51.921107815 -0700
+++ b/drivers/net/hamachi.c 2009-08-31 16:40:25.051129145 -0700
@@ -557,7 +557,8 @@ static int netdev_ioctl(struct net_devic
static void hamachi_timer(unsigned long data);
static void hamachi_tx_timeout(struct net_device *dev);
static void hamachi_init_ring(struct net_device *dev);
-static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t hamachi_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t hamachi_interrupt(int irq, void *dev_instance);
static int hamachi_rx(struct net_device *dev);
static inline int hamachi_tx(struct net_device *dev);
@@ -1263,7 +1264,8 @@ do { \
} while (0)
#endif
-static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hamachi_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct hamachi_private *hmp = netdev_priv(dev);
unsigned entry;
--- a/drivers/net/ibmveth.c 2009-08-31 16:17:51.861094040 -0700
+++ b/drivers/net/ibmveth.c 2009-08-31 16:42:56.026443187 -0700
@@ -887,7 +887,8 @@ static int ibmveth_ioctl(struct net_devi
#define page_offset(v) ((unsigned long)(v) & ((1 << 12) - 1))
-static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct ibmveth_adapter *adapter = netdev_priv(netdev);
union ibmveth_buf_desc desc;
--- a/drivers/net/ipg.c 2009-08-31 16:17:52.061091529 -0700
+++ b/drivers/net/ipg.c 2009-08-31 16:42:55.722443027 -0700
@@ -1858,7 +1858,8 @@ static int ipg_nic_stop(struct net_devic
return 0;
}
-static int ipg_nic_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipg_nic_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ipg_nic_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp->ioaddr;
--- a/drivers/net/jme.c 2009-08-31 16:17:51.911090062 -0700
+++ b/drivers/net/jme.c 2009-08-31 16:36:24.751080685 -0700
@@ -1931,7 +1931,7 @@ jme_stop_queue_if_full(struct jme_adapte
* This function is already protected by netif_tx_lock()
*/
-static int
+static netdev_tx_t
jme_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{
struct jme_adapter *jme = netdev_priv(netdev);
--- a/drivers/net/ks8851.c 2009-08-31 16:17:52.001107231 -0700
+++ b/drivers/net/ks8851.c 2009-08-31 16:42:55.013622984 -0700
@@ -868,11 +868,12 @@ static int ks8851_net_stop(struct net_de
* and secondly so we can round up more than one packet to transmit which
* means we can try and avoid generating too many transmit done interrupts.
*/
-static int ks8851_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ks8851_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ks8851_net *ks = netdev_priv(dev);
unsigned needed = calc_txlen(skb->len);
- int ret = NETDEV_TX_OK;
+ netdev_tx_t ret = NETDEV_TX_OK;
if (netif_msg_tx_queued(ks))
ks_dbg(ks, "%s: skb %p, %d@%p\n", __func__,
--- a/drivers/net/loopback.c 2009-08-31 16:17:51.821080852 -0700
+++ b/drivers/net/loopback.c 2009-08-31 16:42:53.978443096 -0700
@@ -69,7 +69,8 @@ struct pcpu_lstats {
* The higher levels take care of making this non-reentrant (it's
* called with bh's disabled).
*/
-static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t loopback_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct pcpu_lstats *pcpu_lstats, *lb_stats;
int len;
--- a/drivers/net/natsemi.c 2009-08-31 16:17:51.811088031 -0700
+++ b/drivers/net/natsemi.c 2009-08-31 16:36:24.751080685 -0700
@@ -621,7 +621,7 @@ static void drain_ring(struct net_device
static void free_ring(struct net_device *dev);
static void reinit_ring(struct net_device *dev);
static void init_registers(struct net_device *dev);
-static int start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
static void netdev_error(struct net_device *dev, int intr_status);
static int natsemi_poll(struct napi_struct *napi, int budget);
@@ -2079,7 +2079,7 @@ static void reinit_ring(struct net_devic
reinit_rx(dev);
}
-static int start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
void __iomem * ioaddr = ns_ioaddr(dev);
--- a/drivers/net/ns83820.c 2009-08-31 16:17:51.711090054 -0700
+++ b/drivers/net/ns83820.c 2009-08-31 16:42:52.194444777 -0700
@@ -1077,7 +1077,8 @@ static void ns83820_cleanup_tx(struct ns
* while trying to track down a bug in either the zero copy code or
* the tx fifo (hence the MAX_FRAG_LEN).
*/
-static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t ns83820_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *ndev)
{
struct ns83820 *dev = PRIV(ndev);
u32 free_idx, cmdsts, extsts;
--- a/drivers/net/pcnet32.c 2009-08-31 16:17:52.071101739 -0700
+++ b/drivers/net/pcnet32.c 2009-08-31 16:42:51.794438138 -0700
@@ -303,7 +303,8 @@ static int pcnet32_probe_pci(struct pci_
static int pcnet32_probe1(unsigned long, int, struct pci_dev *);
static int pcnet32_open(struct net_device *);
static int pcnet32_init_ring(struct net_device *);
-static int pcnet32_start_xmit(struct sk_buff *, struct net_device *);
+static netdev_tx_t pcnet32_start_xmit(struct sk_buff *,
+ struct net_device *);
static void pcnet32_tx_timeout(struct net_device *dev);
static irqreturn_t pcnet32_interrupt(int, void *);
static int pcnet32_close(struct net_device *);
@@ -2481,7 +2482,8 @@ static void pcnet32_tx_timeout(struct ne
spin_unlock_irqrestore(&lp->lock, flags);
}
-static int pcnet32_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct pcnet32_private *lp = netdev_priv(dev);
unsigned long ioaddr = dev->base_addr;
--- a/drivers/net/r6040.c 2009-08-31 16:17:51.661107653 -0700
+++ b/drivers/net/r6040.c 2009-08-31 16:42:51.001128513 -0700
@@ -883,13 +883,13 @@ static int r6040_open(struct net_device
return 0;
}
-static int r6040_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct r6040_private *lp = netdev_priv(dev);
struct r6040_descriptor *descptr;
void __iomem *ioaddr = lp->base;
unsigned long flags;
- int ret = NETDEV_TX_OK;
/* Critical Section */
spin_lock_irqsave(&lp->lock, flags);
@@ -899,8 +899,7 @@ static int r6040_start_xmit(struct sk_bu
spin_unlock_irqrestore(&lp->lock, flags);
netif_stop_queue(dev);
printk(KERN_ERR DRV_NAME ": no tx descriptor\n");
- ret = NETDEV_TX_BUSY;
- return ret;
+ return NETDEV_TX_BUSY;
}
/* Statistic Counter */
@@ -928,7 +927,8 @@ static int r6040_start_xmit(struct sk_bu
dev->trans_start = jiffies;
spin_unlock_irqrestore(&lp->lock, flags);
- return ret;
+
+ return NETDEV_TX_OK;
}
static void r6040_multicast_list(struct net_device *dev)
--- a/drivers/net/rrunner.c 2009-08-31 16:17:51.671091953 -0700
+++ b/drivers/net/rrunner.c 2009-08-31 16:41:52.402435318 -0700
@@ -1401,7 +1401,8 @@ static int rr_close(struct net_device *d
}
-static int rr_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t rr_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct rr_private *rrpriv = netdev_priv(dev);
struct rr_regs __iomem *regs = rrpriv->regs;
--- a/drivers/net/sfc/efx.h 2009-08-31 16:17:51.971102858 -0700
+++ b/drivers/net/sfc/efx.h 2009-08-31 16:36:24.751080685 -0700
@@ -20,8 +20,9 @@
#define FALCON_B_P_DEVID 0x0710
/* TX */
-extern int efx_xmit(struct efx_nic *efx,
- struct efx_tx_queue *tx_queue, struct sk_buff *skb);
+extern netdev_tx_t efx_xmit(struct efx_nic *efx,
+ struct efx_tx_queue *tx_queue,
+ struct sk_buff *skb);
extern void efx_stop_queue(struct efx_nic *efx);
extern void efx_wake_queue(struct efx_nic *efx);
--- a/drivers/net/sfc/tx.h 2009-08-31 16:17:51.981175158 -0700
+++ b/drivers/net/sfc/tx.h 2009-08-31 16:36:24.751080685 -0700
@@ -18,7 +18,8 @@ void efx_remove_tx_queue(struct efx_tx_q
void efx_init_tx_queue(struct efx_tx_queue *tx_queue);
void efx_fini_tx_queue(struct efx_tx_queue *tx_queue);
-int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev);
+netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *net_dev);
void efx_release_tx_buffers(struct efx_tx_queue *tx_queue);
#endif /* EFX_TX_H */
--- a/drivers/net/sis190.c 2009-08-31 16:17:52.011106546 -0700
+++ b/drivers/net/sis190.c 2009-08-31 16:42:48.914443616 -0700
@@ -1168,7 +1168,8 @@ static int sis190_close(struct net_devic
return 0;
}
-static int sis190_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sis190_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sis190_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
--- a/drivers/net/sis900.c 2009-08-31 16:17:51.761108563 -0700
+++ b/drivers/net/sis900.c 2009-08-31 16:42:48.381106209 -0700
@@ -214,7 +214,8 @@ static void sis900_check_mode (struct ne
static void sis900_tx_timeout(struct net_device *net_dev);
static void sis900_init_tx_ring(struct net_device *net_dev);
static void sis900_init_rx_ring(struct net_device *net_dev);
-static int sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev);
+static netdev_tx_t sis900_start_xmit(struct sk_buff *skb,
+ struct net_device *net_dev);
static int sis900_rx(struct net_device *net_dev);
static void sis900_finish_xmit (struct net_device *net_dev);
static irqreturn_t sis900_interrupt(int irq, void *dev_instance);
@@ -1571,7 +1572,7 @@ static void sis900_tx_timeout(struct net
* tell upper layer if the buffer is full
*/
-static int
+static netdev_tx_t
sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
{
struct sis900_private *sis_priv = netdev_priv(net_dev);
--- a/drivers/net/smsc9420.c 2009-08-31 16:17:51.761108563 -0700
+++ b/drivers/net/smsc9420.c 2009-08-31 16:42:46.234442667 -0700
@@ -968,7 +968,8 @@ static void smsc9420_complete_tx(struct
}
}
-static int smsc9420_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smsc9420_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smsc9420_pdata *pd = netdev_priv(dev);
dma_addr_t mapping;
--- a/drivers/net/starfire.c 2009-08-31 16:17:51.761108563 -0700
+++ b/drivers/net/starfire.c 2009-08-31 16:36:24.761107239 -0700
@@ -595,7 +595,7 @@ static int netdev_open(struct net_device
static void check_duplex(struct net_device *dev);
static void tx_timeout(struct net_device *dev);
static void init_ring(struct net_device *dev);
-static int start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
static void netdev_error(struct net_device *dev, int intr_status);
static int __netdev_rx(struct net_device *dev, int *quota);
@@ -1223,7 +1223,7 @@ static void init_ring(struct net_device
}
-static int start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
unsigned int entry;
--- a/drivers/net/sundance.c 2009-08-31 16:17:51.641113072 -0700
+++ b/drivers/net/sundance.c 2009-08-31 16:36:24.761107239 -0700
@@ -415,7 +415,7 @@ static void check_duplex(struct net_devi
static void netdev_timer(unsigned long data);
static void tx_timeout(struct net_device *dev);
static void init_ring(struct net_device *dev);
-static int start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static int reset_tx (struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
static void rx_poll(unsigned long data);
@@ -1053,7 +1053,7 @@ static void tx_poll (unsigned long data)
return;
}
-static int
+static netdev_tx_t
start_tx (struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
--- a/drivers/net/sungem.c 2009-08-31 16:17:52.121107606 -0700
+++ b/drivers/net/sungem.c 2009-08-31 16:42:45.802436433 -0700
@@ -1015,7 +1015,8 @@ static __inline__ int gem_intme(int entr
return 0;
}
-static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t gem_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct gem *gp = netdev_priv(dev);
int entry;
--- a/drivers/net/sunhme.c 2009-08-31 16:17:51.611108000 -0700
+++ b/drivers/net/sunhme.c 2009-08-31 16:42:30.306439876 -0700
@@ -2252,7 +2252,8 @@ static void happy_meal_tx_timeout(struct
netif_wake_queue(dev);
}
-static int happy_meal_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t happy_meal_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct happy_meal *hp = netdev_priv(dev);
int entry;
--- a/drivers/net/tehuti.c 2009-08-31 16:17:51.691086184 -0700
+++ b/drivers/net/tehuti.c 2009-08-31 16:42:45.371105775 -0700
@@ -1622,7 +1622,8 @@ static inline int bdx_tx_space(struct bd
* the driver. Note: the driver must NOT put the skb in its DMA ring.
* o NETDEV_TX_LOCKED Locking failed, please retry quickly.
*/
-static int bdx_tx_transmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
+ struct net_device *ndev)
{
struct bdx_priv *priv = netdev_priv(ndev);
struct txd_fifo *f = &priv->txd_fifo0;
--- a/drivers/net/tlan.c 2009-08-31 16:17:51.781091061 -0700
+++ b/drivers/net/tlan.c 2009-08-31 16:43:00.411106320 -0700
@@ -289,7 +289,7 @@ static void TLan_EisaProbe( void );
static void TLan_Eisa_Cleanup( void );
static int TLan_Init( struct net_device * );
static int TLan_Open( struct net_device *dev );
-static int TLan_StartTx( struct sk_buff *, struct net_device *);
+static netdev_tx_t TLan_StartTx( struct sk_buff *, struct net_device *);
static irqreturn_t TLan_HandleInterrupt( int, void *);
static int TLan_Close( struct net_device *);
static struct net_device_stats *TLan_GetStats( struct net_device *);
@@ -1083,7 +1083,7 @@ static void TLan_tx_timeout_work(struct
*
**************************************************************/
-static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
+static netdev_tx_t TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
{
TLanPrivateInfo *priv = netdev_priv(dev);
dma_addr_t tail_list_phys;
--- a/drivers/net/typhoon.c 2009-08-31 16:17:51.771107041 -0700
+++ b/drivers/net/typhoon.c 2009-08-31 16:36:24.771091120 -0700
@@ -762,7 +762,7 @@ typhoon_tso_fill(struct sk_buff *skb, st
tcpd->status = 0;
}
-static int
+static netdev_tx_t
typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct typhoon *tp = netdev_priv(dev);
--- a/drivers/net/via-velocity.c 2009-08-31 16:17:52.051110024 -0700
+++ b/drivers/net/via-velocity.c 2009-08-31 16:43:44.442449061 -0700
@@ -2465,7 +2465,8 @@ static int velocity_close(struct net_dev
* Called by the networ layer to request a packet is queued to
* the velocity. Returns zero on success.
*/
-static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t velocity_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct velocity_info *vptr = netdev_priv(dev);
int qnum = 0;
--- a/drivers/net/yellowfin.c 2009-08-31 16:17:51.881097631 -0700
+++ b/drivers/net/yellowfin.c 2009-08-31 16:43:43.994451131 -0700
@@ -347,7 +347,8 @@ static int yellowfin_open(struct net_dev
static void yellowfin_timer(unsigned long data);
static void yellowfin_tx_timeout(struct net_device *dev);
static void yellowfin_init_ring(struct net_device *dev);
-static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t yellowfin_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance);
static int yellowfin_rx(struct net_device *dev);
static void yellowfin_error(struct net_device *dev, int intr_status);
@@ -808,7 +809,8 @@ static void yellowfin_init_ring(struct n
return;
}
-static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t yellowfin_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct yellowfin_private *yp = netdev_priv(dev);
unsigned entry;
--- a/drivers/net/forcedeth.c 2009-08-31 16:17:51.831081285 -0700
+++ b/drivers/net/forcedeth.c 2009-08-31 16:40:19.171085873 -0700
@@ -2137,7 +2137,7 @@ static void nv_gear_backoff_reseed(struc
* nv_start_xmit: dev->hard_start_xmit function
* Called with netif_tx_lock held.
*/
-static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct fe_priv *np = netdev_priv(dev);
u32 tx_flags = 0;
@@ -2257,7 +2257,8 @@ static int nv_start_xmit(struct sk_buff
return NETDEV_TX_OK;
}
-static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
+ struct net_device *dev)
{
struct fe_priv *np = netdev_priv(dev);
u32 tx_flags = 0;
--- a/drivers/net/chelsio/sge.c 2009-08-31 16:17:51.951107788 -0700
+++ b/drivers/net/chelsio/sge.c 2009-08-31 16:36:24.771091120 -0700
@@ -1776,7 +1776,7 @@ static inline int eth_hdr_len(const void
/*
* Adds the CPL header to the sk_buff and passes it to t1_sge_tx.
*/
-int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct adapter *adapter = dev->ml_priv;
struct sge *sge = adapter->sge;
--- a/drivers/net/chelsio/sge.h 2009-08-31 16:17:51.961089993 -0700
+++ b/drivers/net/chelsio/sge.h 2009-08-31 16:36:24.771091120 -0700
@@ -78,7 +78,7 @@ void t1_sge_destroy(struct sge *);
irqreturn_t t1_interrupt(int irq, void *cookie);
int t1_poll(struct napi_struct *, int);
-int t1_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev);
void t1_set_vlan_accel(struct adapter *adapter, int on_off);
void t1_sge_start(struct sge *);
void t1_sge_stop(struct sge *);
--- a/include/linux/arcdevice.h 2009-08-31 16:17:52.141091361 -0700
+++ b/include/linux/arcdevice.h 2009-08-31 16:36:24.771091120 -0700
@@ -337,7 +337,8 @@ struct net_device *alloc_arcdev(const ch
int arcnet_open(struct net_device *dev);
int arcnet_close(struct net_device *dev);
-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);
void arcnet_timeout(struct net_device *dev);
#endif /* __KERNEL__ */
--- a/drivers/net/defxx.c 2009-08-31 16:17:51.651089690 -0700
+++ b/drivers/net/defxx.c 2009-08-31 16:38:56.194413210 -0700
@@ -300,7 +300,8 @@ static int dfx_rcv_init(DFX_board_t *bp
static void dfx_rcv_queue_process(DFX_board_t *bp);
static void dfx_rcv_flush(DFX_board_t *bp);
-static int dfx_xmt_queue_pkt(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t dfx_xmt_queue_pkt(struct sk_buff *skb,
+ struct net_device *dev);
static int dfx_xmt_done(DFX_board_t *bp);
static void dfx_xmt_flush(DFX_board_t *bp);
@@ -3188,11 +3189,8 @@ static void dfx_rcv_queue_process(
* None
*/
-static int dfx_xmt_queue_pkt(
- struct sk_buff *skb,
- struct net_device *dev
- )
-
+static netdev_tx_t dfx_xmt_queue_pkt(struct sk_buff *skb,
+ struct net_device *dev)
{
DFX_board_t *bp = netdev_priv(dev);
u8 prod; /* local transmit producer index */
--- a/drivers/net/eexpress.c 2009-08-31 16:17:52.081095049 -0700
+++ b/drivers/net/eexpress.c 2009-08-31 16:39:35.771085661 -0700
@@ -246,7 +246,8 @@ static char mca_irqmap[] = { 12, 9, 3, 4
static int eexp_open(struct net_device *dev);
static int eexp_close(struct net_device *dev);
static void eexp_timeout(struct net_device *dev);
-static int eexp_xmit(struct sk_buff *buf, struct net_device *dev);
+static netdev_tx_t eexp_xmit(struct sk_buff *buf,
+ struct net_device *dev);
static irqreturn_t eexp_irq(int irq, void *dev_addr);
static void eexp_set_multicast(struct net_device *dev);
@@ -650,7 +651,7 @@ static void eexp_timeout(struct net_devi
* Called to transmit a packet, or to allow us to right ourselves
* if the kernel thinks we've died.
*/
-static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
+static netdev_tx_t eexp_xmit(struct sk_buff *buf, struct net_device *dev)
{
short length = buf->len;
#ifdef CONFIG_SMP
--- a/drivers/net/hp100.c 2009-08-31 16:17:52.111091459 -0700
+++ b/drivers/net/hp100.c 2009-08-31 16:40:42.621128055 -0700
@@ -240,9 +240,10 @@ static int hp100_probe1(struct net_devic
static int hp100_open(struct net_device *dev);
static int hp100_close(struct net_device *dev);
-static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static int hp100_start_xmit_bm(struct sk_buff *skb,
- struct net_device *dev);
+static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb,
+ struct net_device *dev);
static void hp100_rx(struct net_device *dev);
static struct net_device_stats *hp100_get_stats(struct net_device *dev);
static void hp100_misc_interrupt(struct net_device *dev);
@@ -1483,7 +1484,8 @@ static int hp100_check_lan(struct net_de
*/
/* tx function for busmaster mode */
-static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb,
+ struct net_device *dev)
{
unsigned long flags;
int i, ok_flag;
@@ -1635,7 +1637,8 @@ static void hp100_clean_txring(struct ne
}
/* tx function for slave modes */
-static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
unsigned long flags;
int i, ok_flag;
--- a/drivers/net/ibmlana.c 2009-08-31 16:17:51.701108128 -0700
+++ b/drivers/net/ibmlana.c 2009-08-31 16:36:24.781108175 -0700
@@ -812,7 +812,7 @@ static int ibmlana_close(struct net_devi
/* transmit a block. */
-static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ibmlana_tx(struct sk_buff *skb, struct net_device *dev)
{
ibmlana_priv *priv = netdev_priv(dev);
int tmplen, addr;
--- a/drivers/net/lance.c 2009-08-31 16:17:51.721104525 -0700
+++ b/drivers/net/lance.c 2009-08-31 16:42:54.666443453 -0700
@@ -300,7 +300,8 @@ static unsigned char lance_need_isa_boun
static int lance_open(struct net_device *dev);
static void lance_init_ring(struct net_device *dev, gfp_t mode);
-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);
static int lance_rx(struct net_device *dev);
static irqreturn_t lance_interrupt(int irq, void *dev_id);
static int lance_close(struct net_device *dev);
@@ -949,7 +950,8 @@ static void lance_tx_timeout (struct net
}
-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 = dev->ml_priv;
int ioaddr = dev->base_addr;
--- a/drivers/net/rrunner.h 2009-08-31 16:17:51.721104525 -0700
+++ b/drivers/net/rrunner.h 2009-08-31 16:42:50.602442443 -0700
@@ -831,7 +831,8 @@ static int rr_init1(struct net_device *d
static irqreturn_t rr_interrupt(int irq, void *dev_id);
static int rr_open(struct net_device *dev);
-static int rr_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t rr_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int rr_close(struct net_device *dev);
static int rr_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static unsigned int rr_read_eeprom(struct rr_private *rrpriv,
--- a/drivers/net/sb1000.c 2009-08-31 16:17:52.081095049 -0700
+++ b/drivers/net/sb1000.c 2009-08-31 16:42:50.181105863 -0700
@@ -82,7 +82,8 @@ struct sb1000_private {
extern int sb1000_probe(struct net_device *dev);
static int sb1000_open(struct net_device *dev);
static int sb1000_dev_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd);
-static int sb1000_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t sb1000_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t sb1000_interrupt(int irq, void *dev_id);
static int sb1000_close(struct net_device *dev);
@@ -1080,7 +1081,7 @@ static int sb1000_dev_ioctl(struct net_d
}
/* transmit function: do nothing since SB1000 can't send anything out */
-static int
+static netdev_tx_t
sb1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
printk(KERN_WARNING "%s: trying to transmit!!!\n", dev->name);
--- a/drivers/net/seeq8005.c 2009-08-31 16:17:52.111091459 -0700
+++ b/drivers/net/seeq8005.c 2009-08-31 16:42:49.354442555 -0700
@@ -81,7 +81,8 @@ struct net_local {
static int seeq8005_probe1(struct net_device *dev, int ioaddr);
static int seeq8005_open(struct net_device *dev);
static void seeq8005_timeout(struct net_device *dev);
-static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t seeq8005_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t seeq8005_interrupt(int irq, void *dev_id);
static void seeq8005_rx(struct net_device *dev);
static int seeq8005_close(struct net_device *dev);
@@ -394,7 +395,8 @@ static void seeq8005_timeout(struct net_
netif_wake_queue(dev);
}
-static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t seeq8005_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
short length = skb->len;
unsigned char *buf;
--- a/drivers/net/smc9194.c 2009-08-31 16:17:51.691086184 -0700
+++ b/drivers/net/smc9194.c 2009-08-31 16:42:46.642442217 -0700
@@ -299,7 +299,8 @@ static void smc_hardware_send_packet( st
. to store the packet, I call this routine, which either sends it
. now, or generates an interrupt when the card is ready for the
. packet */
-static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device *dev );
+static netdev_tx_t smc_wait_to_send_packet( struct sk_buff * skb,
+ struct net_device *dev );
/* this does a soft reset on the device */
static void smc_reset( int ioaddr );
@@ -487,7 +488,8 @@ static void smc_setmulticast( int ioaddr
. o (NO): Enable interrupts and let the interrupt handler deal with it.
. o (YES):Send it now.
*/
-static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * dev )
+static netdev_tx_t smc_wait_to_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smc_local *lp = netdev_priv(dev);
unsigned int ioaddr = dev->base_addr;
--- a/drivers/net/depca.c 2009-08-31 16:17:51.601091224 -0700
+++ b/drivers/net/depca.c 2009-08-31 16:39:04.691085620 -0700
@@ -516,7 +516,8 @@ struct depca_private {
** Public Functions
*/
static int depca_open(struct net_device *dev);
-static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t depca_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t depca_interrupt(int irq, void *dev_id);
static int depca_close(struct net_device *dev);
static int depca_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
@@ -928,7 +929,8 @@ static void depca_tx_timeout(struct net_
/*
** Writes a socket buffer to TX descriptor ring and starts transmission
*/
-static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t depca_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct depca_private *lp = netdev_priv(dev);
u_long ioaddr = dev->base_addr;
--- a/drivers/net/ewrk3.c 2009-08-31 16:17:51.581109773 -0700
+++ b/drivers/net/ewrk3.c 2009-08-31 16:40:35.114425599 -0700
@@ -298,7 +298,7 @@ struct ewrk3_private {
** Public Functions
*/
static int ewrk3_open(struct net_device *dev);
-static int ewrk3_queue_pkt(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ewrk3_queue_pkt(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t ewrk3_interrupt(int irq, void *dev_id);
static int ewrk3_close(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
@@ -764,7 +764,7 @@ static void ewrk3_timeout(struct net_dev
/*
** Writes a socket buffer to the free page queue
*/
-static int ewrk3_queue_pkt (struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ewrk3_queue_pkt(struct sk_buff *skb, struct net_device *dev)
{
struct ewrk3_private *lp = netdev_priv(dev);
u_long iobase = dev->base_addr;
--- a/drivers/net/znet.c 2009-08-31 16:17:51.581109773 -0700
+++ b/drivers/net/znet.c 2009-08-31 16:43:21.098446543 -0700
@@ -156,7 +156,8 @@ struct netidblk {
};
static int znet_open(struct net_device *dev);
-static int znet_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t znet_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t znet_interrupt(int irq, void *dev_id);
static void znet_rx(struct net_device *dev);
static int znet_close(struct net_device *dev);
@@ -534,7 +535,7 @@ static void znet_tx_timeout (struct net_
netif_wake_queue (dev);
}
-static int znet_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t znet_send_packet(struct sk_buff *skb, struct net_device *dev)
{
int ioaddr = dev->base_addr;
struct znet_private *znet = netdev_priv(dev);
--- a/drivers/net/enc28j60.c 2009-08-31 16:17:51.941091292 -0700
+++ b/drivers/net/enc28j60.c 2009-08-31 16:39:43.914413236 -0700
@@ -1276,7 +1276,8 @@ static void enc28j60_hw_tx(struct enc28j
locked_reg_bfset(priv, ECON1, ECON1_TXRTS);
}
-static int enc28j60_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t enc28j60_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct enc28j60_net *priv = netdev_priv(dev);
--- a/drivers/net/eth16i.c 2009-08-31 16:17:51.711090054 -0700
+++ b/drivers/net/eth16i.c 2009-08-31 16:36:24.791088913 -0700
@@ -405,7 +405,7 @@ static int eth16i_read_eeprom_word(i
static void eth16i_eeprom_cmd(int ioaddr, unsigned char command);
static int eth16i_open(struct net_device *dev);
static int eth16i_close(struct net_device *dev);
-static int eth16i_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t eth16i_tx(struct sk_buff *skb, struct net_device *dev);
static void eth16i_rx(struct net_device *dev);
static void eth16i_timeout(struct net_device *dev);
static irqreturn_t eth16i_interrupt(int irq, void *dev_id);
@@ -1053,7 +1053,7 @@ static void eth16i_timeout(struct net_de
netif_wake_queue(dev);
}
-static int eth16i_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t eth16i_tx(struct sk_buff *skb, struct net_device *dev)
{
struct eth16i_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;
--- a/drivers/net/ni52.c 2009-08-31 16:17:51.631107610 -0700
+++ b/drivers/net/ni52.c 2009-08-31 16:42:53.626442768 -0700
@@ -170,7 +170,7 @@ static int ni52_probe1(struct net_de
static irqreturn_t ni52_interrupt(int irq, void *dev_id);
static int ni52_open(struct net_device *dev);
static int ni52_close(struct net_device *dev);
-static int ni52_send_packet(struct sk_buff *, struct net_device *);
+static netdev_tx_t ni52_send_packet(struct sk_buff *, struct net_device *);
static struct net_device_stats *ni52_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static void ni52_timeout(struct net_device *dev);
@@ -1173,7 +1173,8 @@ static void ni52_timeout(struct net_devi
* send frame
*/
-static int ni52_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ni52_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
int len, i;
#ifndef NO_NOPCOMMANDS
--- a/drivers/net/ni65.c 2009-08-31 16:17:51.651089690 -0700
+++ b/drivers/net/ni65.c 2009-08-31 16:42:53.242442567 -0700
@@ -252,7 +252,8 @@ static void ni65_xmit_intr(struct net_de
static int ni65_open(struct net_device *dev);
static int ni65_lance_reinit(struct net_device *dev);
static void ni65_init_lance(struct priv *p,unsigned char*,int,int);
-static int ni65_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ni65_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static void ni65_timeout(struct net_device *dev);
static int ni65_close(struct net_device *dev);
static int ni65_alloc_buffer(struct net_device *dev);
@@ -1157,7 +1158,8 @@ static void ni65_timeout(struct net_devi
* Send a packet
*/
-static int ni65_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ni65_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct priv *p = dev->ml_priv;
--- a/drivers/net/sc92031.c 2009-08-31 16:17:51.841107560 -0700
+++ b/drivers/net/sc92031.c 2009-08-31 16:42:49.781105231 -0700
@@ -941,7 +941,8 @@ static struct net_device_stats *sc92031_
return &dev->stats;
}
-static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sc92031_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sc92031_priv *priv = netdev_priv(dev);
void __iomem *port_base = priv->port_base;
--- a/drivers/net/lp486e.c 2009-08-31 16:17:51.881097631 -0700
+++ b/drivers/net/lp486e.c 2009-08-31 16:36:24.791088913 -0700
@@ -377,7 +377,7 @@ static char init_setup[14] = {
};
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);
@@ -863,7 +863,7 @@ static int i596_open(struct net_device *
return 0; /* Always succeed */
}
-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 tx_cmd *tx_cmd;
short length;
--
^ permalink raw reply
* [PATCH 16/19] intel: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, e1000-devel
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: intel.patch --]
[-- Type: text/plain, Size: 7675 bytes --]
Get rid of some bogus return wrapping as well.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/e100.c | 3 ++-
drivers/net/e1000/e1000_main.c | 6 ++++--
drivers/net/e1000e/netdev.c | 3 ++-
drivers/net/igb/igb_main.c | 19 +++++++++++--------
drivers/net/igbvf/netdev.c | 14 ++++++--------
drivers/net/ixgb/ixgb_main.c | 5 +++--
drivers/net/ixgbe/ixgbe_main.c | 3 ++-
7 files changed, 30 insertions(+), 23 deletions(-)
--- a/drivers/net/e100.c 2009-08-31 16:17:52.421107750 -0700
+++ b/drivers/net/e100.c 2009-08-31 16:30:52.554352111 -0700
@@ -1690,7 +1690,8 @@ static void e100_xmit_prepare(struct nic
cb->u.tcb.tbd.size = cpu_to_le16(skb->len);
}
-static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t e100_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct nic *nic = netdev_priv(netdev);
int err;
--- a/drivers/net/e1000/e1000_main.c 2009-08-31 16:17:52.441081727 -0700
+++ b/drivers/net/e1000/e1000_main.c 2009-08-31 16:31:06.101316042 -0700
@@ -125,7 +125,8 @@ static void e1000_set_rx_mode(struct net
static void e1000_update_phy_info(unsigned long data);
static void e1000_watchdog(unsigned long data);
static void e1000_82547_tx_fifo_stall(unsigned long data);
-static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
+static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev);
static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
static int e1000_set_mac(struct net_device *netdev, void *p);
@@ -3249,7 +3250,8 @@ static int e1000_maybe_stop_tx(struct ne
}
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 )
-static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
--- a/drivers/net/e1000e/netdev.c 2009-08-31 16:17:52.421107750 -0700
+++ b/drivers/net/e1000e/netdev.c 2009-08-31 16:31:18.442354494 -0700
@@ -4097,7 +4097,8 @@ static int e1000_maybe_stop_tx(struct ne
}
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 )
-static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_ring *tx_ring = adapter->tx_ring;
--- a/drivers/net/igb/igb_main.c 2009-08-31 16:17:52.451108421 -0700
+++ b/drivers/net/igb/igb_main.c 2009-08-31 16:31:36.466352379 -0700
@@ -98,9 +98,11 @@ static void igb_set_multi(struct net_dev
static void igb_update_phy_info(unsigned long);
static void igb_watchdog(unsigned long);
static void igb_watchdog_task(struct work_struct *);
-static int igb_xmit_frame_ring_adv(struct sk_buff *, struct net_device *,
- struct igb_ring *);
-static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *);
+static netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *,
+ struct net_device *,
+ struct igb_ring *);
+static netdev_tx_t igb_xmit_frame_adv(struct sk_buff *skb,
+ struct net_device *);
static struct net_device_stats *igb_get_stats(struct net_device *);
static int igb_change_mtu(struct net_device *, int);
static int igb_set_mac(struct net_device *, void *);
@@ -3295,9 +3297,9 @@ static int igb_maybe_stop_tx(struct net_
return __igb_maybe_stop_tx(netdev, tx_ring, size);
}
-static int igb_xmit_frame_ring_adv(struct sk_buff *skb,
- struct net_device *netdev,
- struct igb_ring *tx_ring)
+static netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
+ struct net_device *netdev,
+ struct igb_ring *tx_ring)
{
struct igb_adapter *adapter = netdev_priv(netdev);
unsigned int first;
@@ -3385,7 +3387,8 @@ static int igb_xmit_frame_ring_adv(struc
return NETDEV_TX_OK;
}
-static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t igb_xmit_frame_adv(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct igb_adapter *adapter = netdev_priv(netdev);
struct igb_ring *tx_ring;
@@ -3398,7 +3401,7 @@ static int igb_xmit_frame_adv(struct sk_
* to a flow. Right now, performance is impacted slightly negatively
* if using multiple tx queues. If the stack breaks away from a
* single qdisc implementation, we can look at this again. */
- return (igb_xmit_frame_ring_adv(skb, netdev, tx_ring));
+ return igb_xmit_frame_ring_adv(skb, netdev, tx_ring);
}
/**
--- a/drivers/net/igbvf/netdev.c 2009-08-31 16:17:52.431080456 -0700
+++ b/drivers/net/igbvf/netdev.c 2009-08-31 16:31:47.458359112 -0700
@@ -2204,9 +2204,9 @@ static inline void igbvf_tx_queue_adv(st
mmiowb();
}
-static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
- struct net_device *netdev,
- struct igbvf_ring *tx_ring)
+static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
+ struct net_device *netdev,
+ struct igbvf_ring *tx_ring)
{
struct igbvf_adapter *adapter = netdev_priv(netdev);
unsigned int first, tx_flags = 0;
@@ -2279,11 +2279,11 @@ static int igbvf_xmit_frame_ring_adv(str
return NETDEV_TX_OK;
}
-static int igbvf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t igbvf_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct igbvf_adapter *adapter = netdev_priv(netdev);
struct igbvf_ring *tx_ring;
- int retval;
if (test_bit(__IGBVF_DOWN, &adapter->state)) {
dev_kfree_skb_any(skb);
@@ -2292,9 +2292,7 @@ static int igbvf_xmit_frame(struct sk_bu
tx_ring = &adapter->tx_ring[0];
- retval = igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring);
-
- return retval;
+ return igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring);
}
/**
--- a/drivers/net/ixgb/ixgb_main.c 2009-08-31 16:17:52.431080456 -0700
+++ b/drivers/net/ixgb/ixgb_main.c 2009-08-31 16:31:58.474359401 -0700
@@ -81,7 +81,8 @@ static void ixgb_clean_tx_ring(struct ix
static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter);
static void ixgb_set_multi(struct net_device *netdev);
static void ixgb_watchdog(unsigned long data);
-static int ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
+static netdev_tx_t ixgb_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev);
static struct net_device_stats *ixgb_get_stats(struct net_device *netdev);
static int ixgb_change_mtu(struct net_device *netdev, int new_mtu);
static int ixgb_set_mac(struct net_device *netdev, void *p);
@@ -1442,7 +1443,7 @@ static int ixgb_maybe_stop_tx(struct net
MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 /* for context */ \
+ 1 /* one more needed for sentinel TSO workaround */
-static int
+static netdev_tx_t
ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
{
struct ixgb_adapter *adapter = netdev_priv(netdev);
--- a/drivers/net/ixgbe/ixgbe_main.c 2009-08-31 16:17:52.441081727 -0700
+++ b/drivers/net/ixgbe/ixgbe_main.c 2009-08-31 16:32:07.281106978 -0700
@@ -5107,7 +5107,8 @@ static u16 ixgbe_select_queue(struct net
return skb_tx_hash(dev, skb);
}
-static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_ring *tx_ring;
--
^ permalink raw reply
* [PATCH 17/19] appletalk: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Arnaldo Carvalho de Melo; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: appletalk.patch --]
[-- Type: text/plain, Size: 3063 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/appletalk/cops.c | 6 ++++--
drivers/net/appletalk/ipddp.c | 5 +++--
drivers/net/appletalk/ltpc.c | 4 ++--
3 files changed, 9 insertions(+), 6 deletions(-)
--- a/drivers/net/appletalk/cops.c 2009-08-31 16:17:52.391107008 -0700
+++ b/drivers/net/appletalk/cops.c 2009-08-31 16:32:13.773591856 -0700
@@ -192,7 +192,8 @@ static irqreturn_t cops_interrupt (int i
static void cops_poll (unsigned long ltdev);
static void cops_timeout(struct net_device *dev);
static void cops_rx (struct net_device *dev);
-static int cops_send_packet (struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t cops_send_packet (struct sk_buff *skb,
+ struct net_device *dev);
static void set_multicast_list (struct net_device *dev);
static int cops_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
static int cops_close (struct net_device *dev);
@@ -875,7 +876,8 @@ static void cops_timeout(struct net_devi
* Make the card transmit a LocalTalk packet.
*/
-static int cops_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t cops_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct cops_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;
--- a/drivers/net/appletalk/ipddp.c 2009-08-31 16:17:52.381081851 -0700
+++ b/drivers/net/appletalk/ipddp.c 2009-08-31 16:32:13.783628327 -0700
@@ -48,7 +48,8 @@ static int ipddp_mode = IPDDP_DECAP;
#endif
/* Index to functions, as function prototypes. */
-static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ipddp_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int ipddp_create(struct ipddp_route *new_rt);
static int ipddp_delete(struct ipddp_route *rt);
static struct ipddp_route* __ipddp_find_route(struct ipddp_route *rt);
@@ -113,7 +114,7 @@ static struct net_device * __init ipddp_
/*
* Transmit LLAP/ELAP frame using aarp_send_ddp.
*/
-static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
{
__be32 paddr = skb_rtable(skb)->rt_gateway;
struct ddpehdr *ddp;
--- a/drivers/net/appletalk/ltpc.c 2009-08-31 16:17:52.381081851 -0700
+++ b/drivers/net/appletalk/ltpc.c 2009-08-31 16:32:13.783628327 -0700
@@ -697,7 +697,7 @@ static int do_read(struct net_device *de
static struct timer_list ltpc_timer;
-static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ltpc_xmit(struct sk_buff *skb, struct net_device *dev);
static int read_30 ( struct net_device *dev)
{
@@ -895,7 +895,7 @@ static void ltpc_poll(unsigned long l)
/* DDP to LLAP translation */
-static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ltpc_xmit(struct sk_buff *skb, struct net_device *dev)
{
/* in kernel 1.3.xx, on entry skb->data points to ddp header,
* and skb->len is the length of the ddp data + ddp header
--
^ permalink raw reply
* [PATCH 13/19] uwb: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, David Vrabel; +Cc: netdev, linux-usb
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: uwb.patch --]
[-- Type: text/plain, Size: 1204 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/uwb/i1480/i1480u-wlp/i1480u-wlp.h 2009-08-29 23:56:10.080512324 -0700
+++ b/drivers/uwb/i1480/i1480u-wlp/i1480u-wlp.h 2009-08-29 23:56:28.821492880 -0700
@@ -267,7 +267,8 @@ extern void i1480u_sysfs_release(struct
/* netdev interface */
extern int i1480u_open(struct net_device *);
extern int i1480u_stop(struct net_device *);
-extern int i1480u_hard_start_xmit(struct sk_buff *, struct net_device *);
+extern netdev_tx_t i1480u_hard_start_xmit(struct sk_buff *,
+ struct net_device *);
extern void i1480u_tx_timeout(struct net_device *);
extern int i1480u_set_config(struct net_device *, struct ifmap *);
extern int i1480u_change_mtu(struct net_device *, int);
--- a/drivers/uwb/i1480/i1480u-wlp/tx.c 2009-08-29 23:54:51.001529161 -0700
+++ b/drivers/uwb/i1480/i1480u-wlp/tx.c 2009-08-29 23:55:57.929492420 -0700
@@ -503,7 +503,8 @@ out:
*
* @net_dev->xmit_lock is held
*/
-int i1480u_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
+netdev_tx_t i1480u_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *net_dev)
{
int result;
struct i1480u *i1480u = netdev_priv(net_dev);
--
^ permalink raw reply
* [PATCH 15/19] 3com: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Paul Gortmaker, Philip Blundell, Steffen Klassert
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: 3com.patch --]
[-- Type: text/plain, Size: 8336 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/3c501.c | 2 +-
drivers/net/3c501.h | 2 +-
drivers/net/3c505.c | 4 ++--
drivers/net/3c507.c | 6 ++++--
drivers/net/3c509.c | 4 ++--
drivers/net/3c515.c | 8 ++++----
drivers/net/3c523.c | 4 ++--
drivers/net/3c527.c | 6 ++++--
drivers/net/3c59x.c | 10 ++++++----
9 files changed, 26 insertions(+), 20 deletions(-)
--- a/drivers/net/3c501.c 2009-08-31 16:17:52.491216521 -0700
+++ b/drivers/net/3c501.c 2009-08-31 16:44:45.491085901 -0700
@@ -409,7 +409,7 @@ static void el_timeout(struct net_device
* no real choice.
*/
-static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;
--- a/drivers/net/3c505.c 2009-08-31 16:17:52.481106298 -0700
+++ b/drivers/net/3c505.c 2009-08-31 16:45:36.098453665 -0700
@@ -976,7 +976,7 @@ static int elp_open(struct net_device *d
*
******************************************************/
-static bool send_packet(struct net_device *dev, struct sk_buff *skb)
+static netdev_tx_t send_packet(struct net_device *dev, struct sk_buff *skb)
{
elp_device *adapter = netdev_priv(dev);
unsigned long target;
@@ -1067,7 +1067,7 @@ static void elp_timeout(struct net_devic
*
******************************************************/
-static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long flags;
elp_device *adapter = netdev_priv(dev);
--- a/drivers/net/3c507.c 2009-08-31 16:17:52.521205946 -0700
+++ b/drivers/net/3c507.c 2009-08-31 16:45:35.752869169 -0700
@@ -284,7 +284,8 @@ static unsigned short init_words[] = {
static int el16_probe1(struct net_device *dev, int ioaddr);
static int el16_open(struct net_device *dev);
-static int el16_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t el16_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t el16_interrupt(int irq, void *dev_id);
static void el16_rx(struct net_device *dev);
static int el16_close(struct net_device *dev);
@@ -509,7 +510,8 @@ static void el16_tx_timeout (struct net_
}
-static int el16_send_packet (struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t el16_send_packet (struct sk_buff *skb,
+ struct net_device *dev)
{
struct net_local *lp = netdev_priv(dev);
int ioaddr = dev->base_addr;
--- a/drivers/net/3c523.c 2009-08-31 16:17:52.521205946 -0700
+++ b/drivers/net/3c523.c 2009-08-31 16:45:15.954461272 -0700
@@ -183,7 +183,7 @@ sizeof(nop_cmd) = 8;
static irqreturn_t elmc_interrupt(int irq, void *dev_id);
static int elmc_open(struct net_device *dev);
static int elmc_close(struct net_device *dev);
-static int elmc_send_packet(struct sk_buff *, struct net_device *);
+static netdev_tx_t elmc_send_packet(struct sk_buff *, struct net_device *);
static struct net_device_stats *elmc_get_stats(struct net_device *dev);
static void elmc_timeout(struct net_device *dev);
#ifdef ELMC_MULTICAST
@@ -1129,7 +1129,7 @@ static void elmc_timeout(struct net_devi
* send frame
*/
-static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
{
int len;
int i;
--- a/drivers/net/3c527.c 2009-08-31 16:17:52.501081183 -0700
+++ b/drivers/net/3c527.c 2009-08-31 16:45:35.002458224 -0700
@@ -213,7 +213,8 @@ static int mc32_probe1(struct net_device
static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len);
static int mc32_open(struct net_device *dev);
static void mc32_timeout(struct net_device *dev);
-static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t mc32_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t mc32_interrupt(int irq, void *dev_id);
static int mc32_close(struct net_device *dev);
static struct net_device_stats *mc32_get_stats(struct net_device *dev);
@@ -1020,7 +1021,8 @@ static void mc32_timeout(struct net_devi
*
*/
-static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t mc32_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct mc32_local *lp = netdev_priv(dev);
u32 head = atomic_read(&lp->tx_ring_head);
--- a/drivers/net/3c59x.c 2009-08-31 16:17:52.501081183 -0700
+++ b/drivers/net/3c59x.c 2009-08-31 16:45:32.061107786 -0700
@@ -716,8 +716,10 @@ static int mdio_read(struct net_device *
static void mdio_write(struct net_device *vp, int phy_id, int location, int value);
static void vortex_timer(unsigned long arg);
static void rx_oom_timer(unsigned long arg);
-static int vortex_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t vortex_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+static netdev_tx_t boomerang_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int vortex_rx(struct net_device *dev);
static int boomerang_rx(struct net_device *dev);
static irqreturn_t vortex_interrupt(int irq, void *dev_id);
@@ -2035,7 +2037,7 @@ vortex_error(struct net_device *dev, int
}
}
-static int
+static netdev_tx_t
vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct vortex_private *vp = netdev_priv(dev);
@@ -2090,7 +2092,7 @@ vortex_start_xmit(struct sk_buff *skb, s
return NETDEV_TX_OK;
}
-static int
+static netdev_tx_t
boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct vortex_private *vp = netdev_priv(dev);
--- a/drivers/net/3c501.h 2009-08-31 16:17:52.501081183 -0700
+++ b/drivers/net/3c501.h 2009-08-31 16:45:36.451937066 -0700
@@ -6,7 +6,7 @@
static int el1_probe1(struct net_device *dev, int ioaddr);
static int el_open(struct net_device *dev);
static void el_timeout(struct net_device *dev);
-static int el_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t el_interrupt(int irq, void *dev_id);
static void el_receive(struct net_device *dev);
static void el_reset(struct net_device *dev);
--- a/drivers/net/3c509.c 2009-08-31 16:17:52.491216521 -0700
+++ b/drivers/net/3c509.c 2009-08-31 16:45:05.081129325 -0700
@@ -191,7 +191,7 @@ static void el3_common_remove(struct net
static ushort id_read_eeprom(int index);
static ushort read_eeprom(int ioaddr, int index);
static int el3_open(struct net_device *dev);
-static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t el3_interrupt(int irq, void *dev_id);
static void update_stats(struct net_device *dev);
static struct net_device_stats *el3_get_stats(struct net_device *dev);
@@ -816,7 +816,7 @@ el3_tx_timeout (struct net_device *dev)
}
-static int
+static netdev_tx_t
el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct el3_private *lp = netdev_priv(dev);
--- a/drivers/net/3c515.c 2009-08-31 16:17:52.511105850 -0700
+++ b/drivers/net/3c515.c 2009-08-31 16:45:35.411085925 -0700
@@ -369,8 +369,8 @@ static int corkscrew_setup(struct net_de
struct pnp_dev *idev, int card_number);
static int corkscrew_open(struct net_device *dev);
static void corkscrew_timer(unsigned long arg);
-static int corkscrew_start_xmit(struct sk_buff *skb,
- struct net_device *dev);
+static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int corkscrew_rx(struct net_device *dev);
static void corkscrew_timeout(struct net_device *dev);
static int boomerang_rx(struct net_device *dev);
@@ -998,8 +998,8 @@ static void corkscrew_timeout(struct net
netif_wake_queue(dev);
}
-static int corkscrew_start_xmit(struct sk_buff *skb,
- struct net_device *dev)
+static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct corkscrew_private *vp = netdev_priv(dev);
int ioaddr = dev->base_addr;
--
^ permalink raw reply
* [PATCH 03/19] convert ATM drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Chas Williams; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: atm-tx.patch --]
[-- Type: text/plain, Size: 3095 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/atm/br2684.c | 3 ++-
net/atm/clip.c | 3 ++-
net/atm/lec.c | 6 ++++--
net/atm/mpc.c | 6 ++++--
4 files changed, 12 insertions(+), 6 deletions(-)
--- a/net/atm/br2684.c 2009-08-31 16:17:53.441108407 -0700
+++ b/net/atm/br2684.c 2009-08-31 16:24:25.021124362 -0700
@@ -223,7 +223,8 @@ static inline struct br2684_vcc *pick_ou
return list_empty(&brdev->brvccs) ? NULL : list_entry_brvcc(brdev->brvccs.next); /* 1 vcc/dev right now */
}
-static int br2684_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t br2684_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct br2684_dev *brdev = BRPRIV(dev);
struct br2684_vcc *brvcc;
--- a/net/atm/clip.c 2009-08-31 16:17:53.421109008 -0700
+++ b/net/atm/clip.c 2009-08-31 16:25:00.891106292 -0700
@@ -360,7 +360,8 @@ static int clip_encap(struct atm_vcc *vc
return 0;
}
-static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct clip_priv *clip_priv = PRIV(dev);
struct atmarp_entry *entry;
--- a/net/atm/lec.c 2009-08-31 16:17:53.421109008 -0700
+++ b/net/atm/lec.c 2009-08-31 16:24:47.171086012 -0700
@@ -59,7 +59,8 @@ static unsigned char bridge_ula_lec[] =
*/
static int lec_open(struct net_device *dev);
-static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int lec_close(struct net_device *dev);
static void lec_init(struct net_device *dev);
static struct lec_arp_table *lec_arp_find(struct lec_priv *priv,
@@ -247,7 +248,8 @@ static void lec_tx_timeout(struct net_de
netif_wake_queue(dev);
}
-static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct sk_buff *skb2;
struct lec_priv *priv = netdev_priv(dev);
--- a/net/atm/mpc.c 2009-08-31 16:17:53.431133326 -0700
+++ b/net/atm/mpc.c 2009-08-31 16:23:53.813602657 -0700
@@ -73,7 +73,8 @@ static void mpoad_close(struct atm_vcc *
static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb);
static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb);
-static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t mpc_send_packet(struct sk_buff *skb,
+ struct net_device *dev);
static int mpoa_event_listener(struct notifier_block *mpoa_notifier, unsigned long event, void *dev);
static void mpc_timer_refresh(void);
static void mpc_cache_check( unsigned long checking_time );
@@ -528,7 +529,8 @@ static int send_via_shortcut(struct sk_b
/*
* Probably needs some error checks and locking, not sure...
*/
-static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t mpc_send_packet(struct sk_buff *skb,
+ struct net_device *dev)
{
struct mpoa_client *mpc;
struct ethhdr *eth;
--
^ permalink raw reply
* [PATCH 10/19] netdev: convert pcmcia drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-pcmcia
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: pcmcia-tx.patch --]
[-- Type: text/plain, Size: 7614 bytes --]
Update all the pcmcia network drivers for netdev_tx_t.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/pcmcia/3c574_cs.c | 6 ++++--
drivers/net/pcmcia/3c589_cs.c | 6 ++++--
drivers/net/pcmcia/axnet_cs.c | 6 ++++--
drivers/net/pcmcia/fmvj18x_cs.c | 6 ++++--
drivers/net/pcmcia/nmclan_cs.c | 6 ++++--
drivers/net/pcmcia/smc91c92_cs.c | 6 ++++--
drivers/net/pcmcia/xirc2ps_cs.c | 5 +++--
7 files changed, 27 insertions(+), 14 deletions(-)
--- a/drivers/net/pcmcia/3c574_cs.c 2009-08-31 16:17:52.881112862 -0700
+++ b/drivers/net/pcmcia/3c574_cs.c 2009-08-31 16:27:06.721110183 -0700
@@ -239,7 +239,8 @@ static void tc574_wait_for_completion(st
static void tc574_reset(struct net_device *dev);
static void media_check(unsigned long arg);
static int el3_open(struct net_device *dev);
-static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t el3_interrupt(int irq, void *dev_id);
static void update_stats(struct net_device *dev);
static struct net_device_stats *el3_get_stats(struct net_device *dev);
@@ -778,7 +779,8 @@ static void pop_tx_status(struct net_dev
}
}
-static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
unsigned int ioaddr = dev->base_addr;
struct el3_private *lp = netdev_priv(dev);
--- a/drivers/net/pcmcia/3c589_cs.c 2009-08-31 16:17:52.891086127 -0700
+++ b/drivers/net/pcmcia/3c589_cs.c 2009-08-31 16:27:06.721110183 -0700
@@ -149,7 +149,8 @@ static void tc589_reset(struct net_devic
static void media_check(unsigned long arg);
static int el3_config(struct net_device *dev, struct ifmap *map);
static int el3_open(struct net_device *dev);
-static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t el3_interrupt(int irq, void *dev_id);
static void update_stats(struct net_device *dev);
static struct net_device_stats *el3_get_stats(struct net_device *dev);
@@ -604,7 +605,8 @@ static void pop_tx_status(struct net_dev
}
}
-static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
unsigned int ioaddr = dev->base_addr;
struct el3_private *priv = netdev_priv(dev);
--- a/drivers/net/pcmcia/axnet_cs.c 2009-08-31 16:17:52.901106674 -0700
+++ b/drivers/net/pcmcia/axnet_cs.c 2009-08-31 16:27:06.721110183 -0700
@@ -92,7 +92,8 @@ static void axnet_release(struct pcmcia_
static int axnet_open(struct net_device *dev);
static int axnet_close(struct net_device *dev);
static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static struct net_device_stats *get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static void axnet_tx_timeout(struct net_device *dev);
@@ -1063,7 +1064,8 @@ static void axnet_tx_timeout(struct net_
* Sends a packet to an 8390 network device.
*/
-static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
long e8390_base = dev->base_addr;
struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
--- a/drivers/net/pcmcia/nmclan_cs.c 2009-08-31 16:17:52.921089522 -0700
+++ b/drivers/net/pcmcia/nmclan_cs.c 2009-08-31 16:27:06.721110183 -0700
@@ -424,7 +424,8 @@ static void nmclan_reset(struct net_devi
static int mace_config(struct net_device *dev, struct ifmap *map);
static int mace_open(struct net_device *dev);
static int mace_close(struct net_device *dev);
-static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t mace_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static void mace_tx_timeout(struct net_device *dev);
static irqreturn_t mace_interrupt(int irq, void *dev_id);
static struct net_device_stats *mace_get_stats(struct net_device *dev);
@@ -937,7 +938,8 @@ static void mace_tx_timeout(struct net_d
netif_wake_queue(dev);
}
-static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t mace_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
mace_private *lp = netdev_priv(dev);
unsigned int ioaddr = dev->base_addr;
--- a/drivers/net/pcmcia/smc91c92_cs.c 2009-08-31 16:17:52.871089451 -0700
+++ b/drivers/net/pcmcia/smc91c92_cs.c 2009-08-31 16:27:06.731081353 -0700
@@ -288,7 +288,8 @@ static int smc_open(struct net_device *d
static int smc_close(struct net_device *dev);
static int smc_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void smc_tx_timeout(struct net_device *dev);
-static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t smc_interrupt(int irq, void *dev_id);
static void smc_rx(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
@@ -1370,7 +1371,8 @@ static void smc_tx_timeout(struct net_de
netif_wake_queue(dev);
}
-static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smc_private *smc = netdev_priv(dev);
unsigned int ioaddr = dev->base_addr;
--- a/drivers/net/pcmcia/xirc2ps_cs.c 2009-08-31 16:17:52.881112862 -0700
+++ b/drivers/net/pcmcia/xirc2ps_cs.c 2009-08-31 16:27:06.731081353 -0700
@@ -352,7 +352,8 @@ typedef struct local_info_t {
/****************
* Some more prototypes
*/
-static int do_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t do_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static void xirc_tx_timeout(struct net_device *dev);
static void xirc2ps_tx_timeout_task(struct work_struct *work);
static void set_addresses(struct net_device *dev);
@@ -1361,7 +1362,7 @@ xirc_tx_timeout(struct net_device *dev)
schedule_work(&lp->tx_timeout_task);
}
-static int
+static netdev_tx_t
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
local_info_t *lp = netdev_priv(dev);
--- a/drivers/net/pcmcia/fmvj18x_cs.c 2009-08-31 16:17:52.891086127 -0700
+++ b/drivers/net/pcmcia/fmvj18x_cs.c 2009-08-31 16:27:06.731081353 -0700
@@ -96,7 +96,8 @@ static void fmvj18x_detach(struct pcmcia
static int fjn_config(struct net_device *dev, struct ifmap *map);
static int fjn_open(struct net_device *dev);
static int fjn_close(struct net_device *dev);
-static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t fjn_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t fjn_interrupt(int irq, void *dev_id);
static void fjn_rx(struct net_device *dev);
static void fjn_reset(struct net_device *dev);
@@ -856,7 +857,8 @@ static void fjn_tx_timeout(struct net_de
netif_wake_queue(dev);
}
-static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t fjn_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct local_info_t *lp = netdev_priv(dev);
unsigned int ioaddr = dev->base_addr;
--
^ permalink raw reply
* [PATCH 11/19] irda: convert to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller, Samuel Ortiz; +Cc: netdev
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: irda-tx.patch --]
[-- Type: text/plain, Size: 15795 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/irda/ali-ircc.c | 12 ++++++++----
drivers/net/irda/donauboe.c | 2 +-
drivers/net/irda/irda-usb.c | 6 ++++--
drivers/net/irda/kingsun-sir.c | 5 +++--
drivers/net/irda/ks959-sir.c | 3 ++-
drivers/net/irda/ksdazzle-sir.c | 3 ++-
drivers/net/irda/mcs7780.c | 3 ++-
drivers/net/irda/mcs7780.h | 3 ++-
drivers/net/irda/nsc-ircc.c | 12 ++++++++----
drivers/net/irda/sir_dev.c | 3 ++-
drivers/net/irda/smsc-ircc2.c | 15 ++++++++++-----
drivers/net/irda/stir4200.c | 3 ++-
drivers/net/irda/via-ircc.c | 16 ++++++++--------
drivers/net/irda/vlsi_ir.c | 3 ++-
drivers/net/irda/w83977af_ir.c | 6 ++++--
net/irda/irlan/irlan_eth.c | 6 ++++--
16 files changed, 64 insertions(+), 37 deletions(-)
--- a/drivers/net/irda/ali-ircc.c 2009-08-31 16:17:52.801108556 -0700
+++ b/drivers/net/irda/ali-ircc.c 2009-08-31 16:27:10.043581476 -0700
@@ -111,7 +111,8 @@ static int ali_ircc_net_ioctl(struct ne
static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud);
/* SIR function */
-static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self);
static void ali_ircc_sir_receive(struct ali_ircc_cb *self);
static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self);
@@ -119,7 +120,8 @@ static int ali_ircc_sir_write(int iobas
static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed);
/* FIR function */
-static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 speed);
static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self);
static int ali_ircc_dma_receive(struct ali_ircc_cb *self);
@@ -1435,7 +1437,8 @@ static int ali_ircc_net_close(struct net
* Transmit the frame
*
*/
-static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ali_ircc_cb *self;
unsigned long flags;
@@ -1957,7 +1960,8 @@ static int ali_ircc_dma_receive_complet
* Transmit the frame!
*
*/
-static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct ali_ircc_cb *self;
unsigned long flags;
--- a/drivers/net/irda/irda-usb.c 2009-08-31 16:17:52.791092269 -0700
+++ b/drivers/net/irda/irda-usb.c 2009-08-31 16:27:10.043581476 -0700
@@ -111,7 +111,8 @@ static void irda_usb_init_qos(struct ird
static struct irda_class_desc *irda_usb_find_class_desc(struct usb_interface *intf);
static void irda_usb_disconnect(struct usb_interface *intf);
static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self);
-static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int irda_usb_open(struct irda_usb_cb *self);
static void irda_usb_close(struct irda_usb_cb *self);
static void speed_bulk_callback(struct urb *urb);
@@ -381,7 +382,8 @@ static void speed_bulk_callback(struct u
/*
* Send an IrDA frame to the USB dongle (for transmission)
*/
-static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct irda_usb_cb *self = netdev_priv(netdev);
struct urb *urb = self->tx_urb;
--- a/drivers/net/irda/kingsun-sir.c 2009-08-31 16:17:52.811133713 -0700
+++ b/drivers/net/irda/kingsun-sir.c 2009-08-31 16:27:10.043581476 -0700
@@ -150,7 +150,8 @@ static void kingsun_send_irq(struct urb
/*
* Called from net/core when new frame is available.
*/
-static int kingsun_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t kingsun_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct kingsun_cb *kingsun;
int wraplen;
@@ -416,7 +417,7 @@ static int kingsun_net_ioctl(struct net_
}
static const struct net_device_ops kingsun_ops = {
- .ndo_start_xmit = kingsun_hard_xmit,
+ .ndo_start_xmit = kingsun_hard_xmit,
.ndo_open = kingsun_net_open,
.ndo_stop = kingsun_net_close,
.ndo_do_ioctl = kingsun_net_ioctl,
--- a/drivers/net/irda/ks959-sir.c 2009-08-31 16:17:52.841087172 -0700
+++ b/drivers/net/irda/ks959-sir.c 2009-08-31 16:27:10.043581476 -0700
@@ -385,7 +385,8 @@ static void ks959_send_irq(struct urb *u
/*
* Called from net/core when new frame is available.
*/
-static int ks959_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ks959_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct ks959_cb *kingsun;
unsigned int wraplen;
--- a/drivers/net/irda/ksdazzle-sir.c 2009-08-31 16:17:52.791092269 -0700
+++ b/drivers/net/irda/ksdazzle-sir.c 2009-08-31 16:27:10.043581476 -0700
@@ -298,7 +298,8 @@ static void ksdazzle_send_irq(struct urb
/*
* Called from net/core when new frame is available.
*/
-static int ksdazzle_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ksdazzle_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct ksdazzle_cb *kingsun;
unsigned int wraplen;
--- a/drivers/net/irda/mcs7780.c 2009-08-31 16:17:52.851102203 -0700
+++ b/drivers/net/irda/mcs7780.c 2009-08-31 16:27:10.043581476 -0700
@@ -817,7 +817,8 @@ static void mcs_send_irq(struct urb *urb
}
/* Transmit callback funtion. */
-static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb,
+ struct net_device *ndev)
{
unsigned long flags;
struct mcs_cb *mcs;
--- a/drivers/net/irda/nsc-ircc.c 2009-08-31 16:17:52.781143518 -0700
+++ b/drivers/net/irda/nsc-ircc.c 2009-08-31 16:27:10.053607959 -0700
@@ -173,8 +173,10 @@ static int nsc_ircc_setup(chipio_t *inf
static void nsc_ircc_pio_receive(struct nsc_ircc_cb *self);
static int nsc_ircc_dma_receive(struct nsc_ircc_cb *self);
static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase);
-static int nsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev);
-static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t nsc_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev);
+static netdev_tx_t nsc_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev);
static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
static void nsc_ircc_dma_xmit(struct nsc_ircc_cb *self, int iobase);
static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 baud);
@@ -1355,7 +1357,8 @@ static __u8 nsc_ircc_change_speed(struct
* Transmit the frame!
*
*/
-static int nsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t nsc_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct nsc_ircc_cb *self;
unsigned long flags;
@@ -1427,7 +1430,8 @@ static int nsc_ircc_hard_xmit_sir(struct
return NETDEV_TX_OK;
}
-static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t nsc_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct nsc_ircc_cb *self;
unsigned long flags;
--- a/drivers/net/irda/sir_dev.c 2009-08-31 16:17:52.821112356 -0700
+++ b/drivers/net/irda/sir_dev.c 2009-08-31 16:27:10.053607959 -0700
@@ -582,7 +582,8 @@ EXPORT_SYMBOL(sirdev_receive);
/* callbacks from network layer */
-static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
+ struct net_device *ndev)
{
struct sir_dev *dev = netdev_priv(ndev);
unsigned long flags;
--- a/drivers/net/irda/smsc-ircc2.c 2009-08-31 16:17:52.771108095 -0700
+++ b/drivers/net/irda/smsc-ircc2.c 2009-08-31 16:27:10.053607959 -0700
@@ -194,8 +194,10 @@ static int __exit smsc_ircc_close(struct
static int smsc_ircc_dma_receive(struct smsc_ircc_cb *self);
static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self);
static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self);
-static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev);
-static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t smsc_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev);
+static netdev_tx_t smsc_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev);
static void smsc_ircc_dma_xmit(struct smsc_ircc_cb *self, int bofs);
static void smsc_ircc_dma_xmit_complete(struct smsc_ircc_cb *self);
static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed);
@@ -486,7 +488,8 @@ static int __init smsc_ircc_init(void)
return ret;
}
-static int smsc_ircc_net_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smsc_ircc_net_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smsc_ircc_cb *self = netdev_priv(dev);
@@ -878,7 +881,8 @@ static void smsc_ircc_timeout(struct net
* waits until the next transmit interrupt, and continues until the
* frame is transmitted.
*/
-static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smsc_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smsc_ircc_cb *self;
unsigned long flags;
@@ -1183,7 +1187,8 @@ static void smsc_ircc_set_sir_speed(stru
* Transmit the frame!
*
*/
-static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t smsc_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct smsc_ircc_cb *self;
unsigned long flags;
--- a/drivers/net/irda/stir4200.c 2009-08-31 16:17:52.841087172 -0700
+++ b/drivers/net/irda/stir4200.c 2009-08-31 16:27:10.053607959 -0700
@@ -560,7 +560,8 @@ static int change_speed(struct stir_cb *
/*
* Called from net/core when new frame is available.
*/
-static int stir_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t stir_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
{
struct stir_cb *stir = netdev_priv(netdev);
--- a/drivers/net/irda/via-ircc.c 2009-08-31 16:17:52.831086390 -0700
+++ b/drivers/net/irda/via-ircc.c 2009-08-31 16:27:10.053607959 -0700
@@ -87,10 +87,10 @@ static int via_ircc_close(struct via_irc
static int via_ircc_dma_receive(struct via_ircc_cb *self);
static int via_ircc_dma_receive_complete(struct via_ircc_cb *self,
int iobase);
-static int via_ircc_hard_xmit_sir(struct sk_buff *skb,
- struct net_device *dev);
-static int via_ircc_hard_xmit_fir(struct sk_buff *skb,
- struct net_device *dev);
+static netdev_tx_t via_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev);
+static netdev_tx_t via_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev);
static void via_hw_init(struct via_ircc_cb *self);
static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 baud);
static irqreturn_t via_ircc_interrupt(int irq, void *dev_id);
@@ -823,8 +823,8 @@ static void via_ircc_change_speed(struct
* Transmit the frame!
*
*/
-static int via_ircc_hard_xmit_sir(struct sk_buff *skb,
- struct net_device *dev)
+static netdev_tx_t via_ircc_hard_xmit_sir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct via_ircc_cb *self;
unsigned long flags;
@@ -895,8 +895,8 @@ static int via_ircc_hard_xmit_sir(struct
return NETDEV_TX_OK;
}
-static int via_ircc_hard_xmit_fir(struct sk_buff *skb,
- struct net_device *dev)
+static netdev_tx_t via_ircc_hard_xmit_fir(struct sk_buff *skb,
+ struct net_device *dev)
{
struct via_ircc_cb *self;
u16 iobase;
--- a/drivers/net/irda/vlsi_ir.c 2009-08-31 16:17:52.811133713 -0700
+++ b/drivers/net/irda/vlsi_ir.c 2009-08-31 16:27:10.053607959 -0700
@@ -854,7 +854,8 @@ static int vlsi_set_baud(vlsi_irda_dev_t
return ret;
}
-static int vlsi_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *ndev)
{
vlsi_irda_dev_t *idev = netdev_priv(ndev);
struct vlsi_ring *r = idev->tx_ring;
--- a/drivers/net/irda/w83977af_ir.c 2009-08-31 16:17:52.831086390 -0700
+++ b/drivers/net/irda/w83977af_ir.c 2009-08-31 16:27:10.053607959 -0700
@@ -93,7 +93,8 @@ static int w83977af_close(struct w83977
static int w83977af_probe(int iobase, int irq, int dma);
static int w83977af_dma_receive(struct w83977af_ir *self);
static int w83977af_dma_receive_complete(struct w83977af_ir *self);
-static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
static void w83977af_dma_write(struct w83977af_ir *self, int iobase);
static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed);
@@ -490,7 +491,8 @@ static void w83977af_change_speed(struct
* Sets up a DMA transfer to send the current frame.
*
*/
-static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct w83977af_ir *self;
__s32 speed;
--- a/net/irda/irlan/irlan_eth.c 2009-08-31 16:17:52.771108095 -0700
+++ b/net/irda/irlan/irlan_eth.c 2009-08-31 16:27:10.053607959 -0700
@@ -41,7 +41,8 @@
static int irlan_eth_open(struct net_device *dev);
static int irlan_eth_close(struct net_device *dev);
-static int irlan_eth_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static void irlan_eth_set_multicast_list( struct net_device *dev);
static struct net_device_stats *irlan_eth_get_stats(struct net_device *dev);
@@ -162,7 +163,8 @@ static int irlan_eth_close(struct net_de
* Transmits ethernet frames over IrDA link.
*
*/
-static int irlan_eth_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct irlan_cb *self = netdev_priv(dev);
int ret;
--- a/drivers/net/irda/mcs7780.h 2009-08-31 16:17:52.801108556 -0700
+++ b/drivers/net/irda/mcs7780.h 2009-08-31 16:27:10.053607959 -0700
@@ -156,7 +156,8 @@ static int mcs_net_open(struct net_devic
static void mcs_receive_irq(struct urb *urb);
static void mcs_send_irq(struct urb *urb);
-static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *netdev);
+static netdev_tx_t mcs_hard_xmit(struct sk_buff *skb,
+ struct net_device *netdev);
static int mcs_probe(struct usb_interface *intf,
const struct usb_device_id *id);
--- a/drivers/net/irda/donauboe.c 2009-08-31 16:17:52.781143518 -0700
+++ b/drivers/net/irda/donauboe.c 2009-08-31 16:27:10.053607959 -0700
@@ -970,7 +970,7 @@ toshoboe_probe (struct toshoboe_cb *self
/* Netdev style code */
/* Transmit something */
-static int
+static netdev_tx_t
toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
{
struct toshoboe_cb *self;
--
^ permalink raw reply
* [PATCH 14/19] tulip: convert drivers to netdev_tx_t
From: Stephen Hemminger @ 2009-09-01 5:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Grant Grundler, Kyle McMartin
In-Reply-To: <20090901055039.824876937@vyatta.com>
[-- Attachment #1: tulip.patch --]
[-- Type: text/plain, Size: 7149 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/tulip/de2104x.c | 3 ++-
drivers/net/tulip/de4x5.c | 11 +++++------
drivers/net/tulip/dmfe.c | 5 +++--
drivers/net/tulip/tulip_core.c | 5 +++--
drivers/net/tulip/uli526x.c | 6 ++++--
drivers/net/tulip/winbond-840.c | 4 ++--
drivers/net/tulip/xircom_cb.c | 6 ++++--
7 files changed, 23 insertions(+), 17 deletions(-)
--- a/drivers/net/tulip/de2104x.c 2009-08-29 23:10:19.609527457 -0700
+++ b/drivers/net/tulip/de2104x.c 2009-08-29 23:12:54.117527675 -0700
@@ -599,7 +599,8 @@ next:
netif_wake_queue(de->dev);
}
-static int de_start_xmit (struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t de_start_xmit (struct sk_buff *skb,
+ struct net_device *dev)
{
struct de_private *de = netdev_priv(dev);
unsigned int entry, tx_free;
--- a/drivers/net/tulip/de4x5.c 2009-08-29 23:10:19.553491700 -0700
+++ b/drivers/net/tulip/de4x5.c 2009-08-29 23:12:54.125526807 -0700
@@ -895,7 +895,8 @@ static struct {
** Public Functions
*/
static int de4x5_open(struct net_device *dev);
-static int de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t de4x5_queue_pkt(struct sk_buff *skb,
+ struct net_device *dev);
static irqreturn_t de4x5_interrupt(int irq, void *dev_id);
static int de4x5_close(struct net_device *dev);
static struct net_device_stats *de4x5_get_stats(struct net_device *dev);
@@ -1456,18 +1457,16 @@ de4x5_sw_reset(struct net_device *dev)
/*
** Writes a socket buffer address to the next available transmit descriptor.
*/
-static int
+static netdev_tx_t
de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
{
struct de4x5_private *lp = netdev_priv(dev);
u_long iobase = dev->base_addr;
- int status = NETDEV_TX_OK;
u_long flags = 0;
netif_stop_queue(dev);
- if (!lp->tx_enable) { /* Cannot send for now */
+ if (!lp->tx_enable) /* Cannot send for now */
return NETDEV_TX_LOCKED;
- }
/*
** Clean out the TX ring asynchronously to interrupts - sometimes the
@@ -1521,7 +1520,7 @@ de4x5_queue_pkt(struct sk_buff *skb, str
lp->cache.lock = 0;
- return status;
+ return NETDEV_TX_OK;
}
/*
--- a/drivers/net/tulip/dmfe.c 2009-08-29 23:10:19.521492310 -0700
+++ b/drivers/net/tulip/dmfe.c 2009-08-29 23:12:54.129527736 -0700
@@ -311,7 +311,7 @@ static u8 SF_mode; /* Special Function:
/* function declaration ------------------------------------- */
static int dmfe_open(struct DEVICE *);
-static int dmfe_start_xmit(struct sk_buff *, struct DEVICE *);
+static netdev_tx_t dmfe_start_xmit(struct sk_buff *, struct DEVICE *);
static int dmfe_stop(struct DEVICE *);
static void dmfe_set_filter_mode(struct DEVICE *);
static const struct ethtool_ops netdev_ethtool_ops;
@@ -661,7 +661,8 @@ static void dmfe_init_dm910x(struct DEVI
* Send a packet to media from the upper layer.
*/
-static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
+static netdev_tx_t dmfe_start_xmit(struct sk_buff *skb,
+ struct DEVICE *dev)
{
struct dmfe_board_info *db = netdev_priv(dev);
struct tx_desc *txptr;
--- a/drivers/net/tulip/tulip_core.c 2009-08-29 23:10:19.589491808 -0700
+++ b/drivers/net/tulip/tulip_core.c 2009-08-29 23:12:54.129527736 -0700
@@ -256,7 +256,8 @@ const char tulip_media_cap[32] =
static void tulip_tx_timeout(struct net_device *dev);
static void tulip_init_ring(struct net_device *dev);
static void tulip_free_ring(struct net_device *dev);
-static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t tulip_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int tulip_open(struct net_device *dev);
static int tulip_close(struct net_device *dev);
static void tulip_up(struct net_device *dev);
@@ -645,7 +646,7 @@ static void tulip_init_ring(struct net_d
tp->tx_ring[i-1].buffer2 = cpu_to_le32(tp->tx_ring_dma);
}
-static int
+static netdev_tx_t
tulip_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct tulip_private *tp = netdev_priv(dev);
--- a/drivers/net/tulip/uli526x.c 2009-08-29 23:10:19.637530461 -0700
+++ b/drivers/net/tulip/uli526x.c 2009-08-29 23:12:54.133492067 -0700
@@ -215,7 +215,8 @@ static int mode = 8;
/* function declaration ------------------------------------- */
static int uli526x_open(struct net_device *);
-static int uli526x_start_xmit(struct sk_buff *, struct net_device *);
+static netdev_tx_t uli526x_start_xmit(struct sk_buff *,
+ struct net_device *);
static int uli526x_stop(struct net_device *);
static void uli526x_set_filter_mode(struct net_device *);
static const struct ethtool_ops netdev_ethtool_ops;
@@ -567,7 +568,8 @@ static void uli526x_init(struct net_devi
* Send a packet to media from the upper layer.
*/
-static int uli526x_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct uli526x_board_info *db = netdev_priv(dev);
struct tx_desc *txptr;
--- a/drivers/net/tulip/winbond-840.c 2009-08-29 23:10:19.537492110 -0700
+++ b/drivers/net/tulip/winbond-840.c 2009-08-29 23:12:54.133492067 -0700
@@ -333,7 +333,7 @@ static void init_registers(struct net_de
static void tx_timeout(struct net_device *dev);
static int alloc_ringdesc(struct net_device *dev);
static void free_ringdesc(struct netdev_private *np);
-static int start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
static void netdev_error(struct net_device *dev, int intr_status);
static int netdev_rx(struct net_device *dev);
@@ -997,7 +997,7 @@ static void free_ringdesc(struct netdev_
}
-static int start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
unsigned entry;
--- a/drivers/net/tulip/xircom_cb.c 2009-08-29 23:10:19.505491812 -0700
+++ b/drivers/net/tulip/xircom_cb.c 2009-08-29 23:12:54.137512691 -0700
@@ -113,7 +113,8 @@ struct xircom_private {
static int xircom_probe(struct pci_dev *pdev, const struct pci_device_id *id);
static void xircom_remove(struct pci_dev *pdev);
static irqreturn_t xircom_interrupt(int irq, void *dev_instance);
-static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t xircom_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
static int xircom_open(struct net_device *dev);
static int xircom_close(struct net_device *dev);
static void xircom_up(struct xircom_private *card);
@@ -384,7 +385,8 @@ static irqreturn_t xircom_interrupt(int
return IRQ_HANDLED;
}
-static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t xircom_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct xircom_private *card;
unsigned long flags;
--
^ permalink raw reply
* Re: UDP is bypassing qdisc statistics ....
From: Jarek Poplawski @ 2009-09-01 6:37 UTC (permalink / raw)
To: Mark Smith; +Cc: Eric Dumazet, Christoph Lameter, netdev, davem
In-Reply-To: <20090901062840.f1c25757.lk-netdev@lk-netdev.nosense.org>
On 31-08-2009 22:58, Mark Smith wrote:
> On Mon, 31 Aug 2009 21:54:49 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>> Christoph Lameter a écrit :
>>> This is with 2.6.31-rc7. If I send icmp then its correctly registered as a
>>> packet by the qdisc layer:
>>>
> <snip>
>> loopback device do bypass qdisc layer for example...
>
> On occassion, I'd have found it useful if it didn't. It'd be convenient
> to test out your qdisc config, or test out applications performance
> behaviour over a simulated WAN via netem, without having to a
> network and two hosts, and all the related miscellaneous setup work.
Probably Eric and you mean something special, but generally a loopback
and some other virtuals bypass qdisc layer only with default qdisc.
Jarek P.
^ permalink raw reply
* Re: neighbour table RCU
From: Eric Dumazet @ 2009-09-01 6:50 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20090831150453.3437a65c@nehalam>
Stephen Hemminger a écrit :
> Looking at the neighbour table, it should be possible to get
> rid of the two reader/writer locks. The hash table lock is pretty
> amenable to RCU, but the dynamic resizing makes it non-trivial.
> Thinking of using a combination of RCU and sequence counts so that the
> reader would just rescan if resize was in progress.
I am not sure neigh_tbl_lock rwlock should be changed, I did not
see any contention on it.
>
> The reader/writer lock on the neighbour entry is more of a problem.
> Probably would be simpler/faster to change it into a spinlock and
> be done with it.
>
> The reader/writer lock is also used for the proxy list hash table,
> but that can just be a simple spinlock.
>
This is probably is the only thing we want to do at this moment,
halving atomic ops on neigh_resolve_output()
But why neigh_resolve_output() was called so much in the bench
is the question...
^ permalink raw reply
* [RFC] Virtual Machine Device Queues(VMDq) support on KVM
From: Xin, Xiaohui @ 2009-09-01 6:58 UTC (permalink / raw)
To: mst@redhat.com, netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org, "kvm@vger
[RFC] Virtual Machine Device Queues (VMDq) support on KVM
Network adapter with VMDq technology presents multiple pairs of tx/rx queues,
and renders network L2 sorting mechanism based on MAC addresses and VLAN tags
for each tx/rx queue pair. Here we present a generic framework, in which network
traffic to/from a tx/rx queue pair can be directed from/to a KVM guest without
any software copy.
Actually this framework can apply to traditional network adapters which have
just one tx/rx queue pair. And applications using the same user/kernel interface
can utilize this framework to send/receive network traffic directly thru a tx/rx
queue pair in a network adapter.
We use virtio-net architecture to illustrate the framework.
|--------------------| pop add_buf |----------------|
| Qemu process | <--------- TX <---------- | Guest Kernel |
| | ---------> ----------> | |
| Virtio-net | push get_buf | |
| (Backend service) | ---------> RX ----------> | Virtio-net |
| | <--------- <---------- | driver |
| | push get_buf | |
|--------------------| |----------------|
|
|
| AIO (read & write) combined with Direct I/O
| (which substitute synced file operations)
|-----------------------------------------------------------------------|
| Host kernel | read: copy-less with directly mapped user |
| | space to kernel, payload directly DMAed |
| | into user space |
| | write: copy-less with directly mapped user |
| | space to kernel, payload directly hooked |
| | to a skb |
| | |
| (a likely | |
| queue pair | |
| instance) | |
| | | |
| NIC driver <--> TUN/TAP driver |
|-----------------------------------------------------------------------|
|
|
traditional adapter or a tx/rx queue pair
The basic idea is to utilize the kernel Asynchronous I/O combined with Direct
I/O to implements copy-less TUN/TAP device. AIO and Direct I/O is not new to
kernel, we still can see it in SCSI tape driver.
With traditional file operations, a copying of payload contents from/to the
kernel DMA address to/from a user buffer is needed. That's what the copying we
want to save.
The proposed framework is like this:
A TUN/TAP device is bound to a traditional NIC adapter or a tx/rx queue pair in
host side. KVM virto-net Backend service, the user space program submits
asynchronous read/write I/O requests to the host kernel through TUN/TAP device.
The requests are corresponding to the vqueue elements include both transmission
& receive. They can be queued in one AIO request and later, the completion will
be notified through the underlying packets tx/rx processing of the rx/tx queue
pair.
Detailed path:
To guest Virtio-net driver, packets receive corresponding to asynchronous read
I/O requests of Backend service.
1) Guest Virtio-net driver provides header and payload address through the
receive vqueue to Virtio-net backend service.
2) Virtio-net backend service encapsulates multiple vqueue elements into
multiple AIO control blocks and composes them into one AIO read request.
3) Virtio-net backend service uses io_submit() syscall to pass the request to
the TUN/TAP device.
4) Virtio-net backend service uses io_getevents() syscall to check the
completion of the request.
5) The TUN/TAP driver receives packets from the queue pair of NIC, and prepares
for Direct I/O.
A modified NIC driver may render a skb which header is allocated in host
kernel, but the payload buffer is directly mapped from user space buffer which
are rendered through the AIO request by the Backend service. get_user_pages()
may do this. For one AIO read request, the TUN/TAP driver maintains a list for
the directly mapped buffers, and a NIC driver tries to get the buffers as
payload buffer to compose the new skbs. Of course, if getting the buffers
fails, then kernel allocated buffers are used.
6) Modern NIC cards now mostly have the header split feature. The NIC queue
pair then may directly DMA the payload into the user spaces mapped payload
buffers.
Thus a zero-copy for payload is implemented in packet receiving.
7) The TUN/TAP driver manually copy the host header to space user mapped.
8) aio_complete() to notify the Virtio-net backend service for io_getevents().
To guest Virtio-net driver, packets send corresponding to asynchronous write
I/O requests of backend. The path is similar to packet receive.
1) Guest Virtio-net driver provides header and payload address filled with
contents through the transmit vqueue to Virtio-net backed service.
2) Virtio-net backend service encapsulates the vqueue elements into multiple
AIO control blocks and composes them into one AIO write request.
3) Virtio-net backend service uses the io_submit() syscall to pass the
requests to the TUN/TAP device.
4) Virtio-net backend service uses io_getevents() syscall to check the request
completion.
5) The TUN/TAP driver gets the write requests and allocates skbs for it. The
header contents are copied into the skb header. The directly mapped user space
buffer is easily hooked into skb. Thus a zero copy for payload is implemented
in packet sending.
6) aio_complete() to notify the Virtio-net backend service for io_getevents().
The proposed framework is described as above.
Consider the modifications to the kernel and qemu:
To kernel:
1) The TUN/TAP driver may be modified a lot to implement AIO device operations
and to implement directly user space mapping into kernel. Code to maintain the
directly mapped user buffers should be in. It's just a modification for driver.
2) The NIC driver may be modified to compose skb differently and slightly data
structure change to add user directly mapped buffer pointer.
Here, maybe it's better for a NIC driver to present an interface for an rx/tx
queue pair instance which will also apply to traditional hardware, the kernel
interface should not be changed to make the other components happy.
The abstraction is useful, though it is not needed immediately here.
3) The skb shared info structure may be modified a little to contain the user
directly mapped info.
To Qemu:
1) The Virtio-net backend service may be modified to handle AIO read/write
requests from the vqueues.
2) Maybe a separate pthread to handle the AIO request triggering is needed.
Any comments are appreciated here.
Thanks
Xiaohui
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: UDP is bypassing qdisc statistics ....
From: Eric Dumazet @ 2009-09-01 7:00 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: Mark Smith, Christoph Lameter, netdev, davem
In-Reply-To: <20090901063726.GA5222@ff.dom.local>
Jarek Poplawski a écrit :
> On 31-08-2009 22:58, Mark Smith wrote:
>> On Mon, 31 Aug 2009 21:54:49 +0200
>> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>
>>> Christoph Lameter a écrit :
>>>> This is with 2.6.31-rc7. If I send icmp then its correctly registered as a
>>>> packet by the qdisc layer:
>>>>
>> <snip>
>>> loopback device do bypass qdisc layer for example...
>> On occassion, I'd have found it useful if it didn't. It'd be convenient
>> to test out your qdisc config, or test out applications performance
>> behaviour over a simulated WAN via netem, without having to a
>> network and two hosts, and all the related miscellaneous setup work.
>
> Probably Eric and you mean something special, but generally a loopback
> and some other virtuals bypass qdisc layer only with default qdisc.
>
Yes, I was referring to Christoph use, since on its machine, only
output from "tc -s -d qdisc" is about eth0
Mark, you can certainly do something like
# tc qdisc del dev lo root
# tc qdisc add dev lo root netem delay 100ms 10ms
# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
2009/08/01 08:59:22.799 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=204 ms
2009/08/01 08:59:23.804 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=208 ms
2009/08/01 08:59:24.801 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=204 ms
2009/08/01 08:59:25.808 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=209 ms
# tc -s -d qdisc show dev lo
qdisc netem 8001: root limit 1000 delay 100.0ms 10.0ms
Sent 1764 bytes 18 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
^ permalink raw reply
* [PATCH] net: Add DEVTYPE support for Ethernet based devices
From: Marcel Holtmann @ 2009-09-01 7:08 UTC (permalink / raw)
To: netdev; +Cc: davem, shemminger, johannes
The Ethernet framing is used for a lot of devices these days. Most
prominent are WiFi and WiMAX based devices. However for userspace
application it is important to classify these devices correctly and
not only see them as Ethernet devices. The daemons like HAL, DeviceKit
or even NetworkManager with udev support tries to do the classification
in userspace with a lot trickery and extra system calls. This is not
good and actually reaches its limitations. Especially since the kernel
does know the type of the Ethernet device it is pretty stupid.
To solve this problem the underlying device type needs to be set and
then the value will be exported as DEVTYPE via uevents and available
within udev.
# cat /sys/class/net/wlan0/uevent
DEVTYPE=wlan
INTERFACE=wlan0
IFINDEX=5
This is similar to subsystems like USB and SCSI that distinguish
between hosts, devices, disks, partitions etc.
The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
device type. All device types are free form, but for convenience the
same strings as used with RFKILL are choosen.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
drivers/net/usb/hso.c | 5 +++++
drivers/net/wimax/i2400m/sdio.c | 5 +++++
drivers/net/wimax/i2400m/usb.c | 5 +++++
include/linux/netdevice.h | 6 ++++++
net/bluetooth/bnep/core.c | 5 +++++
net/bridge/br_if.c | 6 ++++++
net/mac80211/iface.c | 5 +++++
7 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index ffe4106..5d47a73 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2534,6 +2534,10 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
}
}
+static struct device_type hso_type = {
+ .name = "wwan",
+};
+
/* Creates our network device */
static struct hso_device *hso_create_net_device(struct usb_interface *interface,
int port_spec)
@@ -2574,6 +2578,7 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface,
goto exit;
}
SET_NETDEV_DEV(net, &interface->dev);
+ SET_NETDEV_DEVTYPE(net, &hso_type);
/* registering our net device */
result = register_netdev(net);
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c
index ea7b290..2981e21 100644
--- a/drivers/net/wimax/i2400m/sdio.c
+++ b/drivers/net/wimax/i2400m/sdio.c
@@ -371,6 +371,10 @@ error:
}
+static struct device_type i2400ms_type = {
+ .name = "wimax",
+};
+
/*
* Probe a i2400m interface and register it
*
@@ -412,6 +416,7 @@ int i2400ms_probe(struct sdio_func *func,
goto error_alloc_netdev;
}
SET_NETDEV_DEV(net_dev, dev);
+ SET_NETDEV_DEVTYPE(net_dev, &i2400ms_type);
i2400m = net_dev_to_i2400m(net_dev);
i2400ms = container_of(i2400m, struct i2400ms, i2400m);
i2400m->wimax_dev.net_dev = net_dev;
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c
index cfdaf69..7eadd11 100644
--- a/drivers/net/wimax/i2400m/usb.c
+++ b/drivers/net/wimax/i2400m/usb.c
@@ -351,6 +351,10 @@ error:
}
+static struct device_type i2400mu_type = {
+ .name = "wimax",
+};
+
/*
* Probe a i2400m interface and register it
*
@@ -388,6 +392,7 @@ int i2400mu_probe(struct usb_interface *iface,
goto error_alloc_netdev;
}
SET_NETDEV_DEV(net_dev, dev);
+ SET_NETDEV_DEVTYPE(net_dev, &i2400mu_type);
i2400m = net_dev_to_i2400m(net_dev);
i2400mu = container_of(i2400m, struct i2400mu, i2400m);
i2400m->wimax_dev.net_dev = net_dev;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 60d3aac..8e00e03 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -989,6 +989,12 @@ static inline void *netdev_priv(const struct net_device *dev)
*/
#define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev))
+/* Set the sysfs device type for the network logical device to allow
+ * fin grained indentification of different network device types. For
+ * example Ethernet, Wirelss LAN, Bluetooth, WiMAX etc.
+ */
+#define SET_NETDEV_DEVTYPE(net, devtype) ((net)->dev.type = (devtype))
+
/**
* netif_napi_add - initialize a napi context
* @dev: network device
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 52a6ce0..cafe9f5 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -533,6 +533,10 @@ static struct device *bnep_get_device(struct bnep_session *session)
return conn ? &conn->dev : NULL;
}
+static struct device_type bnep_type = {
+ .name = "bluetooth",
+};
+
int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
{
struct net_device *dev;
@@ -586,6 +590,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
#endif
SET_NETDEV_DEV(dev, bnep_get_device(s));
+ SET_NETDEV_DEVTYPE(dev, &bnep_type);
err = register_netdev(dev);
if (err) {
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index e486f1f..142ebac 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -264,6 +264,10 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
return p;
}
+static struct device_type br_type = {
+ .name = "bridge",
+};
+
int br_add_bridge(struct net *net, const char *name)
{
struct net_device *dev;
@@ -280,6 +284,8 @@ int br_add_bridge(struct net *net, const char *name)
goto out_free;
}
+ SET_NETDEV_DEVTYPE(dev, &br_type);
+
ret = register_netdevice(dev);
if (ret)
goto out_free;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f6005ad..b8295cb 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -754,6 +754,10 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
return 0;
}
+static struct device_type wiphy_type = {
+ .name = "wlan",
+};
+
int ieee80211_if_add(struct ieee80211_local *local, const char *name,
struct net_device **new_dev, enum nl80211_iftype type,
struct vif_params *params)
@@ -785,6 +789,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
+ SET_NETDEV_DEVTYPE(ndev, &wiphy_type);
/* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */
sdata = netdev_priv(ndev);
--
1.6.2.5
^ permalink raw reply related
* Re: [PATCH] net: Add DEVTYPE support for Ethernet based devices
From: Johannes Berg @ 2009-09-01 7:25 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: netdev, davem, shemminger
In-Reply-To: <1251788899-30156-1-git-send-email-marcel@holtmann.org>
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
On Tue, 2009-09-01 at 00:08 -0700, Marcel Holtmann wrote:
> The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
> device type. All device types are free form, but for convenience the
> same strings as used with RFKILL are choosen.
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -754,6 +754,10 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> return 0;
> }
>
> +static struct device_type wiphy_type = {
> + .name = "wlan",
> +};
> +
> int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> struct net_device **new_dev, enum nl80211_iftype type,
> struct vif_params *params)
> @@ -785,6 +789,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
>
> memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
> SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
> + SET_NETDEV_DEVTYPE(ndev, &wiphy_type);
Can't you move that into the NETDEV_REGISTER hook in cfg80211? That way
orinoco, rndis and iwm don't need updating now.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] net: Add DEVTYPE support for Ethernet based devices
From: Marcel Holtmann @ 2009-09-01 7:33 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev, davem, shemminger
In-Reply-To: <1251789924.5327.4.camel@johannes.local>
Hi Johannes,
> > The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
> > device type. All device types are free form, but for convenience the
> > same strings as used with RFKILL are choosen.
>
> > --- a/net/mac80211/iface.c
> > +++ b/net/mac80211/iface.c
> > @@ -754,6 +754,10 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> > return 0;
> > }
> >
> > +static struct device_type wiphy_type = {
> > + .name = "wlan",
> > +};
> > +
> > int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> > struct net_device **new_dev, enum nl80211_iftype type,
> > struct vif_params *params)
> > @@ -785,6 +789,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> >
> > memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
> > SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
> > + SET_NETDEV_DEVTYPE(ndev, &wiphy_type);
>
> Can't you move that into the NETDEV_REGISTER hook in cfg80211? That way
> orinoco, rndis and iwm don't need updating now.
I am not sure if that would work, but it is worth testing it. If it
works, I clearly would prefer this.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 01/19] netdev: change transmit to limited range type
From: Eric Dumazet @ 2009-09-01 7:39 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
In-Reply-To: <20090901055128.466779045@vyatta.com>
Stephen Hemminger a écrit :
> The transmit function should only return one of three possible values,
> some drivers got confused and returned errno's or other values.
> This changes the definition so that this can be caught at compile time.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> The patch will produce warnings until drivers are converted.
>
>
> ---
> include/linux/netdevice.h | 22 +++++++++++++---------
> 1 file changed, 13 insertions(+), 9 deletions(-)
>
> --- a/include/linux/netdevice.h 2009-08-31 16:47:58.703591891 -0700
> +++ b/include/linux/netdevice.h 2009-08-31 22:24:53.101472780 -0700
> @@ -79,17 +79,19 @@ struct wireless_dev;
> #define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e))
> #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
>
> +/* Driver transmit return codes */
> +enum netdev_tx {
> + NETDEV_TX_OK = 0, /* driver took care of packet */
> + NETDEV_TX_BUSY, /* driver tx path was busy*/
> + NETDEV_TX_LOCKED = -1, /* driver tx lock was already taken */
> +};
> +typedef enum netdev_tx netdev_tx_t;
> +
> #endif
>
> #define MAX_ADDR_LEN 32 /* Largest hardware address length */
>
> -/* Driver transmit return codes */
> -#define NETDEV_TX_OK 0 /* driver took care of packet */
> -#define NETDEV_TX_BUSY 1 /* driver tx path was busy*/
> -#define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */
> -
> #ifdef __KERNEL__
> -
> /*
> * Compute the worst case header length according to the protocols
> * used.
> @@ -507,9 +509,11 @@ struct netdev_queue {
> * This function is called when network device transistions to the down
> * state.
> *
> - * int (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev);
> + * netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb,
> + * struct net_device *dev);
> * Called when a packet needs to be transmitted.
> - * Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED,
> + * Must return NETDEV_TX_OK , NETDEV_TX_BUSY.
> + * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
> * Required can not be NULL.
> *
> * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb);
> @@ -580,7 +584,7 @@ struct net_device_ops {
> void (*ndo_uninit)(struct net_device *dev);
> int (*ndo_open)(struct net_device *dev);
> int (*ndo_stop)(struct net_device *dev);
> - int (*ndo_start_xmit) (struct sk_buff *skb,
> + netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb,
> struct net_device *dev);
> u16 (*ndo_select_queue)(struct net_device *dev,
> struct sk_buff *skb);
>
I was wondering if we could add a third parameter to
ndo_start_xmit() (and pass the struct netdev_queue *txq)
in a smooth way, but could not find a solution.
Unconverted drivers would not care of this third param; but this
should be provided by callers (like dev_hard_start_xmit())
Most multiqueue drivers have to recompute it, and even monoqueue drivers
have to call netif_stop_queue(dev)/netif_queue_stopped(dev), all
using netdev_get_tx_queue(dev, 0) in the end...
^ permalink raw reply
* Re: r8189 mac address changes persist across reboot (was: duplicate MAC addresses)
From: Ivan Vecera @ 2009-09-01 7:58 UTC (permalink / raw)
To: Alan Jenkins
Cc: Francois Romieu, marty, linux-hotplug, netdev, linux-kernel,
Mikael Pettersson
In-Reply-To: <9b2b86520908230314q37d07da6mbde9dc48ad5a17ce@mail.gmail.com>
Alan Jenkins napsal(a):
> On 8/23/09, marty <marty@goodoldmarty.com> wrote:
>> Greg KH wrote:
>>>> On Tue, Aug 18, 2009 at 04:27:04PM -0400, marty wrote:
>>>>>> I got trouble...
>>>>>> (duplicate MAC addresses)
>>>> That's a bug in your hardware, have you asked your manufacturer to
>>>> resolve this for you? That violates the ethernet spec...
>> I have resolved that problem as of today. I found this was caused
>> by the software I had been using. If a hardware issue remains, it is moot.
>>
>> The bonding driver/utilities normally sets the bond address to the MAC of
>> the
>> first NIC. But it also set the MAC of the slave (eth3) to the MAC of the
>> first
>> NIC. This persists through reboots so that is how my MACs got duplicated.
>>
>> Resetting the MAC corrected those problems and everything works fine now.
>>
>> Marty B.
>
> Hmm. <Documentation/networking/bonding.txt>
>
> "To restore your slaves' MAC addresses, you need to detach them
> from the bond (`ifenslave -d bond0 eth0'). The bonding driver will
> then restore the MAC addresses that the slaves had before they were
> enslaved."
>
> In which case one would hope that a clean shutdown would restore the
> MAC addresses in the same way as ifenslave -d.
>
> I found that snippet via Google, which pointed me to the 2.4 version
> of the same document [1]. It suggests that your hardware or driver is
> a little unusual.
>
> "To restore your slaves' MAC addresses, you need to detach them
> from the bond (`ifenslave -d bond0 eth0'), set them down
> (`ifconfig eth0 down'), unload the drivers (`rmmod 3c59x', for
> example) and reload them to get the MAC addresses from their
> eeproms."
>
> So other drivers would not have this problem, because they always
> reset the MAC address at load time. That would explain why the the
> kernel doesn't bother resetting the MAC addresses on shutdown.
>
> Looking at r8169.c confirms this. It doesn't appear to initialize the
> MAC address register from elsewhere; it just uses the current value.
> It will also report this initial value as the "permanent" MAC address,
> which your report suggests is wrong. I think your problem is a bug in
> r8169.
>
> Francois, I found a datasheet for the 8139; it was claimed to be
> similar and it does indeed appear so. The datasheet suggests that the
> driver needs to provoke "auto-load" from the EEPROM at load time.
> Could you please have a look at fixing this, so that MAC address
> changes do not persist over a reboot?
>
Using auto-loading method is not possible for all new Realtek products
(mainly for PCI-E chipsets). I asked the Realtek engineers and this
is the answer:
Q: Is it possible to use HW register at offset 50h to reload the MAC
address from EEPROM or somewhere else? I mean the usage of Auto-load
mode (bits EEM1=0 and EEM0=1 in 50h HW reg).
A: Current new LANs don't load mac address throught autoload command.
You need to read it out from external eeprom or internal efuse then
put it back to ID0~ID5.
So you need to read the MAC address from the EEPROM and then write it into
ID0-ID5 registers. I already created the patch that initializes the MAC
address from EEPROM but there were some issues with this patch so it was
reverted. Mikael reported that the MAC address from its adapter (on Thecus
n2100) is read only partly (first 3 bytes were correct but the rest were
zeros). Later we found that the MAC address is correct and there are really
3 correct bytes + 3 zeros in EEPROM. The Thecus n2100 system probably uses
only these 3 bytes and the remaining 3 bytes fills in by itself (they are
probably stored somewhere in the firmware).
I have tested my patch with several different realtek NICs without any
problem but what should we do with embedded system like the n2100 that
initializes the MAC in other way.
There are 2 possibilities:
1) There could be an additional module param to enable/disable the MAC
initialization
2) The MAC address read from EEPROM will be checked against the current
MAC address in ID0-5 registers. And the current MAC will be replaced
by the one from EEPROM only if the first 3 bytes (OUI part) are
different.
Francois, what do you think about it?
Regards,
Ivan
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox