X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwan%2Fx25_asy.c;h=467ad7b8cd8675fede848d0d3f5601cbbb6c2156;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=03f4331b4a22a586062323c0d2acd402672948bb;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 03f4331b4..467ad7b8c 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -34,8 +34,6 @@ #include #include "x25_asy.h" -#include - static struct net_device **x25_asy_devs; static int x25_asy_maxdev = SL_NRUNIT; @@ -211,8 +209,10 @@ static void x25_asy_bump(struct x25_asy *sl) return; } skb_push(skb,1); /* LAPB internal control */ + skb->dev = sl->dev; memcpy(skb_put(skb,count), sl->rbuff, count); - skb->protocol = x25_type_trans(skb, sl->dev); + skb->mac.raw=skb->data; + skb->protocol=htons(ETH_P_X25); if((err=lapb_data_received(skb->dev, skb))!=LAPB_OK) { kfree_skb(skb); @@ -253,7 +253,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len) * 14 Oct 1994 Dmitry Gorodchanin. */ sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); - actual = sl->tty->driver->write(sl->tty, sl->xbuff, count); + actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count); sl->xleft = count - actual; sl->xhead = sl->xbuff + actual; /* VSV */ @@ -283,7 +283,7 @@ static void x25_asy_write_wakeup(struct tty_struct *tty) return; } - actual = tty->driver->write(tty, sl->xhead, sl->xleft); + actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft); sl->xleft -= actual; sl->xhead += actual; } @@ -419,7 +419,11 @@ static void x25_asy_connected(struct net_device *dev, int reason) ptr = skb_put(skb, 1); *ptr = 0x01; - skb->protocol = x25_type_trans(skb, sl->dev); + skb->dev = sl->dev; + skb->protocol = htons(ETH_P_X25); + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + netif_rx(skb); sl->dev->last_rx = jiffies; } @@ -438,7 +442,11 @@ static void x25_asy_disconnected(struct net_device *dev, int reason) ptr = skb_put(skb, 1); *ptr = 0x02; - skb->protocol = x25_type_trans(skb, sl->dev); + skb->dev = sl->dev; + skb->protocol = htons(ETH_P_X25); + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + netif_rx(skb); sl->dev->last_rx = jiffies; }