From patchwork Thu Oct 31 20:03:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gio--- via openwrt-devel X-Patchwork-Id: 1187696 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m8qpZIQK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4740ZB6H99z9sPj for ; Fri, 1 Nov 2019 09:37:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Subject: List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:Cc:From: List-Post:List-Id:Message-ID:MIME-Version:In-Reply-To:References:To:Date: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SIebDZ4mE+66SCbMuAjezQ+BcO1+xX1DA5vbpa3j8JM=; b=m8qpZIQKk2f53FpDviVpIPVGb K27VhCmirz+tZ3Q0oCXb35+3cmGxay58sOHc0Jo0oj7/DLqJ/VXT0+/YC7LfZmLoyWjF0gS4dGCbJ Tgj7SqZ7uhCPY8mhAgNV+hxRcES5i4Uud3tUpQ8KPaEA5daRytEBI6/siY1outGdaEN8yZZ201Fiv t2WUo9L+cyk6c1TJEh1DCjV/DiWrIZtqxLiAvEjBnEjjhNHSxSeSNlXSl3kqYTzgPK9SvftoWbaxf Xkcnmpcie1jIOIcF/CWgf1QYbUHm/zxQFZt6DUlh9hrGQqQD2TU6qU4D8/xgQKdVrdn3AXH7Byn5O fm3JycApg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQJ3t-0004zY-79; Thu, 31 Oct 2019 22:37:01 +0000 Date: Thu, 31 Oct 2019 20:03:39 -0000 To: "OpenWrtDevel" References: In-Reply-To: In-Reply-To: MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Kyle Copperfield via openwrt-devel From: gio--- via openwrt-devel Precedence: list Cc: =?iso-8859-1?q?=22Petr_=8Atetiar=22?= , Lorenzo Santina X-Mailman-Version: 2.1.29 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Kyle Copperfield List-Help: Subject: [OpenWrt-Devel] [PATCH v2] hostapd: add IEEE 802.11k support Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Enables radio resource management to be reported by hostapd to clients. Ref: https://github.com/lede-project/source/pull/1430 Co-developed-by: Lorenzo Santina Signed-off-by: Lorenzo Santina Signed-off-by: Kyle Copperfield --- package/network/services/hostapd/files/hostapd.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8da8539e8a..f0dc997e91 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -223,6 +223,8 @@ hostapd_common_add_bss_config() { config_add_int time_advertisement config_add_string time_zone + config_add_boolean ieee80211k rrm_neighbor_report rrm_beacon_report + config_add_boolean ieee80211r pmk_r1_push ft_psk_generate_local ft_over_ds config_add_int r0_key_lifetime reassociation_deadline config_add_string mobility_domain r1_key_holder @@ -489,6 +491,17 @@ hostapd_set_bss_options() { append bss_conf "bss_transition=$bss_transition" "$N" fi + json_get_vars ieee80211k + set_default ieee80211k 0 + if [ "$ieee80211k" -eq "1" ]; then + json_get_vars rrm_neighbor_report rrm_beacon_report + + set_default rrm_neighbor_report 1 + set_default rrm_beacon_report 1 + append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N" + append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N" + fi + if [ "$wpa" -ge "1" ]; then json_get_vars ieee80211r set_default ieee80211r 0