All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11  8:52 Loic Poulain
  2017-12-11 15:34   ` Ramon Fried
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Loic Poulain @ 2017-12-11  8:52 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, wcn36xx, linux-arm-msm, k.eugene.e,
	bjorn.andersson, Loic Poulain

Since driver does not report hardware dynamic power saving cap,
this is up to the mac80211 to manage power saving timeout and
state machine, using the ieee80211 config callback to report
PS changes. This patch enables/disables PS mode according to
the new configuration.

Remove old behaviour enabling PS mode in a static way, this make
the device unusable when power save is enabled since device is
forced to PS regardless RX/TX traffic.

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 v2: remove error msg on unbalanced bmps exit
     return -EALREADY if not in bmps mode

 drivers/net/wireless/ath/wcn36xx/main.c | 23 ++++++++++++-----------
 drivers/net/wireless/ath/wcn36xx/pmc.c  |  6 ++++--
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index f0b4d43..436b8ea 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -384,6 +384,18 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
 		}
 	}
 
+	if (changed & IEEE80211_CONF_CHANGE_PS) {
+		list_for_each_entry(tmp, &wcn->vif_list, list) {
+			vif = wcn36xx_priv_to_vif(tmp);
+			if (hw->conf.flags & IEEE80211_CONF_PS) {
+				if (vif->bss_conf.ps) /* ps allowed ? */
+					wcn36xx_pmc_enter_bmps_state(wcn, vif);
+			} else {
+				wcn36xx_pmc_exit_bmps_state(wcn, vif);
+			}
+		}
+	}
+
 	mutex_unlock(&wcn->conf_mutex);
 
 	return 0;
@@ -747,17 +759,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
 		vif_priv->dtim_period = bss_conf->dtim_period;
 	}
 
-	if (changed & BSS_CHANGED_PS) {
-		wcn36xx_dbg(WCN36XX_DBG_MAC,
-			    "mac bss PS set %d\n",
-			    bss_conf->ps);
-		if (bss_conf->ps) {
-			wcn36xx_pmc_enter_bmps_state(wcn, vif);
-		} else {
-			wcn36xx_pmc_exit_bmps_state(wcn, vif);
-		}
-	}
-
 	if (changed & BSS_CHANGED_BSSID) {
 		wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid %pM\n",
 			    bss_conf->bssid);
diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c b/drivers/net/wireless/ath/wcn36xx/pmc.c
index 589fe5f..1976b80 100644
--- a/drivers/net/wireless/ath/wcn36xx/pmc.c
+++ b/drivers/net/wireless/ath/wcn36xx/pmc.c
@@ -45,8 +45,10 @@ int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn,
 	struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
 
 	if (WCN36XX_BMPS != vif_priv->pw_state) {
-		wcn36xx_err("Not in BMPS mode, no need to exit from BMPS mode!\n");
-		return -EINVAL;
+		/* Unbalanced call or last BMPS enter failed */
+		wcn36xx_dbg(WCN36XX_DBG_PMC,
+			    "Not in BMPS mode, no need to exit\n");
+		return -EALREADY;
 	}
 	wcn36xx_smd_exit_bmps(wcn, vif);
 	vif_priv->pw_state = WCN36XX_FULL_POWER;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11 15:34   ` Ramon Fried
  0 siblings, 0 replies; 15+ messages in thread
From: Ramon Fried @ 2017-12-11 15:34 UTC (permalink / raw)
  To: Loic Poulain
  Cc: kvalo, linux-arm-msm, linux-wireless, bjorn.andersson, wcn36xx,
	k.eugene.e

On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
> 
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
> 

Hi.
I tried to see if this patch solves the ping delay once power save is
turned on and it appears it doesn't (log below).
I do see some change in the delay though in comparison to testing without the patch.
Bjorn, How did you test it ?

Thanks, Ramon.


