]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Thu, 19 Jun 2008 23:00:04 +0000 (16:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jun 2008 23:00:04 +0000 (16:00 -0700)
Conflicts:

net/mac80211/tx.c

1  2 
drivers/net/atlx/atl1.c
drivers/net/sky2.c
net/mac80211/tx.c
net/netfilter/nf_conntrack_extend.c
net/unix/af_unix.c

Simple merge
Simple merge
index 195cb6dd02a0fd0f5a49e0cf3b66eb1b1ad0e0eb,c80d5899f27903c23080c419e808fddc323d521e..ce06e791bf43a7a11b5814be0bc4ef455b6d3c00
@@@ -1553,26 -1562,32 +1553,26 @@@ int ieee80211_subif_start_xmit(struct s
         * build in headroom in __dev_alloc_skb() (linux/skbuff.h) and
         * alloc_skb() (net/core/skbuff.c)
         */
 -      head_need = hdrlen + encaps_len + meshhdrlen + local->tx_headroom;
 -      head_need -= skb_headroom(skb);
 +      head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb);
  
 -      /* We are going to modify skb data, so make a copy of it if happens to
 -       * be cloned. This could happen, e.g., with Linux bridge code passing
 -       * us broadcast frames. */
 +      /*
 +       * So we need to modify the skb header and hence need a copy of
 +       * that. The head_need variable above doesn't, so far, include
 +       * the needed header space that we don't need right away. If we
 +       * can, then we don't reallocate right now but only after the
 +       * frame arrives at the master device (if it does...)
 +       *
 +       * If we cannot, however, then we will reallocate to include all
 +       * the ever needed space. Also, if we need to reallocate it anyway,
 +       * make it big enough for everything we may ever need.
 +       */
  
-       if (head_need > 0 || skb_header_cloned(skb)) {
+       if (head_need > 0 || skb_cloned(skb)) {
 -#if 0
 -              printk(KERN_DEBUG "%s: need to reallocate buffer for %d bytes "
 -                     "of headroom\n", dev->name, head_need);
 -#endif
 -
 -              if (skb_cloned(skb))
 -                      I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
 -              else
 -                      I802_DEBUG_INC(local->tx_expand_skb_head);
 -              /* Since we have to reallocate the buffer, make sure that there
 -               * is enough room for possible WEP IV/ICV and TKIP (8 bytes
 -               * before payload and 12 after). */
 -              if (pskb_expand_head(skb, (head_need > 0 ? head_need + 8 : 8),
 -                                   12, GFP_ATOMIC)) {
 -                      printk(KERN_DEBUG "%s: failed to reallocate TX buffer"
 -                             "\n", dev->name);
 +              head_need += IEEE80211_ENCRYPT_HEADROOM;
 +              head_need += local->tx_headroom;
 +              head_need = max_t(int, 0, head_need);
 +              if (ieee80211_skb_resize(local, skb, head_need, true))
                        goto fail;
 -              }
        }
  
        if (encaps_data) {
Simple merge
Simple merge