diff options
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/cycx_x25.c | 13 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hd64570.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/hd64572.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_x25.c | 12 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 12 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 6 | ||||
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 5 | ||||
-rw-r--r-- | drivers/net/wan/pc300_tty.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/sdla.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 12 |
13 files changed, 32 insertions, 38 deletions
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index cd8cb95c5bd..cf9e15fd8d9 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c @@ -634,11 +634,12 @@ static netdev_tx_t cycx_netdevice_hard_start_xmit(struct sk_buff *skb, } } else { /* chan->protocol == ETH_P_X25 */ switch (skb->data[0]) { - case 0: break; - case 1: /* Connect request */ + case X25_IFACE_DATA: + break; + case X25_IFACE_CONNECT: cycx_x25_chan_connect(dev); goto free_packet; - case 2: /* Disconnect request */ + case X25_IFACE_DISCONNECT: cycx_x25_chan_disconnect(dev); goto free_packet; default: @@ -1406,7 +1407,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state) reset_timer(dev); if (chan->protocol == ETH_P_X25) - cycx_x25_chan_send_event(dev, 1); + cycx_x25_chan_send_event(dev, + X25_IFACE_CONNECT); break; case WAN_CONNECTING: @@ -1424,7 +1426,8 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state) } if (chan->protocol == ETH_P_X25) - cycx_x25_chan_send_event(dev, 2); + cycx_x25_chan_send_event(dev, + X25_IFACE_DISCONNECT); netif_wake_queue(dev); break; diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index a4859f7a7cc..d45b08d1dbc 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -1175,8 +1175,6 @@ static netdev_tx_t dscc4_start_xmit(struct sk_buff *skb, spin_unlock(&dpriv->lock); #endif - dev->trans_start = jiffies; - if (debug > 2) dscc4_tx_print(dev, dpriv, "Xmit"); /* To be cleaned(unsigned int)/optimized. Later, ok ? */ diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 4dde2ea4a18..a3ea27ce04f 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -658,7 +658,6 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) #endif writew(len, &desc->len); writeb(ST_TX_EOM, &desc->stat); - dev->trans_start = jiffies; port->txin = next_desc(port, port->txin, 1); sca_outw(desc_offset(port, port->txin, 1), diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index aad9ed45c25..ea476cbd38b 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c @@ -585,7 +585,6 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) writew(len, &desc->len); writeb(ST_TX_EOM, &desc->stat); - dev->trans_start = jiffies; port->txin = (port->txin + 1) % card->tx_ring_buffers; sca_outl(desc_offset(port, port->txin, 1), diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index c7adbb79f7c..70527e5a54a 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -49,14 +49,14 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) static void x25_connected(struct net_device *dev, int reason) { - x25_connect_disconnect(dev, reason, 1); + x25_connect_disconnect(dev, reason, X25_IFACE_CONNECT); } static void x25_disconnected(struct net_device *dev, int reason) { - x25_connect_disconnect(dev, reason, 2); + x25_connect_disconnect(dev, reason, X25_IFACE_DISCONNECT); } @@ -71,7 +71,7 @@ static int x25_data_indication(struct net_device *dev, struct sk_buff *skb) return NET_RX_DROP; ptr = skb->data; - *ptr = 0; + *ptr = X25_IFACE_DATA; skb->protocol = x25_type_trans(skb, dev); return netif_rx(skb); @@ -94,13 +94,13 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev) /* X.25 to LAPB */ switch (skb->data[0]) { - case 0: /* Data to be transmitted */ + case X25_IFACE_DATA: /* Data to be transmitted */ skb_pull(skb, 1); if ((result = lapb_data_request(dev, skb)) != LAPB_OK) dev_kfree_skb(skb); return NETDEV_TX_OK; - case 1: + case X25_IFACE_CONNECT: if ((result = lapb_connect_request(dev))!= LAPB_OK) { if (result == LAPB_CONNECTED) /* Send connect confirm. msg to level 3 */ @@ -112,7 +112,7 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev) } break; - case 2: + case X25_IFACE_DISCONNECT: if ((result = lapb_disconnect_request(dev)) != LAPB_OK) { if (result == LAPB_NOTCONNECTED) /* Send disconnect confirm. msg to level 3 */ diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 0c2cdde686a..88e363033e2 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c @@ -891,7 +891,6 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev) wmb(); queue_put_desc(queue_ids[port->id].tx, tx_desc_phys(port, n), desc); - dev->trans_start = jiffies; if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ #if DEBUG_TX diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 98e2f99903d..4d4dc38c729 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -139,7 +139,7 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb) return NET_RX_DROP; ptr = skb->data; - *ptr = 0x00; + *ptr = X25_IFACE_DATA; skb->protocol = x25_type_trans(skb, dev); return netif_rx(skb); @@ -161,14 +161,14 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb, goto drop; switch (skb->data[0]) { - case 0x00: + case X25_IFACE_DATA: break; - case 0x01: + case X25_IFACE_CONNECT: if ((err = lapb_connect_request(dev)) != LAPB_OK) printk(KERN_ERR "lapbeth: lapb_connect_request " "error: %d\n", err); goto drop; - case 0x02: + case X25_IFACE_DISCONNECT: if ((err = lapb_disconnect_request(dev)) != LAPB_OK) printk(KERN_ERR "lapbeth: lapb_disconnect_request " "err: %d\n", err); @@ -225,7 +225,7 @@ static void lapbeth_connected(struct net_device *dev, int reason) } ptr = skb_put(skb, 1); - *ptr = 0x01; + *ptr = X25_IFACE_CONNECT; skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); @@ -242,7 +242,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason) } ptr = skb_put(skb, 1); - *ptr = 0x02; + *ptr = X25_IFACE_DISCONNECT; skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index b2785037712..e2c6f7f4f51 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -1506,8 +1506,6 @@ static netdev_tx_t lmc_start_xmit(struct sk_buff *skb, /* send now! */ LMC_CSR_WRITE (sc, csr_txpoll, 0); - dev->trans_start = jiffies; - spin_unlock_irqrestore(&sc->lmc_lock, flags); lmc_trace(dev, "lmc_start_xmit_out"); @@ -2103,7 +2101,7 @@ static void lmc_driver_timeout(struct net_device *dev) printk("%s: Xmitter busy|\n", dev->name); sc->extra_stats.tx_tbusy_calls++; - if (jiffies - dev->trans_start < TX_TIMEOUT) + if (jiffies - dev_trans_start(dev) < TX_TIMEOUT) goto bug_out; /* @@ -2135,7 +2133,7 @@ static void lmc_driver_timeout(struct net_device *dev) sc->lmc_device->stats.tx_errors++; sc->extra_stats.tx_ProcTimeout++; /* -baz */ - dev->trans_start = jiffies; + dev->trans_start = jiffies; /* prevent tx timeout */ bug_out: diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 3f744c64309..c6aa66e5b52 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c @@ -396,7 +396,7 @@ static void tx1_dma_buf_check(pc300_t * card, int ch) u16 next_bd = card->chan[ch].tx_next_bd; u32 scabase = card->hw.scabase; - printk ("\nnfree_tx_bd = %d \n", card->chan[ch].nfree_tx_bd); + printk ("\nnfree_tx_bd = %d\n", card->chan[ch].nfree_tx_bd); printk("#CH%d: f_bd = %d(0x%08x), n_bd = %d(0x%08x)\n", ch, first_bd, TX_BD_ADDR(ch, first_bd), next_bd, TX_BD_ADDR(ch, next_bd)); @@ -1790,7 +1790,7 @@ static void cpc_tx_timeout(struct net_device *dev) cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED1 << (2 * ch))); } - dev->trans_start = jiffies; + dev->trans_start = jiffies; /* prevent tx timeout */ CPC_UNLOCK(card, flags); netif_wake_queue(dev); } @@ -1849,7 +1849,6 @@ static int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) if (d->trace_on) { cpc_trace(dev, skb, 'T'); } - dev->trans_start = jiffies; /* Start transmission */ CPC_LOCK(card, flags); diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index 4917a94943b..4293889e287 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c @@ -366,7 +366,7 @@ static void cpc_tty_close(struct tty_struct *tty, struct file *flip) int res; if (!tty || !tty->driver_data ) { - CPC_TTY_DBG("hdlx-tty: no TTY in close \n"); + CPC_TTY_DBG("hdlx-tty: no TTY in close\n"); return; } diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 31c41af2246..43ae6f440bf 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c @@ -1352,7 +1352,7 @@ static int sdla_set_config(struct net_device *dev, struct ifmap *map) return(-EINVAL); if (!request_region(map->base_addr, SDLA_IO_EXTENTS, dev->name)){ - printk(KERN_WARNING "SDLA: io-port 0x%04lx in use \n", dev->base_addr); + printk(KERN_WARNING "SDLA: io-port 0x%04lx in use\n", dev->base_addr); return(-EINVAL); } base = map->base_addr; diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 541c700dcee..db73a7be199 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -298,7 +298,6 @@ static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev) desc->stat = PACKET_FULL; writel(1 << (DOORBELL_TO_CARD_TX_0 + port->node), port->card->plx + PLX_DOORBELL_TO_CARD); - dev->trans_start = jiffies; port->tx_out = (port->tx_out + 1) % TX_BUFFERS; diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 80d5c5834a0..166e77dfffd 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -29,12 +29,12 @@ #include <linux/etherdevice.h> #include <linux/skbuff.h> #include <linux/if_arp.h> -#include <linux/x25.h> #include <linux/lapb.h> #include <linux/init.h> #include <linux/rtnetlink.h> #include <linux/compat.h> #include <linux/slab.h> +#include <net/x25device.h> #include "x25_asy.h" #include <net/x25device.h> @@ -315,15 +315,15 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb, } switch (skb->data[0]) { - case 0x00: + case X25_IFACE_DATA: break; - case 0x01: /* Connection request .. do nothing */ + case X25_IFACE_CONNECT: /* Connection request .. do nothing */ err = lapb_connect_request(dev); if (err != LAPB_OK) printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err); kfree_skb(skb); return NETDEV_TX_OK; - case 0x02: /* Disconnect request .. do nothing - hang up ?? */ + case X25_IFACE_DISCONNECT: /* 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); @@ -411,7 +411,7 @@ static void x25_asy_connected(struct net_device *dev, int reason) } ptr = skb_put(skb, 1); - *ptr = 0x01; + *ptr = X25_IFACE_CONNECT; skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); @@ -430,7 +430,7 @@ static void x25_asy_disconnected(struct net_device *dev, int reason) } ptr = skb_put(skb, 1); - *ptr = 0x02; + *ptr = X25_IFACE_DISCONNECT; skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); |