Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

carl9170: fix AMPDU TX_CTL_REQ_TX_STATUS handling

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>

authored by

Christian Lamparter and committed by
John W. Linville
94d55d62 fd26981c

+7 -4
+7 -4
drivers/net/wireless/ath/carl9170/tx.c
··· 296 296 super = (void *)skb->data; 297 297 txinfo->status.ampdu_len = super->s.rix; 298 298 txinfo->status.ampdu_ack_len = super->s.cnt; 299 - } else if (txinfo->flags & IEEE80211_TX_STAT_ACK) { 299 + } else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) && 300 + !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) { 300 301 /* 301 302 * drop redundant tx_status reports: 302 303 * ··· 309 308 * 310 309 * 3. minstrel_ht is picky, it only accepts 311 310 * reports of frames with the TX_STATUS_AMPDU flag. 311 + * 312 + * 4. mac80211 is not particularly interested in 313 + * feedback either [CTL_REQ_TX_STATUS not set] 312 314 */ 313 315 314 316 dev_kfree_skb_any(skb); 315 317 return; 316 318 } else { 317 319 /* 318 - * Frame has failed, but we want to keep it in 319 - * case it was lost due to a power-state 320 - * transition. 320 + * Either the frame transmission has failed or 321 + * mac80211 requested tx status. 321 322 */ 322 323 } 323 324 }