From patchwork Mon Sep 9 18:49:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 273651 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id E54C22C00AD for ; Tue, 10 Sep 2013 04:50:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BF0E59C165; Mon, 9 Sep 2013 14:49:59 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IdOSgKAeUjO5; Mon, 9 Sep 2013 14:49:59 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4EC919C153; Mon, 9 Sep 2013 14:49:54 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8B39C9C142 for ; Mon, 9 Sep 2013 14:49:52 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8QGNW7U2bh4N for ; Mon, 9 Sep 2013 14:49:46 -0400 (EDT) Received: from ns3.lanforge.com (mail.candelatech.com [208.74.158.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 439D89C153 for ; Mon, 9 Sep 2013 14:49:39 -0400 (EDT) Received: from localhost.localdomain (firewall.candelatech.com [70.89.124.249]) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id r89InBGo008097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Sep 2013 11:49:12 -0700 From: greearb@candelatech.com To: hostap@lists.shmoo.com Subject: [PATCH 1/2] supplicant: Use high-priority queue for management packets. Date: Mon, 9 Sep 2013 11:49:04 -0700 Message-Id: <1378752545-9783-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.3.4 Cc: Ben Greear X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Ben Greear Without this patch, wpa_supplicant EAPOL packets (at least) are sent on normal best-effort TX queue. I believe they should be on the VO high-priority queue instead. Signed-hostap: Ben Greear Signed-off-by: Ben Greear --- :100644 100644 1419830... cf2a7cc... M src/l2_packet/l2_packet_linux.c src/l2_packet/l2_packet_linux.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/l2_packet/l2_packet_linux.c b/src/l2_packet/l2_packet_linux.c index 1419830..cf2a7cc 100644 --- a/src/l2_packet/l2_packet_linux.c +++ b/src/l2_packet/l2_packet_linux.c @@ -97,6 +97,7 @@ struct l2_packet_data * l2_packet_init( struct l2_packet_data *l2; struct ifreq ifr; struct sockaddr_ll ll; + int val = (256 + 7); l2 = os_zalloc(sizeof(struct l2_packet_data)); if (l2 == NULL) @@ -146,6 +147,18 @@ struct l2_packet_data * l2_packet_init( } os_memcpy(l2->own_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); + + /* Use high-priority queue for management packets + * http://wireless.kernel.org/en/developers/Documentation/mac80211/queues + */ + if (setsockopt(l2->fd, SOL_SOCKET, + SO_PRIORITY, (char*)&val, sizeof(val)) < 0) { + /* Carry on...this is not fatal. */ + wpa_printf(MSG_DEBUG, + "l2_packet: sock priority sockopt (%i) failed\n", + val); + } + eloop_register_read_sock(l2->fd, l2_packet_receive, l2, NULL); return l2;