1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c 2008-02-20 18:10:52.499506168 +0100
4 +++ madwifi-trunk-r3314/ath/if_ath.c 2008-02-20 18:10:52.731519391 +0100
5 @@ -3315,17 +3315,18 @@
6 * without affecting any other bridge ports. */
8 /* Remember the original SKB so we can free up our references */
9 - struct sk_buff *skb_orig = skb;
10 - skb = skb_copy(skb, GFP_ATOMIC);
12 + struct sk_buff *skb_new;
13 + skb_new = skb_copy(skb, GFP_ATOMIC);
14 + if (skb_new == NULL) {
15 DPRINTF(sc, ATH_DEBUG_XMIT,
16 "Dropping; skb_copy failure.\n");
17 /* No free RAM, do not requeue! */
20 - ieee80211_skb_copy_noderef(skb_orig, skb);
21 - ieee80211_dev_kfree_skb(&skb_orig);
23 + ieee80211_skb_copy_noderef(skb, skb_new);
24 + ieee80211_dev_kfree_skb(&skb);
27 eh = (struct ether_header *)skb->data;
30 @@ -3591,11 +3592,13 @@
32 error = ath_tx_start(dev, SKB_CB(skb)->ni, bf, skb, 0);
37 sc->sc_stats.ast_tx_mgmt++;
41 + ieee80211_dev_kfree_skb(&skb);
42 ath_return_txbuf(sc, &bf);