root@dragonboard-410c:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=2.688 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=1.593 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=1.581 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=1.466 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=1.625 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=1.620 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=2.907 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=1.426 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=1.521 ms
64 bytes from 192.168.0.1: seq=9 ttl=64 time=1.543 ms
64 bytes from 192.168.0.1: seq=10 ttl=64 time=6.804 ms
64 bytes from 192.168.0.1: seq=11 ttl=64 time=1.562 ms
64 bytes from 192.168.0.1: seq=12 ttl=64 time=3.148 ms
64 bytes from 192.168.0.1: seq=13 ttl=64 time=1.568 ms
64 bytes from 192.168.0.1: seq=14 ttl=64 time=1.491 ms
64 bytes from 192.168.0.1: seq=15 ttl=64 time=2.884 ms
64 bytes from 192.168.0.1: seq=16 ttl=64 time=1.669 ms
64 bytes from 192.168.0.1: seq=17 ttl=64 time=1.556 ms
64 bytes from 192.168.0.1: seq=18 ttl=64 time=1.487 ms
64 bytes from 192.168.0.1: seq=19 ttl=64 time=1.377 ms
64 bytes from 192.168.0.1: seq=20 ttl=64 time=1.534 ms
^C
--- 192.168.0.1 ping statistics ---
21 packets transmitted, 21 packets received, 0% packet loss
round-trip min/avg/max = 1.377/2.050/6.804 ms
root@dragonboard-410c:~# iw dev wlan0 set power_save on
root@dragonboard-410c:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=4.849 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=11.250 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=11.402 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=11.732 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=10.076 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=11.532 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=15.479 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=11.318 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=13.299 ms
64 bytes from 192.168.0.1: seq=9 ttl=64 time=11.068 ms
64 bytes from 192.168.0.1: seq=10 ttl=64 time=11.087 ms
64 bytes from 192.168.0.1: seq=11 ttl=64 time=11.362 ms
64 bytes from 192.168.0.1: seq=12 ttl=64 time=11.341 ms
64 bytes from 192.168.0.1: seq=13 ttl=64 time=15.945 ms
64 bytes from 192.168.0.1: seq=14 ttl=64 time=11.318 ms
64 bytes from 192.168.0.1: seq=15 ttl=64 time=11.343 ms
64 bytes from 192.168.0.1: seq=16 ttl=64 time=11.378 ms
64 bytes from 192.168.0.1: seq=17 ttl=64 time=7.693 ms
64 bytes from 192.168.0.1: seq=18 ttl=64 time=11.703 ms
64 bytes from 192.168.0.1: seq=19 ttl=64 time=11.528 ms
64 bytes from 192.168.0.1: seq=20 ttl=64 time=12.008 ms
64 bytes from 192.168.0.1: seq=21 ttl=64 time=11.522 ms
64 bytes from 192.168.0.1: seq=22 ttl=64 time=12.949 ms
64 bytes from 192.168.0.1: seq=23 ttl=64 time=12.056 ms
64 bytes from 192.168.0.1: seq=24 ttl=64 time=13.097 ms
64 bytes from 192.168.0.1: seq=25 ttl=64 time=11.638 ms
^C
--- 192.168.0.1 ping statistics ---


> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
>  v2: remove error msg on unbalanced bmps exit
>      return -EALREADY if not in bmps mode
> 
>  drivers/net/wireless/ath/wcn36xx/main.c | 23 ++++++++++++-----------
>  drivers/net/wireless/ath/wcn36xx/pmc.c  |  6 ++++--
>  2 files changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c
> b/drivers/net/wireless/ath/wcn36xx/main.c
> index f0b4d43..436b8ea 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -384,6 +384,18 @@ static int wcn36xx_config(struct ieee80211_hw *hw,
> u32 changed)
>  		}
>  	}
>  
> +	if (changed & IEEE80211_CONF_CHANGE_PS) {
> +		list_for_each_entry(tmp, &wcn->vif_list, list) {
> +			vif = wcn36xx_priv_to_vif(tmp);
> +			if (hw->conf.flags & IEEE80211_CONF_PS) {
> +				if (vif->bss_conf.ps) /* ps allowed ? */
> +					wcn36xx_pmc_enter_bmps_state(wcn,
> vif);
> +			} else {
> +				wcn36xx_pmc_exit_bmps_state(wcn, vif);
> +			}
> +		}
> +	}
> +
>  	mutex_unlock(&wcn->conf_mutex);
>  
>  	return 0;
> @@ -747,17 +759,6 @@ static void wcn36xx_bss_info_changed(struct
> ieee80211_hw *hw,
>  		vif_priv->dtim_period = bss_conf->dtim_period;
>  	}
>  
> -	if (changed & BSS_CHANGED_PS) {
> -		wcn36xx_dbg(WCN36XX_DBG_MAC,
> -			    "mac bss PS set %d\n",
> -			    bss_conf->ps);
> -		if (bss_conf->ps) {
> -			wcn36xx_pmc_enter_bmps_state(wcn, vif);
> -		} else {
> -			wcn36xx_pmc_exit_bmps_state(wcn, vif);
> -		}
> -	}
> -
>  	if (changed & BSS_CHANGED_BSSID) {
>  		wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid
> %pM\n",
>  			    bss_conf->bssid);
> diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c
> b/drivers/net/wireless/ath/wcn36xx/pmc.c
> index 589fe5f..1976b80 100644
> --- a/drivers/net/wireless/ath/wcn36xx/pmc.c
> +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c
> @@ -45,8 +45,10 @@ int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn,
>  	struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
>  
>  	if (WCN36XX_BMPS != vif_priv->pw_state) {
> -		wcn36xx_err("Not in BMPS mode, no need to exit from BMPS
> mode!\n");
> -		return -EINVAL;
> +		/* Unbalanced call or last BMPS enter failed */
> +		wcn36xx_dbg(WCN36XX_DBG_PMC,
> +			    "Not in BMPS mode, no need to exit\n");
> +		return -EALREADY;
>  	}
>  	wcn36xx_smd_exit_bmps(wcn, vif);
>  	vif_priv->pw_state = WCN36XX_FULL_POWER;
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> wcn36xx mailing list
> wcn36xx@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11 15:34   ` Ramon Fried
  0 siblings, 0 replies; 15+ messages in thread
From: Ramon Fried @ 2017-12-11 15:34 UTC (permalink / raw)
  To: Loic Poulain
  Cc: kvalo-sgV2jX0FEOL9JmXXK+q4OQ,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.eugene.e-Re5JQEeQqe8AvxtiuMwx3w

On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
> 
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
> 

Hi.
I tried to see if this patch solves the ping delay once power save is
turned on and it appears it doesn't (log below).
I do see some change in the delay though in comparison to testing without the patch.
Bjorn, How did you test it ?

Thanks, Ramon.


root@dragonboard-410c:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=2.688 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=1.593 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=1.581 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=1.466 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=1.625 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=1.620 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=2.907 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=1.426 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=1.521 ms
64 bytes from 192.168.0.1: seq=9 ttl=64 time=1.543 ms
64 bytes from 192.168.0.1: seq=10 ttl=64 time=6.804 ms
64 bytes from 192.168.0.1: seq=11 ttl=64 time=1.562 ms
64 bytes from 192.168.0.1: seq=12 ttl=64 time=3.148 ms
64 bytes from 192.168.0.1: seq=13 ttl=64 time=1.568 ms
64 bytes from 192.168.0.1: seq=14 ttl=64 time=1.491 ms
64 bytes from 192.168.0.1: seq=15 ttl=64 time=2.884 ms
64 bytes from 192.168.0.1: seq=16 ttl=64 time=1.669 ms
64 bytes from 192.168.0.1: seq=17 ttl=64 time=1.556 ms
64 bytes from 192.168.0.1: seq=18 ttl=64 time=1.487 ms
64 bytes from 192.168.0.1: seq=19 ttl=64 time=1.377 ms
64 bytes from 192.168.0.1: seq=20 ttl=64 time=1.534 ms
^C
--- 192.168.0.1 ping statistics ---
21 packets transmitted, 21 packets received, 0% packet loss
round-trip min/avg/max = 1.377/2.050/6.804 ms
root@dragonboard-410c:~# iw dev wlan0 set power_save on
root@dragonboard-410c:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=4.849 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=11.250 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=11.402 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=11.732 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=10.076 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=11.532 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=15.479 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=11.318 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=13.299 ms
64 bytes from 192.168.0.1: seq=9 ttl=64 time=11.068 ms
64 bytes from 192.168.0.1: seq=10 ttl=64 time=11.087 ms
64 bytes from 192.168.0.1: seq=11 ttl=64 time=11.362 ms
64 bytes from 192.168.0.1: seq=12 ttl=64 time=11.341 ms
64 bytes from 192.168.0.1: seq=13 ttl=64 time=15.945 ms
64 bytes from 192.168.0.1: seq=14 ttl=64 time=11.318 ms
64 bytes from 192.168.0.1: seq=15 ttl=64 time=11.343 ms
64 bytes from 192.168.0.1: seq=16 ttl=64 time=11.378 ms
64 bytes from 192.168.0.1: seq=17 ttl=64 time=7.693 ms
64 bytes from 192.168.0.1: seq=18 ttl=64 time=11.703 ms
64 bytes from 192.168.0.1: seq=19 ttl=64 time=11.528 ms
64 bytes from 192.168.0.1: seq=20 ttl=64 time=12.008 ms
64 bytes from 192.168.0.1: seq=21 ttl=64 time=11.522 ms
64 bytes from 192.168.0.1: seq=22 ttl=64 time=12.949 ms
64 bytes from 192.168.0.1: seq=23 ttl=64 time=12.056 ms
64 bytes from 192.168.0.1: seq=24 ttl=64 time=13.097 ms
64 bytes from 192.168.0.1: seq=25 ttl=64 time=11.638 ms
^C
--- 192.168.0.1 ping statistics ---


> Acked-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  v2: remove error msg on unbalanced bmps exit
>      return -EALREADY if not in bmps mode
> 
>  drivers/net/wireless/ath/wcn36xx/main.c | 23 ++++++++++++-----------
>  drivers/net/wireless/ath/wcn36xx/pmc.c  |  6 ++++--
>  2 files changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c
> b/drivers/net/wireless/ath/wcn36xx/main.c
> index f0b4d43..436b8ea 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -384,6 +384,18 @@ static int wcn36xx_config(struct ieee80211_hw *hw,
> u32 changed)
>  		}
>  	}
>  
> +	if (changed & IEEE80211_CONF_CHANGE_PS) {
> +		list_for_each_entry(tmp, &wcn->vif_list, list) {
> +			vif = wcn36xx_priv_to_vif(tmp);
> +			if (hw->conf.flags & IEEE80211_CONF_PS) {
> +				if (vif->bss_conf.ps) /* ps allowed ? */
> +					wcn36xx_pmc_enter_bmps_state(wcn,
> vif);
> +			} else {
> +				wcn36xx_pmc_exit_bmps_state(wcn, vif);
> +			}
> +		}
> +	}
> +
>  	mutex_unlock(&wcn->conf_mutex);
>  
>  	return 0;
> @@ -747,17 +759,6 @@ static void wcn36xx_bss_info_changed(struct
> ieee80211_hw *hw,
>  		vif_priv->dtim_period = bss_conf->dtim_period;
>  	}
>  
> -	if (changed & BSS_CHANGED_PS) {
> -		wcn36xx_dbg(WCN36XX_DBG_MAC,
> -			    "mac bss PS set %d\n",
> -			    bss_conf->ps);
> -		if (bss_conf->ps) {
> -			wcn36xx_pmc_enter_bmps_state(wcn, vif);
> -		} else {
> -			wcn36xx_pmc_exit_bmps_state(wcn, vif);
> -		}
> -	}
> -
>  	if (changed & BSS_CHANGED_BSSID) {
>  		wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid
> %pM\n",
>  			    bss_conf->bssid);
> diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c
> b/drivers/net/wireless/ath/wcn36xx/pmc.c
> index 589fe5f..1976b80 100644
> --- a/drivers/net/wireless/ath/wcn36xx/pmc.c
> +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c
> @@ -45,8 +45,10 @@ int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn,
>  	struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
>  
>  	if (WCN36XX_BMPS != vif_priv->pw_state) {
> -		wcn36xx_err("Not in BMPS mode, no need to exit from BMPS
> mode!\n");
> -		return -EINVAL;
> +		/* Unbalanced call or last BMPS enter failed */
> +		wcn36xx_dbg(WCN36XX_DBG_PMC,
> +			    "Not in BMPS mode, no need to exit\n");
> +		return -EALREADY;
>  	}
>  	wcn36xx_smd_exit_bmps(wcn, vif);
>  	vif_priv->pw_state = WCN36XX_FULL_POWER;
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> wcn36xx mailing list
> wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11 15:41     ` Bjorn Andersson
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2017-12-11 15:41 UTC (permalink / raw)
  To: Ramon Fried
  Cc: Loic Poulain, kvalo, linux-arm-msm, linux-wireless, wcn36xx, k.eugene.e

On Mon 11 Dec 07:34 PST 2017, Ramon Fried wrote:

> On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
> > Since driver does not report hardware dynamic power saving cap,
> > this is up to the mac80211 to manage power saving timeout and
> > state machine, using the ieee80211 config callback to report
> > PS changes. This patch enables/disables PS mode according to
> > the new configuration.
> > 
> > Remove old behaviour enabling PS mode in a static way, this make
> > the device unusable when power save is enabled since device is
> > forced to PS regardless RX/TX traffic.
> > 
> 
> Hi.
> I tried to see if this patch solves the ping delay once power save is
> turned on and it appears it doesn't (log below).
> I do see some change in the delay though in comparison to testing without the patch.
> Bjorn, How did you test it ?
> 

Without this patch I get ping times around a second and SSH is not
usable, with this patch I see similar ping times as you, but SSH is
usable.

I have not been able to run iperf, because I keep hitting
https://bugs.96boards.org/show_bug.cgi?id=663

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11 15:41     ` Bjorn Andersson
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2017-12-11 15:41 UTC (permalink / raw)
  To: Ramon Fried
  Cc: Loic Poulain, kvalo-sgV2jX0FEOL9JmXXK+q4OQ,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.eugene.e-Re5JQEeQqe8AvxtiuMwx3w

On Mon 11 Dec 07:34 PST 2017, Ramon Fried wrote:

> On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
> > Since driver does not report hardware dynamic power saving cap,
> > this is up to the mac80211 to manage power saving timeout and
> > state machine, using the ieee80211 config callback to report
> > PS changes. This patch enables/disables PS mode according to
> > the new configuration.
> > 
> > Remove old behaviour enabling PS mode in a static way, this make
> > the device unusable when power save is enabled since device is
> > forced to PS regardless RX/TX traffic.
> > 
> 
> Hi.
> I tried to see if this patch solves the ping delay once power save is
> turned on and it appears it doesn't (log below).
> I do see some change in the delay though in comparison to testing without the patch.
> Bjorn, How did you test it ?
> 

Without this patch I get ping times around a second and SSH is not
usable, with this patch I see similar ping times as you, but SSH is
usable.

I have not been able to run iperf, because I keep hitting
https://bugs.96boards.org/show_bug.cgi?id=663

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
  2017-12-11 15:41     ` Bjorn Andersson
@ 2017-12-11 17:43       ` Loic Poulain
  -1 siblings, 0 replies; 15+ messages in thread
From: Loic Poulain @ 2017-12-11 17:43 UTC (permalink / raw)
  To: Ramon Fried
  Cc: kvalo, linux-arm-msm, linux-wireless, wcn36xx, Eugene Krasnikov,
	Bjorn Andersson

Hi Ramon,

On 11 December 2017 at 16:41, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> On Mon 11 Dec 07:34 PST 2017, Ramon Fried wrote:
>
>> On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
>> > Since driver does not report hardware dynamic power saving cap,
>> > this is up to the mac80211 to manage power saving timeout and
>> > state machine, using the ieee80211 config callback to report
>> > PS changes. This patch enables/disables PS mode according to
>> > the new configuration.
>> >
>> > Remove old behaviour enabling PS mode in a static way, this make
>> > the device unusable when power save is enabled since device is
>> > forced to PS regardless RX/TX traffic.
>> >
>>
>> Hi.
>> I tried to see if this patch solves the ping delay once power save is
>> turned on and it appears it doesn't (log below).
>> I do see some change in the delay though in comparison to testing without the patch.
>> Bjorn, How did you test it ?

For me this is the expected behavior, when station is in PS mode, some
time is required
to leave PS, this is the cost for saving power. Since ping is every
second, station goes
back to PS between each ping due to dynamic PS timeout, this indeed
leads to some
latency... I obtain same kind of results pinging my mobile phone. Note
that the PS
timeout can be changed (100ms by default).

>>
>
> Without this patch I get ping times around a second and SSH is not
> usable, with this patch I see similar ping times as you, but SSH is
> usable.
>
> I have not been able to run iperf, because I keep hitting
> https://bugs.96boards.org/show_bug.cgi?id=663

Yes, improvement can be mainly observed with high traffic.

Regards,
Loic

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-11 17:43       ` Loic Poulain
  0 siblings, 0 replies; 15+ messages in thread
From: Loic Poulain @ 2017-12-11 17:43 UTC (permalink / raw)
  To: Ramon Fried
  Cc: kvalo-sgV2jX0FEOL9JmXXK+q4OQ,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eugene Krasnikov,
	Bjorn Andersson

Hi Ramon,

On 11 December 2017 at 16:41, Bjorn Andersson
<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On Mon 11 Dec 07:34 PST 2017, Ramon Fried wrote:
>
>> On Mon, Dec 11, 2017 at 10:52:22AM +0200, Loic Poulain wrote:
>> > Since driver does not report hardware dynamic power saving cap,
>> > this is up to the mac80211 to manage power saving timeout and
>> > state machine, using the ieee80211 config callback to report
>> > PS changes. This patch enables/disables PS mode according to
>> > the new configuration.
>> >
>> > Remove old behaviour enabling PS mode in a static way, this make
>> > the device unusable when power save is enabled since device is
>> > forced to PS regardless RX/TX traffic.
>> >
>>
>> Hi.
>> I tried to see if this patch solves the ping delay once power save is
>> turned on and it appears it doesn't (log below).
>> I do see some change in the delay though in comparison to testing without the patch.
>> Bjorn, How did you test it ?

For me this is the expected behavior, when station is in PS mode, some
time is required
to leave PS, this is the cost for saving power. Since ping is every
second, station goes
back to PS between each ping due to dynamic PS timeout, this indeed
leads to some
latency... I obtain same kind of results pinging my mobile phone. Note
that the PS
timeout can be changed (100ms by default).

>>
>
> Without this patch I get ping times around a second and SSH is not
> usable, with this patch I see similar ping times as you, but SSH is
> usable.
>
> I have not been able to run iperf, because I keep hitting
> https://bugs.96boards.org/show_bug.cgi?id=663

Yes, improvement can be mainly observed with high traffic.

Regards,
Loic

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 12:03   ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2017-12-12 12:03 UTC (permalink / raw)
  To: Loic Poulain
  Cc: linux-arm-msm, linux-wireless, bjorn.andersson, wcn36xx, k.eugene.e

Loic Poulain <loic.poulain@linaro.org> writes:

> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
>
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
>
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

A fixes line would be nice for backporters. I can add that but need the
commit id.

--=20
Kalle Valo=

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 12:03   ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2017-12-12 12:03 UTC (permalink / raw)
  To: Loic Poulain
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.eugene.e-Re5JQEeQqe8AvxtiuMwx3w

Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:

> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
>
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
>
> Acked-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

A fixes line would be nice for backporters. I can add that but need the
commit id.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 12:40     ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2017-12-12 12:40 UTC (permalink / raw)
  To: Loic Poulain
  Cc: linux-arm-msm, linux-wireless, bjorn.andersson, wcn36xx, k.eugene.e

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> Loic Poulain <loic.poulain@linaro.org> writes:
>
>> Since driver does not report hardware dynamic power saving cap,
>> this is up to the mac80211 to manage power saving timeout and
>> state machine, using the ieee80211 config callback to report
>> PS changes. This patch enables/disables PS mode according to
>> the new configuration.
>>
>> Remove old behaviour enabling PS mode in a static way, this make
>> the device unusable when power save is enabled since device is
>> forced to PS regardless RX/TX traffic.
>>
>> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
>
> A fixes line would be nice for backporters. I can add that but need the
> commit id.

Or maybe this actually isn't a regression? Then of course a fixes line
is not needed.

Should I push this to v4.15 or v4.16, any preference?

--=20
Kalle Valo=

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 12:40     ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2017-12-12 12:40 UTC (permalink / raw)
  To: Loic Poulain
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.eugene.e-Re5JQEeQqe8AvxtiuMwx3w

Kalle Valo <kvalo-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org> writes:

> Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:
>
>> Since driver does not report hardware dynamic power saving cap,
>> this is up to the mac80211 to manage power saving timeout and
>> state machine, using the ieee80211 config callback to report
>> PS changes. This patch enables/disables PS mode according to
>> the new configuration.
>>
>> Remove old behaviour enabling PS mode in a static way, this make
>> the device unusable when power save is enabled since device is
>> forced to PS regardless RX/TX traffic.
>>
>> Acked-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Signed-off-by: Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>
> A fixes line would be nice for backporters. I can add that but need the
> commit id.

Or maybe this actually isn't a regression? Then of course a fixes line
is not needed.

Should I push this to v4.15 or v4.16, any preference?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 13:17       ` Loic Poulain
  0 siblings, 0 replies; 15+ messages in thread
From: Loic Poulain @ 2017-12-12 13:17 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-arm-msm, linux-wireless, bjorn.andersson, wcn36xx, k.eugene.e

Hi Kalle,

On 12 December 2017 at 13:40, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Kalle Valo <kvalo@qca.qualcomm.com> writes:
>
>> Loic Poulain <loic.poulain@linaro.org> writes:
>>
>>> Since driver does not report hardware dynamic power saving cap,
>>> this is up to the mac80211 to manage power saving timeout and
>>> state machine, using the ieee80211 config callback to report
>>> PS changes. This patch enables/disables PS mode according to
>>> the new configuration.
>>>
>>> Remove old behaviour enabling PS mode in a static way, this make
>>> the device unusable when power save is enabled since device is
>>> forced to PS regardless RX/TX traffic.
>>>
>>> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>>> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
>>
>> A fixes line would be nice for backporters. I can add that but need the
>> commit id.
>
> Or maybe this actually isn't a regression? Then of course a fixes line
> is not needed.

Yes, not really a regression since the issue came with the driver
itself (8e84c258).

>
> Should I push this to v4.15 or v4.16, any preference?

4.15 would be great.

Thanks,
Loic

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] wcn36xx: Fix dynamic power saving
@ 2017-12-12 13:17       ` Loic Poulain
  0 siblings, 0 replies; 15+ messages in thread
From: Loic Poulain @ 2017-12-12 13:17 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A,
	wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.eugene.e-Re5JQEeQqe8AvxtiuMwx3w

Hi Kalle,

On 12 December 2017 at 13:40, Kalle Valo <kvalo-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org> wrote:
> Kalle Valo <kvalo-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org> writes:
>
>> Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:
>>
>>> Since driver does not report hardware dynamic power saving cap,
>>> this is up to the mac80211 to manage power saving timeout and
>>> state machine, using the ieee80211 config callback to report
>>> PS changes. This patch enables/disables PS mode according to
>>> the new configuration.
>>>
>>> Remove old behaviour enabling PS mode in a static way, this make
>>> the device unusable when power save is enabled since device is
>>> forced to PS regardless RX/TX traffic.
>>>
>>> Acked-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> Signed-off-by: Loic Poulain <loic.poulain-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>
>> A fixes line would be nice for backporters. I can add that but need the
>> commit id.
>
> Or maybe this actually isn't a regression? Then of course a fixes line
> is not needed.

Yes, not really a regression since the issue came with the driver
itself (8e84c258).

>
> Should I push this to v4.15 or v4.16, any preference?

4.15 would be great.

Thanks,
Loic

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v2] wcn36xx: Fix dynamic power saving
  2017-12-11  8:52 [PATCH v2] wcn36xx: Fix dynamic power saving Loic Poulain
