]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ath/carl9170/tx.c
carl9170: use ieee80211_free_txskb
[~andy/linux] / drivers / net / wireless / ath / carl9170 / tx.c
index d20946939cd8cae0968abfb096dbe3321c0e63eb..d19a9ee9d057a904577d9497435911bc2867e978 100644 (file)
@@ -296,7 +296,8 @@ static void carl9170_tx_release(struct kref *ref)
                        super = (void *)skb->data;
                        txinfo->status.ampdu_len = super->s.rix;
                        txinfo->status.ampdu_ack_len = super->s.cnt;
-               } else if (txinfo->flags & IEEE80211_TX_STAT_ACK) {
+               } else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&
+                          !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
                        /*
                         * drop redundant tx_status reports:
                         *
@@ -308,15 +309,17 @@ static void carl9170_tx_release(struct kref *ref)
                         *
                         * 3. minstrel_ht is picky, it only accepts
                         *    reports of frames with the TX_STATUS_AMPDU flag.
+                        *
+                        * 4. mac80211 is not particularly interested in
+                        *    feedback either [CTL_REQ_TX_STATUS not set]
                         */
 
-                       dev_kfree_skb_any(skb);
+                       ieee80211_free_txskb(ar->hw, skb);
                        return;
                } else {
                        /*
-                        * Frame has failed, but we want to keep it in
-                        * case it was lost due to a power-state
-                        * transition.
+                        * Either the frame transmission has failed or
+                        * mac80211 requested tx status.
                         */
                }
        }
@@ -1429,7 +1432,7 @@ void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 err_free:
        ar->tx_dropped++;
-       dev_kfree_skb_any(skb);
+       ieee80211_free_txskb(ar->hw, skb);
 }
 
 void carl9170_tx_scheduler(struct ar9170 *ar)