From patchwork Sun May 2 22:23:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1472927 X-Patchwork-Delegate: hauke@hauke-m.de 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.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=LO139O+3; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=vGBbdOfC; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4FYLQw1FCYz9s1l for ; Mon, 3 May 2021 08:30:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=KJsuvzHe2f6FQS2MhrALyYvadlttNn5NISTgojvDVSw=; b=LO139O+3L/Gqsnx+V5ugEmXSlU SNS7INRmx+srSdM0pdrRBH98BvccuczmgXjvDMfSTq0YmPpTf0f21AqmwqiBRxlZ8zP5HYiJVPity 371up9ZTIC4WKwFr3EyZXZtPhvQpLIp7AVFfkwU8lmUynZL2woOZolLl4x9GJDU9FKZI63rWw+BPz EFQXlqFdc8akwte1jBnHQv1nuKBABZ53skUNjlJHvlU70xFF2HXxg8mw6zVdctzXHs30m33f9mTMb k0HtG0HZmfqLhmMeWEDZlNhiucz3xnjN3RomwBPJzU9SbQP+lF2E1UTE8FD4BnjQeY3aUaiY2uPTT qrWD5shw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldKXw-00CcSz-Q5; Sun, 02 May 2021 22:27:00 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050::465:102]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldKVN-00CcK4-5F for openwrt-devel@lists.openwrt.org; Sun, 02 May 2021 22:24:07 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4FYLHL09xYzQjlj; Mon, 3 May 2021 00:23:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1619994234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9rZckBcjL0q4hVoMYAJSsWkxtt3gRmRRudv97mumPY8=; b=vGBbdOfCT+DFsQxXCtNxxxMc8UnSvh6pg56gxgOuPTpwti7vpg1xp9qhW7MuLMBp+6c8Uc hrRb93Imid70zNRDoIYX1pFoJ3A9mwplKHloT5E7fGAHCtxmxfByyZmen8Fp3QJ+jsxTFO iEZixXSzn1gBONgx1lhzZcPGXmdWlQ9LJ+1oJ4BcLKWpGFQKZyjpW9S2D9x01ll/pSzpJp U6QQDIt1KqWrUIr7/VRUlCF2ZTt9LQDdEYwzAFnZssYNCpTt21Im8BdUlj4x2+nim2URlN gKXCaWxkPjmM9ukyT4RQlD1+bnD6wiNbSJ0W6PdH9m0ZWhnoF7ozoM8dOsKbCA== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id xMxzoeV996rn; Mon, 3 May 2021 00:23:53 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: mail@david-bauer.net, Hauke Mehrtens Subject: [RFC PATCH] mac80211: use auto channel list by default Date: Mon, 3 May 2021 00:23:46 +0200 Message-Id: <20210502222346.165154-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: *** X-Rspamd-Score: 3.63 / 15.00 / 15.00 X-Rspamd-Queue-Id: 9E11B17FA X-Rspamd-UID: 1aaffd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210502_232405_492644_F1173C4E X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This change removes setting the channels property by default to the channel property if nothing else is specified. When hostapd detects a DFS alarm and it has to switch channels allow hostapd to switch to any channel in the frequency band if channels property is not specified. When we set channels to the same chan [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:0:0:465:102 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This change removes setting the channels property by default to the channel property if nothing else is specified. When hostapd detects a DFS alarm and it has to switch channels allow hostapd to switch to any channel in the frequency band if channels property is not specified. When we set channels to the same channel as the channel variable it will not switch channel, the interface will be deactivated and hostapd writes this error message: Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: DFS-NOP-FINISHED freq=5640 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5640 cf2=0 Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: interface state DFS->DFS Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: DFS-CAC-START freq=5580 chan=116 sec_chan=1, width=0, seg0=122, seg1=0, cac_time=60s Wed Feb 10 17:24:48 2021 daemon.err hostapd: 20/40 MHz: center segment 0 (=122) and center freq 1 (=5590) not in sync Wed Feb 10 17:24:48 2021 daemon.err hostapd: Can't set freq params Wed Feb 10 17:24:48 2021 daemon.err hostapd: DFS start_dfs_cac() failed, -1 With this patch hostapd will switch to any other channel and continue operating there when it received a DFS event. When the channels property was set nothing changes. Revert "mac80211: create channel list for fixed channel operation" This reverts commit cfd2f3bf6f4825b66e9a4ca9cba7c65b93eb89c7. Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 92c56afd24fd..d6be2ed76c36 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -111,9 +111,6 @@ mac80211_hostapd_setup_base() { json_get_values ht_capab_list ht_capab tx_burst json_get_values channel_list channels - [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \ - channel_list="$channel" - set_default noscan 0 [ "$noscan" -gt 0 ] && hostapd_noscan=1