Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4537733imm; Mon, 17 Sep 2018 16:05:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbFuloJMVj8DTp7nfiUsqLDceNTrfFYzRYgFlWohRsAN83iqJ3wFOzsRNbij3E9f1KZrhTn X-Received: by 2002:a17:902:aa8f:: with SMTP id d15-v6mr26865634plr.64.1537225554803; Mon, 17 Sep 2018 16:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537225554; cv=none; d=google.com; s=arc-20160816; b=LYibK6F9XyAXJ8VXvuO4vZibpi+tqKLv8qmoFBJHRsKxfSi7r75TS/GD1RoY9XuWA0 9zXfJRTkbHr6J703UreKx8xOdOe4ekHESwHpHc14TCz2w6RH6oJe9ld8eyzsyhto2Gs3 CJzbczN0DxI712cnhpUwaNKN1naXVy0FP/44E3k8td3fCCaFyD+jVpLguRS8loqd2PYe 2Yu0u9tbwjFrHyrmt5wfYRul7nlJIROy41ynyPLpBjZ6xspvPMvCyCKendB6koPAPiQO UbuI7fhqznLM/3+RkzkHX0aUoi9rSLzcyYaOuVW6H/AY2ez8T5C+WDXk3dPN5gBridlY RTLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=L8eYoeFkQnTqYHulzrFjGkeEohsi/JUEifoG0eWdvag=; b=EWwlqSZ/ixIP+Biw4PbUIYne5zEos5pyN7LqLJdKAc5f8l0RxxZLnLDFKcXeissgK8 4scBnEnEowJPaENV7bfxMN3KHPNV7Xsy1RNBoU5bSJBLxxxGky+wb3eIzCBiWjrVgZZb cqZruXzwA1hCr4N1rXaYgtr2n6MXu5KjCZCaz/g7OuNxF0IFIVztin46wGT/Jn7PijtJ ahKoTJPSoX9QshJviRaGWY7sIsfUoVgzK5ru6QPTh/g5QJG+1ymnQhmI4QvKSxPI3Abu zHlVniwon/RVs9lxRLFPps0JACKland89lYNIMO/iBpiZR32mXrnkEsMv66HuQPWJAOc 9fTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q74-v6si19355867pfq.32.2018.09.17.16.05.39; Mon, 17 Sep 2018 16:05:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730770AbeIREdl (ORCPT + 99 others); Tue, 18 Sep 2018 00:33:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49078 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbeIREdk (ORCPT ); Tue, 18 Sep 2018 00:33:40 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 60BA3C49; Mon, 17 Sep 2018 23:04:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Eckelmann , Kalle Valo , Sasha Levin Subject: [PATCH 4.14 053/126] ath10k: prevent active scans on potential unusable channels Date: Tue, 18 Sep 2018 00:41:41 +0200 Message-Id: <20180917211708.011798891@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180917211703.481236999@linuxfoundation.org> References: <20180917211703.481236999@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sven Eckelmann [ Upstream commit 3f259111583801013cb605bb4414aa529adccf1c ] 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 Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath10k/mac.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3074,6 +3074,13 @@ static int ath10k_update_channel_list(st 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;