From patchwork Thu May 11 06:56:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 760961 X-Patchwork-Delegate: nbd@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wNkTr1dK9z9sDB for ; Thu, 11 May 2017 16:58:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Jp9nfI8+"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=openmesh-com.20150623.gappssmtp.com header.i=@openmesh-com.20150623.gappssmtp.com header.b="nb03/bkX"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ym9OUCDht5rBCG4iPcc2CqZ8WQmqvjmhHq+YSPsiWQM=; b=Jp9nfI8+Nd79hs Fod+Qz2yNgaluvO2a5dYwz5/Donr8sFQSS8iAKJzLv6jjO1UhA6JV3MTe5V+Vad3MYDXoABledP0T 6gmFd/4X2VHSk7n5H0Al4qUSMgGFwDgCk2wpnE0JrSQ6J6F+gWI+RDPDEZDhPy60A6ixl2HT0/EYe KArYE4id3JWDEyyrpo0/NgwRfDsI/8SvJq9RnNHE7/rVWvTOk8vLyN6F0WxKzkbEJKWtS7KFlcCgM 5j6UEiUGp6CRiY8pMVYdPvcxUVLyTaKRDCMnTJHVKp18SNSBpygnbD4ZgnPz5iHz4RIxM/Qs8Cmcb C/K6V5keQxFuKCAH6Mvg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d8i3C-0001lP-0p; Thu, 11 May 2017 06:58:14 +0000 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d8i2m-0001is-Sq for lede-dev@lists.infradead.org; Thu, 11 May 2017 06:57:51 +0000 Received: by mail-wr0-x231.google.com with SMTP id w50so12557622wrc.0 for ; Wed, 10 May 2017 23:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openmesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=4ihFpVnXxjtBmx/kJDBDug3qIpjoMYwNS1VjLymxipg=; b=nb03/bkX9CfJOYG2sdzNTper5qsoJmC5u683kkVU7Mxy7KnJ8tI/AnfNtO8H1w4Vzk tMr1kk+pld5jB2VBi5vi4ERvQejQmQCvEosAsAz1i4Zsmk7CNoKm3zNQ0fVF4iDU4J1x imKCUzRrAIDSf9EXKqErKBlwkjPuqMv0VMnNj4EO5ChWqvfn46RQa5qYXJCDqcbYQfFP zyB8Ea6NxemXzB2rxTpKmgw4Z8biAmPXDzQIcp/u9lYwZFrJK7Lp+1CWM41CGKzcLEAW 9pFepeTgUBCFpQZD+FztnyR85JoYIKYKYpkIrOM/Cu1ckkgbPLv4OUpiVYQqxTjSfCra tP5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4ihFpVnXxjtBmx/kJDBDug3qIpjoMYwNS1VjLymxipg=; b=izd4TnoxSjGqlSiq1qp1Uya9mPSw2zgHqs7+4AAGidPcjtgpqxHZfZsE7jLmeq5i/e 8bQeoNOEDi4mllrRwaP51u7rmDu8KjNBQZrHmRA+Awx+zMMdhGzmPuy/WenrRjDNg6u2 NimHeda8m142v4GixO0PyZaFMMGr0Uts/io0LZ6yMIzFlvVdgQggriYVu1I8glukzYgP doJkN99HNdJc9L1ZOZjDdLmQDiSvPutqIDqVrrREc3K1yqu9iSG+xvYFOWOFGWMbZx2m CbSs6XC6p65OuhkjFjpDhjnNxHgaRHRzdNmOTdVktt3ucTF9sCJMzmF3VgZiHBLgwaUK eqgA== X-Gm-Message-State: AODbwcDJ+r8/24tlPEwCMOXXHJ/OXXgh3KQeJiIeahr9yN/ihUaFk0O5 Nph4S051/hckMIen X-Received: by 10.223.152.6 with SMTP id v6mr6037631wrb.60.1494485846460; Wed, 10 May 2017 23:57:26 -0700 (PDT) Received: from sven-desktop.home.narfation.org (p2003007C6F60E8FE527B9DFFFECE2683.dip0.t-ipconnect.de. [2003:7c:6f60:e8fe:527b:9dff:fece:2683]) by smtp.gmail.com with ESMTPSA id l81sm6157308wmi.22.2017.05.10.23.57.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 May 2017 23:57:25 -0700 (PDT) From: Sven Eckelmann To: lede-dev@lists.infradead.org Date: Thu, 11 May 2017 08:56:50 +0200 Message-Id: <20170511065650.29522-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170510_235749_154584_B0158D17 X-CRM114-Status: GOOD ( 13.01 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c:0:0:0:231 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [LEDE-DEV] [PATCH] hostapd: set mcast_rate in mesh mode X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sven Eckelmann , Sven Eckelmann MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Sven Eckelmann The wpa_supplicant code for IBSS allows to set the mcast rate. It is recommended to increase this value from 1 or 6 Mbit/s to something higher when using a mesh protocol on top which uses the multicast packet loss as indicator for the link quality. This setting was unfortunately not applied for mesh mode. But it would be beneficial when wpa_supplicant would behave similar to IBSS mode and set this argument during mesh join like authsae already does. At least it is helpful for companies/projects which are currently switching to 802.11s (without mesh_fwding and with mesh_ttl set to 1) as replacement for IBSS because newer drivers seem to support 802.11s but not IBSS anymore. Signed-off-by: Sven Eckelmann Tested-by: Simon Wunderlich --- .../patches/463-add-mcast_rate-to-11s.patch | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch new file mode 100644 index 0000000000..9cf9d51ff7 --- /dev/null +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -0,0 +1,68 @@ +From: Sven Eckelmann +Date: Thu, 11 May 2017 08:21:45 +0200 +Subject: [PATCH] set mcast_rate in mesh mode + +The wpa_supplicant code for IBSS allows to set the mcast rate. It is +recommended to increase this value from 1 or 6 Mbit/s to something higher +when using a mesh protocol on top which uses the multicast packet loss as +indicator for the link quality. + +This setting was unfortunately not applied for mesh mode. But it would be +beneficial when wpa_supplicant would behave similar to IBSS mode and set +this argument during mesh join like authsae already does. At least it is +helpful for companies/projects which are currently switching to 802.11s +(without mesh_fwding and with mesh_ttl set to 1) as replacement for IBSS +because newer drivers seem to support 802.11s but not IBSS anymore. + +Signed-off-by: Sven Eckelmann +Tested-by: Simon Wunderlich + +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -1230,6 +1230,7 @@ struct wpa_driver_mesh_join_params { + #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004 + #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 + unsigned int flags; ++ int mcast_rate; + }; + + /** +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -8764,6 +8764,18 @@ static int nl80211_put_mesh_id(struct nl + } + + ++static int nl80211_put_mcast_rate(struct nl_msg *msg, int mcast_rate) ++{ ++ if (mcast_rate > 0) { ++ wpa_printf(MSG_DEBUG, " * mcast_rate=%.1f", ++ (double)mcast_rate / 10); ++ return nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, mcast_rate); ++ } ++ ++ return 0; ++} ++ ++ + static int nl80211_put_mesh_config(struct nl_msg *msg, + struct wpa_driver_mesh_bss_params *params) + { +@@ -8819,6 +8831,7 @@ static int nl80211_join_mesh(struct i802 + nl80211_put_basic_rates(msg, params->basic_rates) || + nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || + nl80211_put_beacon_int(msg, params->beacon_int) || ++ nl80211_put_mcast_rate(msg, params->mcast_rate) || + nl80211_put_dtim_period(msg, params->dtim_period)) + goto fail; + +--- a/wpa_supplicant/mesh.c ++++ b/wpa_supplicant/mesh.c +@@ -380,6 +380,7 @@ int wpa_supplicant_join_mesh(struct wpa_ + os_memset(¶ms, 0, sizeof(params)); + params.meshid = ssid->ssid; + params.meshid_len = ssid->ssid_len; ++ params.mcast_rate = ssid->mcast_rate; + ibss_mesh_setup_freq(wpa_s, ssid, ¶ms.freq); + wpa_s->mesh_ht_enabled = !!params.freq.ht_enabled; + wpa_s->mesh_vht_enabled = !!params.freq.vht_enabled;