diff options
Diffstat (limited to 'drivers/isdn/i4l/isdn_net.c')
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 838b3734e2b6..aa83277aba74 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -872,7 +872,8 @@ typedef struct { | |||
872 | static void | 872 | static void |
873 | isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp) | 873 | isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp) |
874 | { | 874 | { |
875 | u_char *p = skb->nh.raw; /* hopefully, this was set correctly */ | 875 | /* hopefully, this was set correctly */ |
876 | const u_char *p = skb_network_header(skb); | ||
876 | unsigned short proto = ntohs(skb->protocol); | 877 | unsigned short proto = ntohs(skb->protocol); |
877 | int data_ofs; | 878 | int data_ofs; |
878 | ip_ports *ipp; | 879 | ip_ports *ipp; |
@@ -880,7 +881,7 @@ isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp) | |||
880 | 881 | ||
881 | addinfo[0] = '\0'; | 882 | addinfo[0] = '\0'; |
882 | /* This check stolen from 2.1.72 dev_queue_xmit_nit() */ | 883 | /* This check stolen from 2.1.72 dev_queue_xmit_nit() */ |
883 | if (skb->nh.raw < skb->data || skb->nh.raw >= skb->tail) { | 884 | if (p < skb->data || skb->network_header >= skb->tail) { |
884 | /* fall back to old isdn_net_log_packet method() */ | 885 | /* fall back to old isdn_net_log_packet method() */ |
885 | char * buf = skb->data; | 886 | char * buf = skb->data; |
886 | 887 | ||
@@ -1121,7 +1122,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev) | |||
1121 | if (!skb) | 1122 | if (!skb) |
1122 | return; | 1123 | return; |
1123 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { | 1124 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { |
1124 | int pullsize = (ulong)skb->nh.raw - (ulong)skb->data - ETH_HLEN; | 1125 | const int pullsize = skb_network_offset(skb) - ETH_HLEN; |
1125 | if (pullsize > 0) { | 1126 | if (pullsize > 0) { |
1126 | printk(KERN_DEBUG "isdn_net: Pull junk %d\n", pullsize); | 1127 | printk(KERN_DEBUG "isdn_net: Pull junk %d\n", pullsize); |
1127 | skb_pull(skb, pullsize); | 1128 | skb_pull(skb, pullsize); |
@@ -1366,7 +1367,7 @@ isdn_net_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
1366 | struct ethhdr *eth; | 1367 | struct ethhdr *eth; |
1367 | unsigned char *rawp; | 1368 | unsigned char *rawp; |
1368 | 1369 | ||
1369 | skb->mac.raw = skb->data; | 1370 | skb_reset_mac_header(skb); |
1370 | skb_pull(skb, ETH_HLEN); | 1371 | skb_pull(skb, ETH_HLEN); |
1371 | eth = eth_hdr(skb); | 1372 | eth = eth_hdr(skb); |
1372 | 1373 | ||
@@ -1786,7 +1787,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) | |||
1786 | } | 1787 | } |
1787 | skb->dev = ndev; | 1788 | skb->dev = ndev; |
1788 | skb->pkt_type = PACKET_HOST; | 1789 | skb->pkt_type = PACKET_HOST; |
1789 | skb->mac.raw = skb->data; | 1790 | skb_reset_mac_header(skb); |
1790 | #ifdef ISDN_DEBUG_NET_DUMP | 1791 | #ifdef ISDN_DEBUG_NET_DUMP |
1791 | isdn_dumppkt("R:", skb->data, skb->len, 40); | 1792 | isdn_dumppkt("R:", skb->data, skb->len, 40); |
1792 | #endif | 1793 | #endif |