From patchwork Tue Nov 24 17:17:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 548179 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2581C1401E7 for ; Wed, 25 Nov 2015 04:17:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=open-mesh-com.20150623.gappssmtp.com header.i=@open-mesh-com.20150623.gappssmtp.com header.b=0wt4m/gp; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D9C20284502; Tue, 24 Nov 2015 18:15:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 67604281573 for ; Tue, 24 Nov 2015 18:15:12 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 24 Nov 2015 18:15:12 +0100 (CET) Received: by wmvv187 with SMTP id v187so220172735wmv.1 for ; Tue, 24 Nov 2015 09:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=iUxLMxrPh9phaQI2UWlKVZ5+XxNb0+N3b3zfdYGZCY8=; b=0wt4m/gpPYCULhI94FRFt8EA1bVr0pxnfwKZT0Jg4FdIQLZnVmlDsbPHSR5ulgZ6xV F0etqX+j97g87nHfyz8YatwybFpxmy901XCMCn2cqKMNzgixBkhZSPEviTVLrUkE5Dt/ uo0rU3r+EMneD/tpRg2daOr+c2ZVB8or6F2E36Pao8eGcOP92StrtOQ8sXxWFUux+FEP 9mVuuWSgTJOyLwwXLml/jKcdVSaHTgPg9RzpbUMuStrmsqv1AhmVWQ6Dh7JB7DjYms5Z EfGFENQGCXDvbiLA9BDBqI3XYKwuvdgEBRaFlcpGayqD2QEzk/ZWkMs3ezYa8Asu+kBC AFMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iUxLMxrPh9phaQI2UWlKVZ5+XxNb0+N3b3zfdYGZCY8=; b=hCJHCwY6rD5sT7mcYH8ZRVQz7wa5LasrWKHV0Pk2Hwamv1UByUmTlqqWiyFQNUXqSA /DyoV34iuG6r9nlZTyEKJVoRnRsOBbfzizRJHd1o1kSlbR6ShIDimiUCKGCCoJFtJYRi kmRf6nLuEmllC6Xc6AcjwyfIk7NXkv/1r2JbiWMeunHeF+E9N0bTHW8wZu6mX/ZI/v2b ibyBKysE1r02nMKX91RSQYDsuWKwwWnB5sSuqP7yB1qI5Gs+AnhR52kYERZ0ruMQPrYs JBduewLzFwYjy4mWgvTVTqL08WOXy9wO3YnQ93AxPiQOMM0NlF2NPTs9gpTgPAe/wDZ/ 6QVw== X-Gm-Message-State: ALoCoQksZI4S2Seljg3EJx6Cl0tQ2l+ki6uu6LZlGJjUZ+bHmHIambOZNTlh8MCjcI4uy8LcNn9J X-Received: by 10.28.125.201 with SMTP id y192mr25104515wmc.23.1448385435263; Tue, 24 Nov 2015 09:17:15 -0800 (PST) Received: from sven-desktop.home.narfation.org (x4d0d5f44.dyn.telefonica.de. [77.13.95.68]) by smtp.gmail.com with ESMTPSA id bg10sm19132919wjb.46.2015.11.24.09.17.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 09:17:14 -0800 (PST) From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Date: Tue, 24 Nov 2015 18:17:03 +0100 Message-Id: <1448385423-24235-1-git-send-email-sven@open-mesh.com> X-Mailer: git-send-email 2.6.2 Cc: Sven Eckelmann Subject: [OpenWrt-Devel] [PATCH v2] authsae: Use kbit/s as mcast_rate unit like wpad X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" The OpenWrt wireless configuration for mcast_rate is defined as Kbit/s when using wpa_supplicant for IBSS/802.11s and iw for unencrypted IBSS/802.11s. But when using authsae, the unit for the same option is redefined as Mbit/s. Better use the same unit for this option independent of the backend which is used. Old values for mcast_rate (< 1000) are still interpreted Mbit/s to avoid problems during upgrades from older versions. Signed-off-by: Sven Eckelmann --- v2: Interpret values < 1000 still as mbit/s package/network/services/authsae/files/lib/wifi/authsae.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package/network/services/authsae/files/lib/wifi/authsae.sh b/package/network/services/authsae/files/lib/wifi/authsae.sh index 6582a35..75be48e 100644 --- a/package/network/services/authsae/files/lib/wifi/authsae.sh +++ b/package/network/services/authsae/files/lib/wifi/authsae.sh @@ -6,7 +6,7 @@ authsae_start_interface() { local ret=1 json_get_vars mcast_rate mesh_id - set_default mcast_rate "12" + set_default mcast_rate "12000" case "$htmode" in HT20|HT40+|HT40-) mesh_htmode="$htmode";; @@ -18,6 +18,14 @@ authsae_start_interface() { *a*) mesh_band=11a;; esac + if [ "$mcast_rate" -gt 1000 ]; then + # authsae only allows integers as rates and not things like 5.5 + mcval=$(($mcast_rate / 1000)) + else + # compat: to still support mbit/s rates + mcval="$mcast_rate" + fi + cat > "$authsae_conf_file" <