From patchwork Tue Jun 30 12:19:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Theil X-Patchwork-Id: 1319822 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tu-ilmenau.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=0lYd/2sv; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 49x3N74JtQz9sR4 for ; Tue, 30 Jun 2020 22:20:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bDBGTV1nCfHgbTooURwlCv3dvWNSAV/Wqgpw+GArOI8=; b=0lYd/2svTBSmk2VHGsZelopiR unVBmxDh7grKXZyuL9iwaSStSGHf9aeAzC2WbEzIvI3VEsEenJsW86L1UQSFbTpGp7QHjlRvAKweM pQmtPB0k8KvYZq6ghfnzgBKa7t0Myd9VW4bSMHgRtfczaTf41tSqwlVuYqJ2ELDigOsgdX2bgK/js AxCzT6JyYfIT1303YJ5Cmv8bz03QfuylET5npWiH5VWg/GQqflKoWlKiTv4iUBAPpowkhWeIQdX/L 1m+HWGGkBsV90s4mjPBWCP/vLAoxp1osVbVFwWFMi8TNC8xcFKbUOmH1Hel5zQyISboCiBB0oNzhh HkWPBigEQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqFEc-000318-3H; Tue, 30 Jun 2020 12:19:34 +0000 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqFES-0002yK-LM for hostap@lists.infradead.org; Tue, 30 Jun 2020 12:19:25 +0000 Received: from legolas.prakinf.tu-ilmenau.de (unknown [141.24.207.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 7AE61580087; Tue, 30 Jun 2020 14:19:21 +0200 (CEST) From: Markus Theil To: hostap@lists.infradead.org Subject: [PATCH v2 06/12] mesh: inform kernel driver DFS handler in userspace Date: Tue, 30 Jun 2020 14:19:01 +0200 Message-Id: <20200630121907.132751-7-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630121907.132751-1-markus.theil@tu-ilmenau.de> References: <20200630121907.132751-1-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [141.24.186.67 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: masashi.honma@gmail.com, Peter Oh Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Peter Oh NL80211_ATTR_HANDLE_DFS is required by kerenel space to enable DFS channels that indicates DFS handler resides in userspace. Signed-off-by: Peter Oh --- src/drivers/driver.h | 1 + src/drivers/driver_nl80211.c | 3 +++ wpa_supplicant/mesh.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index cb412cbfe..e4102b31b 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1543,6 +1543,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; + u8 handle_dfs; }; struct wpa_driver_set_key_params { diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 3a91c7c70..d922eda74 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -10168,6 +10168,9 @@ static int nl80211_join_mesh(struct i802_bss *bss, wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags); + if (params->handle_dfs) + if (nla_put_flag(msg, NL80211_ATTR_HANDLE_DFS)) + goto fail; container = nla_nest_start(msg, NL80211_ATTR_MESH_SETUP); if (!container) goto fail; diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index 15c285812..c350e762b 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -355,6 +355,7 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s, conf->country[0] = wpa_s->conf->country[0]; conf->country[1] = wpa_s->conf->country[1]; conf->country[2] = ' '; + wpa_s->mesh_params->handle_dfs = 1; } bss->iconf = conf;