X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwan%2Fhdlc_x25.c;h=07e5eef1fe0f4e3b009e6fa64f1b52f5553bc3c7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=5231063c9d64c9b7c66008c121e1eb83ef017e47;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index 5231063c9..07e5eef1f 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -23,6 +23,8 @@ #include #include +#include + /* These functions are callbacks called by LAPB layer */ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) @@ -38,11 +40,7 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) ptr = skb_put(skb, 1); *ptr = code; - 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); netif_rx(skb); } @@ -74,11 +72,7 @@ static int x25_data_indication(struct net_device *dev, struct sk_buff *skb) ptr = skb->data; *ptr = 0; - 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); return netif_rx(skb); }