Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / wan / lapbether.c
index c8f3187..6c302e9 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
@@ -84,7 +86,7 @@ static __inline__ int dev_is_ethdev(struct net_device *dev)
 /*
  *     Receive a LAPB frame via an ethernet interface.
  */
-static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype)
+static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev)
 {
        int len, err;
        struct lapbethdev *lapbeth;
@@ -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);
 }