[PATCH 2/2] hostapd: Use high-priority queue for management packets.
greearb at candelatech.com
greearb
Mon Sep 9 11:49:05 PDT 2013
From: Ben Greear <greearb at candelatech.com>
Without this patch, wpa_supplicant EAPOL packets (at least)
are sent on normal best-effort TX queue when using the new
Linux tx-status-completion API. I believe they should be on
the VO high-priority queue instead.
Signed-hostap: Ben Greear <greearb at candelatech.com>
Signed-off-by: Ben Greear <greearb at candelatech.com>
---
:100644 100644 b643b3f... f4102ab... M src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b643b3f..f4102ab 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3658,10 +3658,22 @@ static void * wpa_driver_nl80211_init(void *ctx, const char *ifname,
goto failed;
if (drv->data_tx_status) {
- int enabled = 1;
+ int val = (256 + 7);
+ /* Use high-priority queue for EAPOL packets
+ * http://wireless.kernel.org/en/developers/Documentation/mac80211/queues
+ */
+ if (setsockopt(drv->eapol_tx_sock, SOL_SOCKET,
+ SO_PRIORITY, (char*)&val, sizeof(val)) < 0) {
+ /* Carry on...this is not fatal. */
+ wpa_printf(MSG_DEBUG,
+ "nl80211: eapol sock priority sockopt (%i) failed\n",
+ val);
+ }
+
+ val = 1;
if (setsockopt(drv->eapol_tx_sock, SOL_SOCKET, SO_WIFI_STATUS,
- &enabled, sizeof(enabled)) < 0) {
+ &val, sizeof(val)) < 0) {
wpa_printf(MSG_DEBUG,
"nl80211: wifi status sockopt failed\n");
drv->data_tx_status = 0;
--
1.7.3.4
More information about the Hostap
mailing list