All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
	Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Subject: [PATCH 2/2] ath10k: fix quiet duration configuration
Date: Thu, 19 Feb 2015 23:25:06 +0530	[thread overview]
Message-ID: <1424368506-18193-2-git-send-email-rmanohar@qti.qualcomm.com> (raw)
In-Reply-To: <1424368506-18193-1-git-send-email-rmanohar@qti.qualcomm.com>

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 <rmanohar@qti.qualcomm.com>
---
 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,
-- 
2.3.0


WARNING: multiple messages have this Message-ID (diff)
From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Subject: [PATCH 2/2] ath10k: fix quiet duration configuration
Date: Thu, 19 Feb 2015 23:25:06 +0530	[thread overview]
Message-ID: <1424368506-18193-2-git-send-email-rmanohar@qti.qualcomm.com> (raw)
In-Reply-To: <1424368506-18193-1-git-send-email-rmanohar@qti.qualcomm.com>

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 <rmanohar@qti.qualcomm.com>
---
 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,
-- 
2.3.0


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2015-02-19 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 17:55 [PATCH 1/2] ath10k: increase duty cycle maximum limit Rajkumar Manoharan
2015-02-19 17:55 ` Rajkumar Manoharan
2015-02-19 17:55 ` Rajkumar Manoharan [this message]
2015-02-19 17:55   ` [PATCH 2/2] ath10k: fix quiet duration configuration Rajkumar Manoharan
2015-03-06  7:39   ` Rajkumar Manoharan
2015-03-06  7:39     ` Rajkumar Manoharan
2015-03-07  7:53 ` [PATCH 1/2] ath10k: increase duty cycle maximum limit Kalle Valo
2015-03-07  7:53   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424368506-18193-2-git-send-email-rmanohar@qti.qualcomm.com \
    --to=rmanohar@qti.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.