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 4/6] ath10k: do not restrict thermal throttling to ap mode Date: Sun, 15 Mar 2015 20:36:23 +0530 [thread overview] Message-ID: <1426431985-16332-5-git-send-email-rmanohar@qti.qualcomm.com> (raw) In-Reply-To: <1426431985-16332-1-git-send-email-rmanohar@qti.qualcomm.com> Recently thermal mitigation is validated in station mode as well. Hence allowing thermal throttling for all interfaces. This enables user to validate thermal mitigation with different modes. Reported-by: Matthias Kaehlcke <mka@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> --- drivers/net/wireless/ath/ath10k/thermal.c | 36 +------------------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 8640f41..604ea00 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -23,29 +23,6 @@ #include "debug.h" #include "wmi-ops.h" -static int ath10k_thermal_get_active_vifs(struct ath10k *ar, - enum wmi_vdev_type type) -{ - struct ath10k_vif *arvif; - int count = 0; - - lockdep_assert_held(&ar->conf_mutex); - - list_for_each_entry(arvif, &ar->arvifs, list) { - if (!arvif->is_started) - continue; - - if (!arvif->is_up) - continue; - - if (arvif->vdev_type != type) - continue; - - count++; - } - return count; -} - static int ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev, unsigned long *state) @@ -73,7 +50,7 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; - int num_bss, ret = 0; + int ret = 0; mutex_lock(&ar->conf_mutex); if (ar->state != ATH10K_STATE_ON) { @@ -87,17 +64,6 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, ret = -EINVAL; goto out; } - /* TODO: Right now, thermal mitigation is handled only for single/multi - * vif AP mode. Since quiet param is not validated in STA mode, it needs - * to be investigated further to handle multi STA and multi-vif (AP+STA) - * mode properly. - */ - num_bss = ath10k_thermal_get_active_vifs(ar, WMI_VDEV_TYPE_AP); - if (!num_bss) { - ath10k_warn(ar, "no active AP interfaces\n"); - ret = -ENETDOWN; - goto out; - } ar->thermal.throttle_state = throttle_state; ath10k_thermal_set_throttling(ar); out: -- 2.3.2
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 4/6] ath10k: do not restrict thermal throttling to ap mode Date: Sun, 15 Mar 2015 20:36:23 +0530 [thread overview] Message-ID: <1426431985-16332-5-git-send-email-rmanohar@qti.qualcomm.com> (raw) In-Reply-To: <1426431985-16332-1-git-send-email-rmanohar@qti.qualcomm.com> Recently thermal mitigation is validated in station mode as well. Hence allowing thermal throttling for all interfaces. This enables user to validate thermal mitigation with different modes. Reported-by: Matthias Kaehlcke <mka@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> --- drivers/net/wireless/ath/ath10k/thermal.c | 36 +------------------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 8640f41..604ea00 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -23,29 +23,6 @@ #include "debug.h" #include "wmi-ops.h" -static int ath10k_thermal_get_active_vifs(struct ath10k *ar, - enum wmi_vdev_type type) -{ - struct ath10k_vif *arvif; - int count = 0; - - lockdep_assert_held(&ar->conf_mutex); - - list_for_each_entry(arvif, &ar->arvifs, list) { - if (!arvif->is_started) - continue; - - if (!arvif->is_up) - continue; - - if (arvif->vdev_type != type) - continue; - - count++; - } - return count; -} - static int ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev, unsigned long *state) @@ -73,7 +50,7 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; - int num_bss, ret = 0; + int ret = 0; mutex_lock(&ar->conf_mutex); if (ar->state != ATH10K_STATE_ON) { @@ -87,17 +64,6 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, ret = -EINVAL; goto out; } - /* TODO: Right now, thermal mitigation is handled only for single/multi - * vif AP mode. Since quiet param is not validated in STA mode, it needs - * to be investigated further to handle multi STA and multi-vif (AP+STA) - * mode properly. - */ - num_bss = ath10k_thermal_get_active_vifs(ar, WMI_VDEV_TYPE_AP); - if (!num_bss) { - ath10k_warn(ar, "no active AP interfaces\n"); - ret = -ENETDOWN; - goto out; - } ar->thermal.throttle_state = throttle_state; ath10k_thermal_set_throttling(ar); out: -- 2.3.2 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2015-03-15 15:07 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-15 15:06 [PATCH 0/6] ath10k: thermal mitigation fixes Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-15 15:06 ` [PATCH 1/6] ath10k: add debugfs entry to configure quiet period Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-15 15:06 ` [PATCH 2/6] ath10k: Fix interpretation of cooling device state Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-15 15:06 ` [PATCH 3/6] ath10k: configure thermal throttle while powering up Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan [this message] 2015-03-15 15:06 ` [PATCH 4/6] ath10k: do not restrict thermal throttling to ap mode Rajkumar Manoharan 2015-03-15 15:06 ` [PATCH 5/6] ath10k: cache throttle state when device is down Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-15 15:06 ` [PATCH 6/6] ath10k: move driver state check before setting throttle Rajkumar Manoharan 2015-03-15 15:06 ` Rajkumar Manoharan 2015-03-23 15:17 ` [PATCH 0/6] ath10k: thermal mitigation fixes Kalle Valo 2015-03-23 15:17 ` 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=1426431985-16332-5-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: linkBe 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.