From patchwork Thu Jul 26 13:59: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: 10545941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFB4B9093 for ; Thu, 26 Jul 2018 14:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDC612B36C for ; Thu, 26 Jul 2018 14:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C22122B377; Thu, 26 Jul 2018 14:08:31 +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.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI autolearn=no 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 95C862B36D for ; Thu, 26 Jul 2018 14:08:30 +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=xnmqrdu94WhODh6diJ1+Ppc6HI19S/H6571pIO5EdPw=; b=dZY MAOeZD+WVw4dy/L/WXIwv2uvh8+iTOiGax76IUf+VFDHXI5LqFF/s4UwxNcSYgE70qIcRLB4ntOgl mgkgS4PdP4w37To6Ia1UI2o/6MwTHfQ0Hw/gAEQ9CwVAq4FdP2bHYn7ifj0g7nAGdNwtGIPgTuonP fhkMzDXkclC9UKzyk55VMD1WhB34D7NId1gFUAMyD+JBAHo99xWyJCvN3/IBpd4prUb3SeARlhp1x 6xviuIEoXkPL8dkVz8BN6JqZ7443i+x2xXmv6uDE1LOl24pryR8j3urLbxrNx2FEAHSua4CdOCQio ZWP17Mou3QVKsYA/LMTlk6m1ss0Cf8w==; 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 1figwM-0001ci-QL; Thu, 26 Jul 2018 14:08:26 +0000 Received: from narfation.org ([79.140.41.39] helo=v3-1039.vlinux.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1figwJ-0001b6-7Q for ath10k@lists.infradead.org; Thu, 26 Jul 2018 14:08:25 +0000 Received: from sven-desktop.home.narfation.org (p200300C593D685FE00000000000003ED.dip0.t-ipconnect.de [IPv6:2003:c5:93d6:85fe::3ed]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id D304A1100E1; Thu, 26 Jul 2018 15:59:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1532613597; bh=/6Q7YLm7ZJRKAlGLPXgVItYN9nxTSi1f8I6eNKJbDhg=; h=From:To:Cc:Subject:Date:From; b=MLSrjWJKp9fpmFUCBeGo1ZkSpNT0avXucP4Qsk8ZCFmcmPTxbd/SMYq7bg5icUPJd XxFnACXS/txV25nlX3ZHm+iHS17CHt/ISErzczJLU5NIHGwYca4v5fZK5pHkfcZQCi mEyAgzM0vmLkSbC3cd5EMqZggt8LbHLxpODhJO/4= From: Sven Eckelmann To: ath10k@lists.infradead.org Subject: [PATCH RESENT] ath10k: Prevent active scans on potential unusable channels Date: Thu, 26 Jul 2018 15:59:48 +0200 Message-Id: <20180726135948.29160-1-sven@narfation.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180726_070823_421220_485FC562 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. 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 , linux-wireless@vger.kernel.org, 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 From: Sven Eckelmann 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 95243b48a179..76e9c6eaa051 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;