ar8216: set the pvid based on runtime state instead of port number to fix learning...
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.3 / 654-avoid_skb_cow_realloc.patch
index dfa98198ed595fed5506e357dbad354ca7871e6b..5b2537127f63f4519b925b1f1de3e1d03fea3e1b 100644 (file)
        if (headroom < NET_SKB_PAD)
 -              headroom = NET_SKB_PAD;
 -      if (headroom > skb_headroom(skb))
+-              delta = headroom - skb_headroom(skb);
 +              alloc_headroom = NET_SKB_PAD;
 +      if (headroom > skb_headroom(skb) ||
 +          (cloned && alloc_headroom > skb_headroom(skb))) {
-               delta = headroom - skb_headroom(skb);
++              delta = alloc_headroom - skb_headroom(skb);
 +      }
  
        if (delta || cloned)