From patchwork Mon Jan 16 10:06:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre TOSONI X-Patchwork-Id: 9518467 X-Patchwork-Delegate: kvalo@adurom.com 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 AE8EF600C5 for ; Mon, 16 Jan 2017 10:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CFED28342 for ; Mon, 16 Jan 2017 10:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70F8E2844A; Mon, 16 Jan 2017 10:49:56 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E9BB28342 for ; Mon, 16 Jan 2017 10:49:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cT4rC-00019l-Pj; Mon, 16 Jan 2017 10:49:46 +0000 Received: from smtp-out03.msg.oleane.net ([62.161.7.1]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cT4r8-0000iv-NB for ath10k@lists.infradead.org; Mon, 16 Jan 2017 10:49:45 +0000 Received: from smtp06.msg.oleane.net ([172.17.20.115]) by smtp-out03.msg.oleane.net with ESMTP id v0GARleJ009080; Mon, 16 Jan 2017 11:27:47 +0100 Received: from RD9 ([195.6.104.67]) (authenticated) by smtp06.msg.oleane.net (MSA) with ESMTP id v0GA6Bqu008058; Mon, 16 Jan 2017 11:06:12 +0100 From: "Jean-Pierre Tosoni" To: "'Adrian Chadd'" , References: In-Reply-To: Subject: RE: ath9k/ath10k DFS testing / certification Date: Mon, 16 Jan 2017 11:06:11 +0100 Message-ID: <002c01d26fe0$2a664ab0$7f32e010$@acksys.fr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJxteyd4WTrgLvE5DLsrTUBbZfoqp/8Sgbg Content-Language: fr X-Backend: vm-mx-sophos-mta47 X-PMX-Backend: PMX 6.3.1.2588712, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.1.16.95417 running on vm-mx-sophos-mta47 X-PMX-VirusScan: no virus found X-PFSI-Info: PMX 6.3.1.2588712, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.1.16.95417 (no virus found) X-PMX-Spam: Probability=8% X-PMX-SpamScan: NO 8% X-Orange-Auth: bWMxNDg4LTE4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170116_024943_151702_ADB513D0 X-CRM114-Status: UNSURE ( 9.80 ) 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: Cedric VONCKEN Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Adrian, > -----Message d'origine----- > De : ath10k [mailto:ath10k-bounces@lists.infradead.org] De la part de > Adrian Chadd > Envoyé : dimanche 15 janvier 2017 22:17 > À : ath9k-devel; ath10k@lists.infradead.org > Objet : ath9k/ath10k DFS testing / certification > > hiya, > > I'm working on a set of things that will involve DFS certification for > ath9k/ath10k. Initially it'll be for FCC but I'll branch out to the other > regions shortly afterwards. > > I'd love to hear from anyone else who has done this and what their > challenges were, including whether they have any local patches / tools > that haven't yet been upstreamed. > > Thanks! > > > -adrian For the record, a summary of our discussion last month. We went to an independent lab with wpa_supplicant+ath10k+Compex WLE900VX (QCA988x) for ETSI certification. We passed for the most part, but we were rejected because the supplicant sends probes on DFS channels. We applied the following patch that did solve the issue at hand, but made another issue appear: => the QCA firmware believes any rogue system that sends out beacons on a DFS channel, so that the firmware active-scans that channel, without checking for radar signatures on its own. So the patch solves only part of the issue. Patch: Process NO_IR and RADAR flags in the same manner. Do this only when channels are prepared for a scan, in order to avoid side effects. --- ch->freq = channel->center_freq; --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5679,6 +5679,9 @@ ath10k_wmi_op_gen_scan_chan_list(struct ci = &cmd->chan_info[i]; ath10k_wmi_put_wmi_channel(ci, ch); + + if (ch->chan_radar) + ci->flags |= __cpu_to_le32(WMI_CHAN_FLAG_PASSIVE); } return skb; -- 1.7.2.5 Jouni Malinen suggested an equivalent, more general, form of the above, which seems to work as well: diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index aa545a1..758dbbd 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2973,7 +2973,8 @@ static int ath10k_update_channel_list(struct ath10k *ar) ch->chan_radar = !!(channel->flags & IEEE80211_CHAN_RADAR); - passive = channel->flags & IEEE80211_CHAN_NO_IR; + passive = channel->flags & (IEEE80211_CHAN_NO_IR | + IEEE80211_CHAN_RADAR); ch->passive = passive;