Add node and SKB pointers to ath_buf in ath_mgtstart, so they are managed by the...
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 20 Mar 2008 03:27:24 +0000 (03:27 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 20 Mar 2008 03:27:24 +0000 (03:27 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3401 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c

index 130d5d65c7afed0898a91719a33d37531a3ff9ad..5cb1f50c5b869ee2a104580bbfdf7fd2d43e4db6 100644 (file)
@@ -3542,22 +3542,19 @@ ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb)
                goto bad;
        }
 
-       /*
-        * NB: the referenced node pointer is in the
-        * control block of the sk_buff.  This is
-        * placed there by ieee80211_mgmt_output because
-        * we need to hold the reference with the frame.
-        */
+       bf->bf_node = ieee80211_ref_node(SKB_CB(skb)->ni);
+       bf->bf_skb = skb;
+
        error = ath_tx_start(dev, SKB_CB(skb)->ni, bf, skb, 0);
-       if (error)
-               goto bad;
+       if (error) {
+               ath_return_txbuf(sc, &bf);
+               return error;
+       }
 
        sc->sc_stats.ast_tx_mgmt++;
        return 0;
 bad:
-       if (skb)
-               ieee80211_dev_kfree_skb(&skb);
-       ath_return_txbuf(sc, &bf);
+       ieee80211_dev_kfree_skb(&skb);
        return error;
 }