From ce589c7ae35a554323403ed9161b2c04a5b6007b Mon Sep 17 00:00:00 2001 From: mentor Date: Thu, 20 Mar 2008 03:27:24 +0000 Subject: [PATCH] Add node and SKB pointers to ath_buf in ath_mgtstart, so they are managed by the ath_buf logic. Also, remove unnecessary(?) comment. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3401 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ath/if_ath.c b/ath/if_ath.c index 130d5d6..5cb1f50 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -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; } -- 2.35.1