@ 2018-01-04 16:48   ` Kalle Valo
  2017-12-12 12:03   ` Kalle Valo
  2018-01-04 16:48   ` Kalle Valo
  2 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2018-01-04 16:48 UTC (permalink / raw)
  To: Loic Poulain
  Cc: linux-wireless, wcn36xx, linux-arm-msm, k.eugene.e,
	bjorn.andersson, Loic Poulain

Loic Poulain <loic.poulain@linaro.org> wrote:

> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
> 
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
> 
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-current branch of ath.git, thanks.

0856655a2547 wcn36xx: Fix dynamic power saving

-- 
https://patchwork.kernel.org/patch/10104441/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v2] wcn36xx: Fix dynamic power saving
@ 2018-01-04 16:48   ` Kalle Valo
  0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2018-01-04 16:48 UTC (permalink / raw)
  Cc: linux-wireless, wcn36xx, linux-arm-msm, k.eugene.e,
	bjorn.andersson, Loic Poulain

Loic Poulain <loic.poulain@linaro.org> wrote:

> Since driver does not report hardware dynamic power saving cap,
> this is up to the mac80211 to manage power saving timeout and
> state machine, using the ieee80211 config callback to report
> PS changes. This patch enables/disables PS mode according to
> the new configuration.
> 
> Remove old behaviour enabling PS mode in a static way, this make
> the device unusable when power save is enabled since device is
> forced to PS regardless RX/TX traffic.
> 
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-current branch of ath.git, thanks.

0856655a2547 wcn36xx: Fix dynamic power saving

-- 
https://patchwork.kernel.org/patch/10104441/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-01-04 16:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11  8:52 [PATCH v2] wcn36xx: Fix dynamic power saving Loic Poulain
2017-12-11 15:34 ` Ramon Fried
2017-12-11 15:34   ` Ramon Fried
2017-12-11 15:41   ` Bjorn Andersson
2017-12-11 15:41     ` Bjorn Andersson
2017-12-11 17:43     ` Loic Poulain
2017-12-11 17:43       ` Loic Poulain
2017-12-12 12:03 ` Kalle Valo
2017-12-12 12:03   ` Kalle Valo
2017-12-12 12:40   ` Kalle Valo
2017-12-12 12:40     ` Kalle Valo
2017-12-12 13:17     ` Loic Poulain
2017-12-12 13:17       ` Loic Poulain
2018-01-04 16:48 ` [v2] " Kalle Valo
2018-01-04 16:48   ` Kalle Valo

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.