From patchwork Thu Feb 12 21:17:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Oh X-Patchwork-Id: 5822191 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 52789BF6C3 for ; Thu, 12 Feb 2015 21:18:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9388F20253 for ; Thu, 12 Feb 2015 21:18:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEABD2022A for ; Thu, 12 Feb 2015 21:18:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbbBLVSd (ORCPT ); Thu, 12 Feb 2015 16:18:33 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:4346 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbbBLVSb (ORCPT ); Thu, 12 Feb 2015 16:18:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1423775912; x=1455311912; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=WJ+9QZGqXyRKtSSgGapmrCKIMF5YxTR9z/ALuxM48Bg=; b=jft3on+5grKNeD4ZC3ZF/KMbE45dzH148LNIf7jhx9lHzWbJ8/zz3rAj ub+HPqGRIk5bnqixBBRC8cQ+GhBU5vG8wRi2LjTQlCVa3xvjpZW33hxS9 6awySGs1zSw79S/EJ7cFOtmGTulY46Hld7bby9++HfryVjU+kaEQdOhtf U=; X-IronPort-AV: E=McAfee;i="5600,1067,7710"; a="195324740" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Feb 2015 13:18:32 -0800 X-IronPort-AV: E=Sophos;i="5.09,567,1418112000"; d="scan'208";a="839304321" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 12 Feb 2015 13:18:31 -0800 Received: from poh-linux2.qualcomm.com (10.80.80.8) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.995.29; Thu, 12 Feb 2015 13:18:29 -0800 From: Peter Oh To: CC: Subject: [PATCH 3/3] ath: Enhance radar detection by looking up chirp Date: Thu, 12 Feb 2015 13:17:05 -0800 Message-ID: <1423775825-19498-3-git-send-email-poh@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423775825-19498-1-git-send-email-poh@qca.qualcomm.com> References: <1423775825-19498-1-git-send-email-poh@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To NASANEXM01B.na.qualcomm.com (10.85.0.82) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Certain radar types such as FCC radar type 5 are using chirp in their pulses, hence looking up the chirp status will enhance to avoid false radar detection. Signed-off-by: Peter Oh --- drivers/net/wireless/ath/dfs_pri_detector.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/dfs_pri_detector.c b/drivers/net/wireless/ath/dfs_pri_detector.c index 43b6081..1b5ad19 100644 --- a/drivers/net/wireless/ath/dfs_pri_detector.c +++ b/drivers/net/wireless/ath/dfs_pri_detector.c @@ -390,6 +390,10 @@ static struct pri_sequence *pri_detector_add_pulse(struct pri_detector *de, if ((ts - de->last_ts) < rs->max_pri_tolerance) /* if delta to last pulse is too short, don't use this pulse */ return NULL; + /* radar detector spec needs chirp, but not detected */ + if (rs->chirp && rs->chirp != event->chirp) + return NULL; + de->last_ts = ts; max_updated_seq = pseq_handler_add_to_existing_seqs(de, ts);