vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / wan / lapbether.c
index c8f3187..7f2e365 100644 (file)
@@ -43,6 +43,8 @@
 #include <linux/lapb.h>
 #include <linux/init.h>
 
+#include <net/x25device.h>
+
 static char bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 
 /* If this number is made larger, check that the temporary string buffer
@@ -137,11 +139,7 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
        ptr  = skb->data;
        *ptr = 0x00;
 
-       skb->dev      = dev;
-       skb->protocol = htons(ETH_P_X25);
-       skb->mac.raw  = skb->data;
-       skb->pkt_type = PACKET_HOST;
-
+       skb->protocol = x25_type_trans(skb, dev);
        skb->dev->last_rx = jiffies;
        return netif_rx(skb);
 }
@@ -233,11 +231,7 @@ static void lapbeth_connected(struct net_device *dev, int reason)
        ptr  = skb_put(skb, 1);
        *ptr = 0x01;
 
-       skb->dev      = dev;
-       skb->protocol = htons(ETH_P_X25);
-       skb->mac.raw  = skb->data;
-       skb->pkt_type = PACKET_HOST;
-
+       skb->protocol = x25_type_trans(skb, dev);
        skb->dev->last_rx = jiffies;
        netif_rx(skb);
 }
@@ -255,11 +249,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
        ptr  = skb_put(skb, 1);
        *ptr = 0x02;
 
-       skb->dev      = dev;
-       skb->protocol = htons(ETH_P_X25);
-       skb->mac.raw  = skb->data;
-       skb->pkt_type = PACKET_HOST;
-
+       skb->protocol = x25_type_trans(skb, dev);
        skb->dev->last_rx = jiffies;
        netif_rx(skb);
 }