From patchwork Thu Feb 19 17:55:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 5853371 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 80091BF440 for ; Thu, 19 Feb 2015 17:55:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB2B3202C8 for ; Thu, 19 Feb 2015 17:55:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D58AD202BE for ; Thu, 19 Feb 2015 17:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752315AbbBSRzo (ORCPT ); Thu, 19 Feb 2015 12:55:44 -0500 Received: from sabertooth02.qualcomm.com ([65.197.215.38]:49186 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbbBSRzo (ORCPT ); Thu, 19 Feb 2015 12:55:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1424368543; x=1455904543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=FJZgC2T0PLQpToqJlgHZ7mUqleISfmOmixrNUv/b8/I=; b=CWTfJTQtRwClEZfPpqKI3newI7Cx5QKiD/eQ8fuR2slvrfe7SnBlydg1 cdAdWVLs98+8XviBZWZsH23keiuF2pOygR8rLwK8+X/y54JM7zTOxSKg8 7+vu/iF6eqz/+EkzpnQl5wkt2ZOtSSWjlEmHKNwJO4mq4xDGi31wSRF4d g=; X-IronPort-AV: E=McAfee;i="5600,1067,7717"; a="84329787" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by sabertooth02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Feb 2015 09:55:43 -0800 X-IronPort-AV: E=Sophos;i="5.09,609,1418112000"; d="scan'208";a="844097368" Received: from nasanexm02e.na.qualcomm.com ([129.46.53.254]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 19 Feb 2015 09:55:43 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by nasanexm02e.na.qualcomm.com (129.46.53.254) with Microsoft SMTP Server (TLS) id 15.0.995.29; Thu, 19 Feb 2015 09:55:42 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.995.29; Thu, 19 Feb 2015 09:55:32 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 19 Feb 2015 23:25:23 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 2/2] ath10k: fix quiet duration configuration Date: Thu, 19 Feb 2015 23:25:06 +0530 Message-ID: <1424368506-18193-2-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1424368506-18193-1-git-send-email-rmanohar@qti.qualcomm.com> References: <1424368506-18193-1-git-send-email-rmanohar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) To aphydexm01b.ap.qualcomm.com (10.252.127.11) 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 Duty cycle is nothing but percentage of one period in which a signal is active. But it is wrongly interpreted as ratio of quiet duration. So fix the quiet duration to the remaining percentage of duty cycle (active ratio). Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index aede750..0d89ab5 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -98,7 +98,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, } period = max(ATH10K_QUIET_PERIOD_MIN, (ATH10K_QUIET_PERIOD_DEFAULT / num_bss)); - duration = (period * duty_cycle) / 100; + duration = (period * (100 - duty_cycle)) / 100; enabled = duration ? 1 : 0; ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,