]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wan: convert drivers to netdev_tx_t
authorStephen Hemminger <shemminger@vyatta.com>
Mon, 31 Aug 2009 19:50:47 +0000 (19:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2009 08:13:28 +0000 (01:13 -0700)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
21 files changed:
drivers/net/wan/cosa.c
drivers/net/wan/cycx_x25.c
drivers/net/wan/dlci.c
drivers/net/wan/dscc4.c
drivers/net/wan/farsync.c
drivers/net/wan/hd64570.c
drivers/net/wan/hd64572.c
drivers/net/wan/hdlc.c
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_raw_eth.c
drivers/net/wan/hdlc_x25.c
drivers/net/wan/hostess_sv11.c
drivers/net/wan/lapbether.c
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/sbni.c
drivers/net/wan/sdla.c
drivers/net/wan/sealevel.c
drivers/net/wan/wanxl.c
drivers/net/wan/x25_asy.c
drivers/net/wan/z85230.c
drivers/net/wan/z85230.h

index 61581ee5f08c0699cd88fb4dabd42b511109859f..66360a2a14c2f174ac4fe4018fcd1d005f078287 100644 (file)
@@ -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)
index 4ae9bd297cc24a0494a42db41116c98ecd28724a..2573c18b6aa531830b8a92645bb6438393503520 100644 (file)
@@ -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;
index 8526b6d1ee4da0baac257946f607d005ea1e74c5..69d269d32b5b71df1c702b382a6af530ae2e0d08 100644 (file)
@@ -186,12 +186,11 @@ 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 NETDEV_TX_OK;
@@ -200,6 +199,8 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *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;
index cc00e0f89ecb331a856bce843f4a251c1f8e4278..b2247bd0d492e6a4a0d4de596ac358bdedb08465 100644 (file)
@@ -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 *);
@@ -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;
index 20a1237a3d743f6b8d8588d35c6a3dfb81235232..3e90eb816181b508ee2c4e151206a72eb4eafbe7 100644 (file)
@@ -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;
index 1ea1ef6c3b96205ed787361d884ad786d4cdd404..80114c93bae74c52db4d53c32f3681938022c49d 100644 (file)
@@ -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;
 }
 
 
index f099c34a3ae24ddec276db15ecfa976ae895f40e..84f01373e11fb769794dd885b0586e61607c9692 100644 (file)
@@ -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;
 }
 
 
index 7596eae1b35cbb424fbb382214179fb519086369..cc07236ea734ba018bd5fea2960bdd800446277c 100644 (file)
@@ -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);
 
index 52438c76bf8ad890099aac709cd0edb610b74ba4..840cff72a0f1a5596ff407651d2c81c305c8a3e9 100644 (file)
@@ -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;
 
index 49e68f5ca5f2c95630635ac0fdf7a74512ce90aa..1b30fcc2414531edc8be3fff8175ae8685ea3e6b 100644 (file)
@@ -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 */
index b1dc29ed15835675b1231505fc25696a62f29f73..aa9248f8eb1afd371c4834824d3da3c2f629a457 100644 (file)
@@ -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;
 }
 
 
index 567d4f5062d6517bb397895093ebc560910ff023..15002c3d0d95298711a1f6543af32e2d052d788d 100644 (file)
@@ -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);
 }
index aff4f6bdf3d5b2275cccb5b166d4994938820ec5..d1e3c673e9b298376344bb501dca4d2bdd3850d6 100644 (file)
@@ -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;
 
index 4b83d88728571913e3b4979f607551d6d4ffa407..7ea71b33d2e9b40227511822c27d74d897495646 100644 (file)
@@ -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 *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;
 }
 
 
index 85c02a2ec2e74f41eaaebc521e61d5201150521d..1cc24a45f003ab94062c21a6b173757cca6c0baf 100644 (file)
@@ -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;
@@ -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);
index 1d637f407a0c850fb39c9e8eb4f5d35a391baa13..63c76458431c2755cbd1c0f6497da19f796b6cc0 100644 (file)
@@ -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)
index 23b26902745310b5d93fca475467e25a6487fb23..0c525e24b247242d5337b63636e5712e8d493595 100644 (file)
@@ -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);
 }
index 03b76adbe5f0ac963aadf1609475deb0f182c5b8..daee8a0624eee14a0370ebeb20124e60a8373845 100644 (file)
@@ -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;
index 1047920e742c8293e620717ab96110a9f6a5a097..27945049c9e1c30fbc2cfe754fb949ca443e42d8 100644 (file)
@@ -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;
index ad4e79c4c5c3e8073783e1ab9df51de493b19557..0be7ec7299dbb960641f7c385b2dace9482ca7fd 100644 (file)
@@ -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);
index 85b3e785d484f31e942d5d5a47a349f02a3a0b22..f29d554fc07d4f893c0857593f0b108fa9b4a614 100644 (file)
@@ -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);