From patchwork Tue Jul 10 09:44:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 10516691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8EA38600CA for ; Tue, 10 Jul 2018 09:45:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D18C286EE for ; Tue, 10 Jul 2018 09:45:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7106F28999; Tue, 10 Jul 2018 09:45:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B676D28737 for ; Tue, 10 Jul 2018 09:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=s+l1owYwAlNeTTzC9Rr6nctU5qqZI3MbMPvuF7Z47hY=; b=f64 uyf8KDrTl9gN+AY+CYWvAjQJ2ChwrjeZ6Zico3DKKudQxO8M68RfioB6OuidumyTjPfg3LdwZR8hj /GXHxDTrAc7aRe2XWgrgcLYurQpqWagbdOZqqgGy9OdKTUujDqftOpAxLCv0dVtr3x26wf1dCUwSI beQUMk0b+U7jf0yt3tgbMQkCn23+DH0bjoBLL7SQRLwFAx78B9opHxc5IrQhmmqzKaDwQIQimbNu+ +1qKIwUlO61z8Ikgeu81VuLH2gFJ6K+XEGW6+L4J26D29Gk0Da49EXxXKMdPXWTm1MFm2xFGdtlEB P5LOWTuz6J2aMVsPnQ8PIQQSvWA9YYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcpD1-0002Wp-H2; Tue, 10 Jul 2018 09:45:23 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcpCy-0002Jg-La for ath10k@lists.infradead.org; Tue, 10 Jul 2018 09:45:22 +0000 Received: by mail-wm0-x242.google.com with SMTP id n17-v6so23629833wmh.2 for ; Tue, 10 Jul 2018 02:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openmesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=TjEQo42/7YUlyZHLsP0aiOqpFQuJbm0dSKmej2ePr64=; b=eJmdb2fVEyQr7YIasKYZUTbMgCoIzy+Dm/8bzvGfwmQZYgdoTFPhVc0JWBsfuOxeH/ mjdwePoZPjAnE1jrKLabwQIph7sfFJVWNld72n80Ti2BTjDsXqJ2RVyXiDfQ04KZ9BPI SYyCQM7KRwhkalvj/ZyqPwBNOa+HVhPUDP310QxnT/BukSRo7nx1LJCpKyJ4KoZRzoa2 +R/f2j6l4kGX0UlkNzbwSruhxhu+tqcudGbFrgJ7sR9bnMTtyYBFU9y2LkyBwIulT8Wa B6FuJszdd5VY9VoxhIdg5QeiwBT6fkPvdlXTcyiQcOii2o9wP5wuZ26qEXH+XgEFTUIx QGsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TjEQo42/7YUlyZHLsP0aiOqpFQuJbm0dSKmej2ePr64=; b=BxOhjJW0fBRue2n2HYmucYlqT1cJPchyMw/uOphF8ANm6IX5pd/Gxe1U998jnVeho1 W0vSKLdVqlFngPD0d38Q1k7t8zc9RCwnY/WAcDgq6OYM0p/ruBVvi1Z4Am/KkgZfocLe AHs5Wx0tarLtwzVg9q3C0bKSl6mzKp4ySS8iSATZUdaFHuw3RoMRsJEn7ldTFqYnF7SR COKrD+YYil0FGPH2VcBHZGkHi1t3ETdrUoaOEGjMfFPIC9paLLTI59z04JpTlRGQq+vv ZrNUzl33zdK86x7Wsj9FYyZBEiGc6FLX485Gol3wZLiqYfpcn/o/Kpp3IePJBLllMLXT zhoQ== X-Gm-Message-State: APt69E1AsKGPMrZPIo/7FQAIsS7d5k8pPbPMgl53dJLEMOi8Ax4QwJhI dlmYIvDdlUQxuDSw5mKb4DHWUcII X-Google-Smtp-Source: AAOMgpd7z3I4enYwOcshQVGyyiz96wsU0YhI2ZfAvmI3+4+b9TClk1vSOXPkICJvxtyS1RC/MGcmtQ== X-Received: by 2002:a1c:3743:: with SMTP id e64-v6mr14121922wma.63.1531215908743; Tue, 10 Jul 2018 02:45:08 -0700 (PDT) Received: from sven-desktop.home.narfation.org (p200300C593D6D8FEC880EC161BEECF71.dip0.t-ipconnect.de. [2003:c5:93d6:d8fe:c880:ec16:1bee:cf71]) by smtp.gmail.com with ESMTPSA id c13-v6sm4075411wrt.24.2018.07.10.02.45.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 02:45:08 -0700 (PDT) From: Sven Eckelmann To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Prevent active scans on potential unusable channels Date: Tue, 10 Jul 2018 11:44:48 +0200 Message-Id: <20180710094448.13201-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180710_024520_775937_9AA97226 X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Puzyniak , Simon Wunderlich , Sven Eckelmann MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The QCA4019 hw1.0 firmware 10.4-3.2.1-00050 and 10.4-3.5.3-00053 (and most likely all other) seem to ignore the WMI_CHAN_FLAG_DFS flag during the scan. This results in transmission (probe requests) on channels which are not "available" for transmissions. Since the firmware is closed source and nothing can be done from our side to fix the problem in it, the driver has to work around this problem. The WMI_CHAN_FLAG_PASSIVE seems to be interpreted by the firmware to not scan actively on a channel unless an AP was detected on it. Simple probe requests will then be transmitted by the STA on the channel. ath10k must therefore also use this flag when it queues a radar channel for scanning. This should reduce the chance of an active scan when the channel might be "unusable" for transmissions. Fixes: e8a50f8ba44b ("ath10k: introduce DFS implementation") Signed-off-by: Sven Eckelmann --- Cc: Simon Wunderlich Cc: Marek Puzyniak --- drivers/net/wireless/ath/ath10k/mac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 541bc1c4b2f7..ad975beae6dc 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3085,6 +3085,13 @@ static int ath10k_update_channel_list(struct ath10k *ar) passive = channel->flags & IEEE80211_CHAN_NO_IR; ch->passive = passive; + /* the firmware is ignoring the "radar" flag of the + * channel and is scanning actively using Probe Requests + * on "Radar detection"/DFS channels which are not + * marked as "available" + */ + ch->passive |= ch->chan_radar; + ch->freq = channel->center_freq; ch->band_center_freq1 = channel->center_freq; ch->min_power = 0;