From patchwork Tue Jun 16 08:34:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zefir Kurtisi X-Patchwork-Id: 6614351 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 9FE83C0433 for ; Tue, 16 Jun 2015 08:40:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFFA32055C for ; Tue, 16 Jun 2015 08:40:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D146F206FD for ; Tue, 16 Jun 2015 08:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbbFPIk1 (ORCPT ); Tue, 16 Jun 2015 04:40:27 -0400 Received: from mail.neratec.com ([46.140.151.2]:25629 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932289AbbFPIkW (ORCPT ); Tue, 16 Jun 2015 04:40:22 -0400 X-Greylist: delayed 349 seconds by postgrey-1.27 at vger.kernel.org; Tue, 16 Jun 2015 04:40:21 EDT Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id C51209E3D6A; Tue, 16 Jun 2015 10:34:30 +0200 (CEST) Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tiwtCKEUVHbd; Tue, 16 Jun 2015 10:34:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id 582F19E3DD7; Tue, 16 Jun 2015 10:34:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3xMYDQKBfIjE; Tue, 16 Jun 2015 10:34:30 +0200 (CEST) Received: from CHB0038.neratec.local (CHB0038.neratec.local [192.168.11.73]) by mail.neratec.com (Postfix) with ESMTPSA id 2C7619E0C07; Tue, 16 Jun 2015 10:34:30 +0200 (CEST) From: Zefir Kurtisi To: linux-wireless@vger.kernel.org Cc: poh@qca.qualcomm.com, ath9k-devel@venema.h4ckr.net, ath10k@lists.infradead.org, Zefir Kurtisi Subject: [PATCH] ath: DFS - limit number of potential PRI sequences Date: Tue, 16 Jun 2015 10:34:03 +0200 Message-Id: <1434443643-28477-1-git-send-email-zefir.kurtisi@neratec.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 In the PRI detector, after the current radar pulse has been checked agains existing PRI sequences, it is considered as part of a new potential sequence. Previously, the condition to accept a new sequence was to have at least the same number of pulses as the longest matching sequence. This was wrong, since it led to duplicates of PRI sequences. This patch changes the acceptance criteria for new potential sequences from 'at least' to 'more than' the longest existing. Detection performance remains unaffected, while the number of PRI sequences accounted at runtime (and with it CPU load) is reduced by up to 50%. Signed-off-by: Zefir Kurtisi --- drivers/net/wireless/ath/dfs_pri_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/dfs_pri_detector.c b/drivers/net/wireless/ath/dfs_pri_detector.c index 1b5ad19..cc5c592 100644 --- a/drivers/net/wireless/ath/dfs_pri_detector.c +++ b/drivers/net/wireless/ath/dfs_pri_detector.c @@ -273,7 +273,7 @@ static bool pseq_handler_create_sequences(struct pri_detector *pde, tmp_false_count++; } } - if (ps.count < min_count) + if (ps.count <= min_count) /* did not reach minimum count, drop sequence */ continue;