#include <asm/system.h>
#include <asm/uaccess.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include "x25_asy.h"
+#include <net/x25device.h>
+
static struct net_device **x25_asy_devs;
static int x25_asy_maxdev = SL_NRUNIT;
-MODULE_PARM(x25_asy_maxdev, "i");
+module_param(x25_asy_maxdev, int, 0);
MODULE_LICENSE("GPL");
static int x25_asy_esc(unsigned char *p, unsigned char *d, int len);
return;
}
skb_push(skb,1); /* LAPB internal control */
- skb->dev = sl->dev;
memcpy(skb_put(skb,count), sl->rbuff, count);
- skb->mac.raw=skb->data;
- skb->protocol=htons(ETH_P_X25);
+ skb->protocol = x25_type_trans(skb, sl->dev);
if((err=lapb_data_received(skb->dev, skb))!=LAPB_OK)
{
kfree_skb(skb);
* 14 Oct 1994 Dmitry Gorodchanin.
*/
sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
- actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count);
+ actual = sl->tty->driver->write(sl->tty, sl->xbuff, count);
sl->xleft = count - actual;
sl->xhead = sl->xbuff + actual;
/* VSV */
return;
}
- actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft);
+ actual = tty->driver->write(tty, sl->xhead, sl->xleft);
sl->xleft -= actual;
sl->xhead += actual;
}
ptr = skb_put(skb, 1);
*ptr = 0x01;
- skb->dev = sl->dev;
- skb->protocol = htons(ETH_P_X25);
- skb->mac.raw = skb->data;
- skb->pkt_type = PACKET_HOST;
-
+ skb->protocol = x25_type_trans(skb, sl->dev);
netif_rx(skb);
sl->dev->last_rx = jiffies;
}
ptr = skb_put(skb, 1);
*ptr = 0x02;
- skb->dev = sl->dev;
- skb->protocol = htons(ETH_P_X25);
- skb->mac.raw = skb->data;
- skb->pkt_type = PACKET_HOST;
-
+ skb->protocol = x25_type_trans(skb, sl->dev);
netif_rx(skb);
sl->dev->last_rx = jiffies;
}