summaryrefslogtreecommitdiffstats
path: root/sys/dev/iwn
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-11-11 09:08:22 +0000
committeradrian <adrian@FreeBSD.org>2013-11-11 09:08:22 +0000
commit5c6a9c13c5db23bbfd599dcc3dfd4da68e2a9266 (patch)
tree724b25cf22bb17dbd67684ed56bf5b6c6ea7e207 /sys/dev/iwn
parente6130a175c24ed4203b592a777051df6c4a4ea19 (diff)
downloadFreeBSD-src-5c6a9c13c5db23bbfd599dcc3dfd4da68e2a9266.zip
FreeBSD-src-5c6a9c13c5db23bbfd599dcc3dfd4da68e2a9266.tar.gz
If A-MPDU transmission fails entirely, then no BA is received from the
NIC and pushed up to the driver. Unfortunately this means there's no rate control notification done. Thus, if the rate control code makes a decision that hits a crappy rate that can't succeed, the rate code would never lower the rate and packet loss would continue. So, fake some rate control notification in this case.
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r--sys/dev/iwn/if_iwn.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index d2f2677..add9a26 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -2987,12 +2987,24 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes,
DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);
-#ifdef NOT_YET
if (nframes == 1) {
- if ((*status & 0xff) != 1 && (*status & 0xff) != 2)
+ if ((*status & 0xff) != 1 && (*status & 0xff) != 2) {
+#ifdef NOT_YET
printf("ieee80211_send_bar()\n");
- }
#endif
+ /*
+ * If we completely fail a transmit, make sure a
+ * notification is pushed up to the rate control
+ * layer.
+ */
+ tap = sc->qid2tap[qid];
+ tid = tap->txa_tid;
+ wn = (void *)tap->txa_ni;
+ ni = tap->txa_ni;
+ ieee80211_ratectl_tx_complete(ni->ni_vap, ni,
+ IEEE80211_RATECTL_TX_FAILURE, &nframes, NULL);
+ }
+ }
bitmap = 0;
start = idx;
OpenPOWER on IntegriCloud