From patchwork Mon Nov 28 15:38:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 700026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tS9pp71Dmz9vG0 for ; Tue, 29 Nov 2016 02:39:46 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cBO1g-000873-Nf; Mon, 28 Nov 2016 15:39:28 +0000 Received: from s3.sipsolutions.net ([5.9.151.49] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cBO1Y-0007su-D1 for hostap@lists.infradead.org; Mon, 28 Nov 2016 15:39:22 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.88) (envelope-from ) id 1cBO17-0006vJ-Bs; Mon, 28 Nov 2016 16:38:53 +0100 From: Benjamin Berg To: hostap@lists.infradead.org Subject: [RFC 1/6] mesh: Enable DFS on mesh hostapd interface Date: Mon, 28 Nov 2016 16:38:38 +0100 Message-Id: <20161128153843.3179-2-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161128153843.3179-1-benjamin@sipsolutions.net> References: <20161128153843.3179-1-benjamin@sipsolutions.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161128_073920_731999_CB4155B5 X-CRM114-Status: UNSURE ( 6.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [5.9.151.49 listed in list.dnswl.org] -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Dr . Pannirselvam Kanagaratnam" , Benjamin Berg , Simon Wunderlich MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Enable 80211h and 80211d if a DFS channel was selected and the country has been configured. This is similar to wpa_supplicant AP mode. Signed-off-by: Benjamin Berg --- wpa_supplicant/mesh.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index d67d3b2..70069bf 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -210,6 +210,13 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s, goto out_free; ifmsh->mconf = mconf; + if (ieee80211_is_dfs(ssid->frequency) && wpa_s->conf->country[0]) { + conf->ieee80211h = 1; + conf->ieee80211d = 1; + conf->country[0] = wpa_s->conf->country[0]; + conf->country[1] = wpa_s->conf->country[1]; + } + /* need conf->hw_mode for supported rates. */ conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency, &conf->channel); if (conf->hw_mode == NUM_HOSTAPD_MODES) {