From patchwork Wed Mar 25 17:37:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Oh X-Patchwork-Id: 6093981 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 483999F691 for ; Wed, 25 Mar 2015 17:38:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FBD12012D for ; Wed, 25 Mar 2015 17:38:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B88620357 for ; Wed, 25 Mar 2015 17:38:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932384AbbCYRh7 (ORCPT ); Wed, 25 Mar 2015 13:37:59 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:32375 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932268AbbCYRh4 (ORCPT ); Wed, 25 Mar 2015 13:37:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1427305076; x=1458841076; h=from:to:cc:subject:date:message-id:mime-version; bh=sw8PlSMuD10TcmSGmRo+ELcg9HU42Gx3t2HgjoxF9OE=; b=JTP4ufdKQuarhLbz3ZFRLb9BLHQLMV5lwzf4LbYsIlKd0ZPJh4bj8wqb OJjFplB6SDHO5rSB10R0RUOxtelwHxzMeWiJc+mgRXvsXDxkm6dqn7bAC FN4RKYiJb1+fzsg+r4t8+dTnp/T7FT8yfBW6xYn2kyPI3uRFPSa+lfULz A=; X-IronPort-AV: E=McAfee;i="5700,7163,7751"; a="85723074" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by sabertooth01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Mar 2015 10:37:55 -0700 X-IronPort-AV: E=Sophos;i="5.11,465,1422950400"; d="scan'208";a="871060113" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Mar 2015 10:37:55 -0700 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.1044.25; Wed, 25 Mar 2015 10:37:54 -0700 From: Peter Oh To: CC: Subject: [PATCH] ath: support new FCC DFS Radar Type 1 Date: Wed, 25 Mar 2015 10:37:16 -0700 Message-ID: <1427305036-20326-1-git-send-email-poh@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 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 Add support for new FCC DFS rules released on August 14, 2014. FCC has added a new radar type named Radar Type 1 and original Radar Type 1 is renamed to Radar Type 0 in consequence. During the certificate test, Type 1 PRI values are randomly selected within the range of 518 and 3066 and we divide it to 3 groups based on practical test result data collected for more than a year. For about Radar type ID, it does nothing to functionalities. In other words, even if we re-order the IDs, DFS detection will work as well, but we give the ID with matching to FCC doc. By adding this support, the drivers using this DFS function are able to support both of old and new FCC DFS rules simultaneously without any other changes. Signed-off-by: Peter Oh --- drivers/net/wireless/ath/dfs_pattern_detector.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c index b1de8c6..ac0df38 100644 --- a/drivers/net/wireless/ath/dfs_pattern_detector.c +++ b/drivers/net/wireless/ath/dfs_pattern_detector.c @@ -81,13 +81,22 @@ static const struct radar_types etsi_radar_types_v15 = { PPB_THRESH(PPB), PRI_TOLERANCE, CHIRP \ } +/* radar types released on August 14, 2014 + * type 1 PRI values randomly selected within the range of 518 and 3066. + * divide it to 3 groups is good enough for both of radar detection and + * avoiding false detection based on practical test results + * collected for more than a year. + */ static const struct radar_detector_specs fcc_radar_ref_types[] = { FCC_PATTERN(0, 0, 1, 1428, 1428, 1, 18, false), - FCC_PATTERN(1, 0, 5, 150, 230, 1, 23, false), - FCC_PATTERN(2, 6, 10, 200, 500, 1, 16, false), - FCC_PATTERN(3, 11, 20, 200, 500, 1, 12, false), - FCC_PATTERN(4, 50, 100, 1000, 2000, 1, 1, true), - FCC_PATTERN(5, 0, 1, 333, 333, 1, 9, false), + FCC_PATTERN(101, 0, 1, 518, 938, 1, 57, false), + FCC_PATTERN(102, 0, 1, 938, 2000, 1, 27, false), + FCC_PATTERN(103, 0, 1, 2000, 3066, 1, 18, false), + FCC_PATTERN(2, 0, 5, 150, 230, 1, 23, false), + FCC_PATTERN(3, 6, 10, 200, 500, 1, 16, false), + FCC_PATTERN(4, 11, 20, 200, 500, 1, 12, false), + FCC_PATTERN(5, 50, 100, 1000, 2000, 1, 1, true), + FCC_PATTERN(6, 0, 1, 333, 333, 1, 9, false), }; static const struct radar_types fcc_radar_types = {