diff mbox

[6/7] bcmdhd: workaround broken AC video queue in IBSS mode

Message ID 1374259844-31432-1-git-send-email-ricardo.salveti@canonical.com
State New
Headers show

Commit Message

Ricardo Salveti de Araujo July 19, 2013, 6:50 p.m. UTC
From: Bruno Randolf <br1@einfach.org>

The BCM4330 has problems with the WME video (AC_VI) queue in IBSS mode. If we
put packets into this AC, the symptoms are excessive RTS/CTS, most packets get
lost and the device get's stuck and no more packets can be sent, even on other
queues.

Since the AC queue selection happens in the firmware based on the DSCP priority
and we don't know a way to configure this in the driver the workaround is to
simply downgrade all packets which would go into AC_VI (priority 4 and 5, TOS
0x80 and 0xa0) to AC_BE (priority 3 "Excellent Effort"). It's not pretty but
makes the device usable.

Change-Id: I8911c0eef7f189fc55547f02279e7012bc267d47
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>

 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/drivers/net/wireless/bcmdhd/bcmutils.c b/drivers/net/wireless/bcmdhd/bcmutils.c
index 6b578e6..b16acca 100644
--- a/drivers/net/wireless/bcmdhd/bcmutils.c
+++ b/drivers/net/wireless/bcmdhd/bcmutils.c
@@ -982,6 +982,11 @@  pktsetprio(void *pkt, bool update_vtag)
 		rc |= PKTPRIO_DSCP;
 	}
 
+	/* workaround for broken AC video queue on BCM4330:
+	 * downgrade video priority to best effort */
+	if (priority == 4 || priority == 5)
+		priority = 3;
+
 	ASSERT(priority >= 0 && priority <= MAXPRIO);
 	PKTSETPRIO(pkt, priority);
 	return (rc | priority);