carl9170: fix AMPDU TX_CTL_REQ_TX_STATUS handling
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 21 Oct 2011 16:38:56 +0000 (18:38 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Nov 2011 19:23:12 +0000 (15:23 -0400)
Previously the driver did not care if TX_CTL_REQ_TX_STATUS
was set on aggregated frames or not and it would silently
drop successfully sent frames if possible [much like:
"no news is good news!"].

But, TX_CTL_REQ_TX_STATUS was invented for a reason and
no tx status report should ever be dropped if it is set.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/tx.c

index d20946939cd8cae0968abfb096dbe3321c0e63eb..59472e1605cd89779e06c299937ba950968b3daf 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);
                        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.
                         */
                }
        }