mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[SK_BUFF]: Introduce skb_network_offset()
For the quite common 'skb->nh.raw - skb->data' sequence. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e7dd65dafd
commit
bbe735e424
18 changed files with 33 additions and 28 deletions
|
|
@ -1121,7 +1121,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
|
|||
if (!skb)
|
||||
return;
|
||||
if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
|
||||
int pullsize = (ulong)skb->nh.raw - (ulong)skb->data - ETH_HLEN;
|
||||
const int pullsize = skb_network_offset(skb) - ETH_HLEN;
|
||||
if (pullsize > 0) {
|
||||
printk(KERN_DEBUG "isdn_net: Pull junk %d\n", pullsize);
|
||||
skb_pull(skb, pullsize);
|
||||
|
|
|
|||
Loading…
Reference in a new issue