diff options
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/cosa.c | 7 | ||||
-rw-r--r-- | drivers/net/wan/cycx_x25.c | 10 | ||||
-rw-r--r-- | drivers/net/wan/dlci.c | 17 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 16 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 29 | ||||
-rw-r--r-- | drivers/net/wan/hd64570.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/hd64572.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/hdlc.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 8 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_raw_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_x25.c | 6 | ||||
-rw-r--r-- | drivers/net/wan/hostess_sv11.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 18 | ||||
-rw-r--r-- | drivers/net/wan/sbni.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/sdla.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/sealevel.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 13 | ||||
-rw-r--r-- | drivers/net/wan/z85230.c | 9 | ||||
-rw-r--r-- | drivers/net/wan/z85230.h | 3 |
21 files changed, 85 insertions, 92 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 61581ee5f08..66360a2a14c 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -279,7 +279,7 @@ static int cosa_net_attach(struct net_device *dev, unsigned short encoding, 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_device *dev) 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 *skb, struct net_device *dev) 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) diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index f525f9fe74d..2573c18b6aa 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c @@ -139,8 +139,8 @@ static int cycx_netdevice_hard_header(struct sk_buff *skb, 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(struct sk_buff *skb) * 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; @@ -663,7 +663,7 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, free_packet: dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } /* Get Ethernet-style interface statistics. diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 2fa275a58f9..69d269d32b5 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -186,20 +186,21 @@ static void dlci_receive(struct sk_buff *skb, struct net_device *dev) 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(0); + return NETDEV_TX_OK; dlp = netdev_priv(dev); 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 *skb, struct net_device *dev) 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; @@ -219,7 +220,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) /* Alan Cox recommends always returning 0, and always freeing the packet */ /* experience suggest a slightly more conservative approach */ - if (!ret) + if (ret == NETDEV_TX_OK) { dev_kfree_skb(skb); netif_wake_queue(dev); diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 8face5db8f3..b2247bd0d49 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -359,7 +359,8 @@ static void dscc4_tx_irq(struct dscc4_pci_priv *, struct dscc4_dev_priv *); 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 *); @@ -663,12 +664,12 @@ static inline void dscc4_rx_skb(struct dscc4_dev_priv *dpriv, } else { if (skb->data[pkt_len] & FrameRdo) dev->stats.rx_fifo_errors++; - else if (!(skb->data[pkt_len] | ~FrameCrc)) + else if (!(skb->data[pkt_len] & FrameCrc)) dev->stats.rx_crc_errors++; - else if (!(skb->data[pkt_len] | ~(FrameVfr | FrameRab))) + else if ((skb->data[pkt_len] & (FrameVfr | FrameRab)) != + FrameVfr | FrameRab) dev->stats.rx_length_errors++; - else - dev->stats.rx_errors++; + dev->stats.rx_errors++; dev_kfree_skb_irq(skb); } refill: @@ -1148,7 +1149,8 @@ static int dscc4_tx_poll(struct dscc4_dev_priv *dpriv, struct net_device *dev) } #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; @@ -1182,7 +1184,7 @@ static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev) if (dscc4_tx_quiescent(dpriv, dev)) dscc4_do_tx(dpriv, dev); - return 0; + return NETDEV_TX_OK; } static int dscc4_close(struct net_device *dev) diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 25c9ef6a181..3e90eb81618 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -792,25 +792,6 @@ fst_process_rx_status(int rx_status, char *name) */ break; } - - case NET_RX_CN_LOW: - { - dbg(DBG_ASS, "%s: Receive Low Congestion\n", name); - break; - } - - case NET_RX_CN_MOD: - { - dbg(DBG_ASS, "%s: Receive Moderate Congestion\n", name); - break; - } - - case NET_RX_CN_HIGH: - { - dbg(DBG_ASS, "%s: Receive High Congestion\n", name); - break; - } - case NET_RX_DROP: { dbg(DBG_ASS, "%s: Received packet dropped\n", name); @@ -2293,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; @@ -2313,7 +2294,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) dbg(DBG_ASS, "Tried to transmit but no carrier on card %d port %d\n", card->card_no, port->index); - return 0; + return NETDEV_TX_OK; } /* Drop it if it's too big! MTU failure ? */ @@ -2322,7 +2303,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) LEN_TX_BUFFER); dev_kfree_skb(skb); dev->stats.tx_errors++; - return 0; + return NETDEV_TX_OK; } /* @@ -2356,7 +2337,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) dev->stats.tx_errors++; dbg(DBG_ASS, "Tx queue overflow card %d port %d\n", card->card_no, port->index); - return 0; + return NETDEV_TX_OK; } /* @@ -2373,7 +2354,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) fst_q_work_item(&fst_work_txq, card->card_no); tasklet_schedule(&fst_tx_task); - return 0; + return NETDEV_TX_OK; } /* diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 1ea1ef6c3b9..80114c93bae 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -620,7 +620,7 @@ static void sca_dump_rings(struct net_device *dev) #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, struct net_device *dev) spin_unlock_irq(&port->lock); dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index f099c34a3ae..84f01373e11 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c @@ -562,7 +562,7 @@ static void sca_dump_rings(struct net_device *dev) #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, struct net_device *dev) spin_unlock_irq(&port->lock); dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index 7596eae1b35..cc07236ea73 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c @@ -66,7 +66,7 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev, 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); diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index bfa0161a02d..840cff72a0f 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -407,7 +407,7 @@ static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 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; @@ -421,7 +421,7 @@ static int pvc_xmit(struct sk_buff *skb, struct net_device *dev) GFP_ATOMIC)) { dev->stats.tx_dropped++; dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } skb_put(skb, pad); memset(skb->data + len, 0, pad); @@ -435,13 +435,13 @@ static int pvc_xmit(struct sk_buff *skb, struct net_device *dev) dev->stats.tx_compressed++; skb->dev = pvc->frad; dev_queue_xmit(skb); - return 0; + return NETDEV_TX_OK; } } dev->stats.tx_dropped++; dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } static inline void fr_log_dlci_active(pvc_device *pvc) diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index 49e68f5ca5f..1b30fcc2414 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c @@ -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 */ diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index b1dc29ed158..aa9248f8eb1 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -87,7 +87,7 @@ static void x25_data_transmit(struct net_device *dev, struct sk_buff *skb) -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, struct net_device *dev) 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, struct net_device *dev) } dev_kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index 567d4f5062d..15002c3d0d9 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c @@ -156,7 +156,8 @@ static int hostess_ioctl(struct net_device *d, struct ifreq *ifr, int cmd) * 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); } diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index aff4f6bdf3d..d1e3c673e9b 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -147,7 +147,8 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb) /* * 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; diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 45b1822c962..7ea71b33d2e 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -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 = 0; unsigned long flags; lmc_trace(dev, "lmc_start_xmit in"); @@ -1510,7 +1511,7 @@ static int lmc_start_xmit(struct sk_buff *skb, struct net_device *dev) spin_unlock_irqrestore(&sc->lmc_lock, flags); lmc_trace(dev, "lmc_start_xmit_out"); - return ret; + return NETDEV_TX_OK; } @@ -1657,7 +1658,7 @@ static int lmc_rx(struct net_device *dev) } skb_copy_from_linear_data(skb, skb_put(nsb, len), len); - nsb->protocol = lmc_proto_type(sc, skb); + nsb->protocol = lmc_proto_type(sc, nsb); skb_reset_mac_header(nsb); /* skb_reset_network_header(nsb); */ nsb->dev = dev; @@ -1897,11 +1898,12 @@ static void lmc_softreset (lmc_softc_t * const sc) /*fold00*/ /* * Sets end of ring */ - sc->lmc_rxring[i - 1].length |= 0x02000000; /* Set end of buffers flag */ - sc->lmc_rxring[i - 1].buffer2 = virt_to_bus (&sc->lmc_rxring[0]); /* Point back to the start */ + if (i != 0) { + sc->lmc_rxring[i - 1].length |= 0x02000000; /* Set end of buffers flag */ + sc->lmc_rxring[i - 1].buffer2 = virt_to_bus(&sc->lmc_rxring[0]); /* Point back to the start */ + } LMC_CSR_WRITE (sc, csr_rxlist, virt_to_bus (sc->lmc_rxring)); /* write base address */ - /* Initialize the transmit rings and buffers */ for (i = 0; i < LMC_TXDESCS; i++) { diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index d14e95a08d6..1cc24a45f00 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c @@ -114,7 +114,8 @@ static int sbni_pci_probe( struct net_device * ); 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, unsigned long ioaddr, int irq ) #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; @@ -463,7 +464,7 @@ sbni_start_xmit( struct sk_buff *skb, struct net_device *dev ) prepare_to_send( skb, p ); spin_unlock( &nl->lock ); netif_start_queue( dev ); - return 0; + return NETDEV_TX_OK; } } @@ -472,7 +473,7 @@ sbni_start_xmit( struct sk_buff *skb, struct net_device *dev ) #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); @@ -483,7 +484,7 @@ sbni_start_xmit( struct sk_buff *skb, struct net_device *dev ) prepare_to_send( skb, dev ); spin_unlock( &nl->lock ); - return 0; + return NETDEV_TX_OK; } #endif /* CONFIG_SBNI_MULTILINE */ diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 1d637f407a0..63c76458431 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c @@ -651,7 +651,8 @@ static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, i **************************/ /* 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 *skb, struct net_device *dev) 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) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 23b26902745..0c525e24b24 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -156,7 +156,8 @@ static int sealevel_ioctl(struct net_device *d, struct ifreq *ifr, int cmd) * 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); } diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index e4ad7b6b52e..daee8a0624e 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -268,7 +268,7 @@ static irqreturn_t wanxl_intr(int irq, void* dev_id) -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; @@ -310,7 +310,7 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev) } spin_unlock(&port->lock); - return 0; + return NETDEV_TX_OK; } diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index d67e208ab37..27945049c9e 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -299,7 +299,8 @@ static void x25_asy_timeout(struct net_device *dev) /* 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; @@ -308,7 +309,7 @@ static int x25_asy_xmit(struct sk_buff *skb, struct net_device *dev) printk(KERN_ERR "%s: xmit call when iface is down\n", dev->name); kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } switch (skb->data[0]) { @@ -319,14 +320,14 @@ static int x25_asy_xmit(struct sk_buff *skb, struct net_device *dev) if (err != LAPB_OK) printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err); kfree_skb(skb); - return 0; + return NETDEV_TX_OK; case 0x02: /* Disconnect request .. do nothing - hang up ?? */ err = lapb_disconnect_request(dev); if (err != LAPB_OK) printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err); default: kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } skb_pull(skb, 1); /* Remove control byte */ /* @@ -344,9 +345,9 @@ static int x25_asy_xmit(struct sk_buff *skb, struct net_device *dev) if (err != LAPB_OK) { printk(KERN_ERR "x25_asy: lapb_data_request error - %d\n", err); kfree_skb(skb); - return 0; + return NETDEV_TX_OK; } - return 0; + return NETDEV_TX_OK; } diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index ad4e79c4c5c..0be7ec7299d 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c @@ -1727,15 +1727,14 @@ static inline int spans_boundary(struct sk_buff *skb) * 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_channel *c, struct sk_buff *skb) z8530_tx_begin(c); spin_unlock_irqrestore(c->lock, flags); - return 0; + return NETDEV_TX_OK; } EXPORT_SYMBOL(z8530_queue_xmit); diff --git a/drivers/net/wan/z85230.h b/drivers/net/wan/z85230.h index 85b3e785d48..f29d554fc07 100644 --- a/drivers/net/wan/z85230.h +++ b/drivers/net/wan/z85230.h @@ -406,7 +406,8 @@ extern int z8530_sync_dma_close(struct net_device *, struct z8530_channel *); 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); |