diff options
author | Paul Mackerras <paulus@samba.org> | 2007-04-29 22:38:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-29 22:38:01 -0400 |
commit | 49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch) | |
tree | 253801ebf57e0a23856a2c7be129c2c178f62fdf /drivers/isdn/i4l | |
parent | 34f6d749c0a328817d5e36274e53121c1db734dc (diff) | |
parent | b9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff) |
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 11 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_ppp.c | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 9c926e41b114..c97330b19877 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -829,7 +829,7 @@ isdn_readbchan(int di, int channel, u_char * buf, u_char * fp, int len, wait_que | |||
829 | dflag = 0; | 829 | dflag = 0; |
830 | } | 830 | } |
831 | count_put = count_pull; | 831 | count_put = count_pull; |
832 | memcpy(cp, skb->data, count_put); | 832 | skb_copy_from_linear_data(skb, cp, count_put); |
833 | cp += count_put; | 833 | cp += count_put; |
834 | len -= count_put; | 834 | len -= count_put; |
835 | #ifdef CONFIG_ISDN_AUDIO | 835 | #ifdef CONFIG_ISDN_AUDIO |
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 |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 1b2df80c3bce..387392cb3d68 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -1100,7 +1100,8 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff | |||
1100 | goto drop_packet; | 1100 | goto drop_packet; |
1101 | } | 1101 | } |
1102 | skb_put(skb, skb_old->len + 128); | 1102 | skb_put(skb, skb_old->len + 128); |
1103 | memcpy(skb->data, skb_old->data, skb_old->len); | 1103 | skb_copy_from_linear_data(skb_old, skb->data, |
1104 | skb_old->len); | ||
1104 | if (net_dev->local->ppp_slot < 0) { | 1105 | if (net_dev->local->ppp_slot < 0) { |
1105 | printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", | 1106 | printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", |
1106 | __FUNCTION__, net_dev->local->ppp_slot); | 1107 | __FUNCTION__, net_dev->local->ppp_slot); |
@@ -1167,7 +1168,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff | |||
1167 | mlp->huptimer = 0; | 1168 | mlp->huptimer = 0; |
1168 | #endif /* CONFIG_IPPP_FILTER */ | 1169 | #endif /* CONFIG_IPPP_FILTER */ |
1169 | skb->dev = dev; | 1170 | skb->dev = dev; |
1170 | skb->mac.raw = skb->data; | 1171 | skb_reset_mac_header(skb); |
1171 | netif_rx(skb); | 1172 | netif_rx(skb); |
1172 | /* net_dev->local->stats.rx_packets++; done in isdn_net.c */ | 1173 | /* net_dev->local->stats.rx_packets++; done in isdn_net.c */ |
1173 | return; | 1174 | return; |
@@ -1902,7 +1903,9 @@ void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1902 | while( from != to ) { | 1903 | while( from != to ) { |
1903 | unsigned int len = from->len - MP_HEADER_LEN; | 1904 | unsigned int len = from->len - MP_HEADER_LEN; |
1904 | 1905 | ||
1905 | memcpy(skb_put(skb,len), from->data+MP_HEADER_LEN, len); | 1906 | skb_copy_from_linear_data_offset(from, MP_HEADER_LEN, |
1907 | skb_put(skb,len), | ||
1908 | len); | ||
1906 | frag = from->next; | 1909 | frag = from->next; |
1907 | isdn_ppp_mp_free_skb(mp, from); | 1910 | isdn_ppp_mp_free_skb(mp, from); |
1908 | from = frag; | 1911 | from = frag; |