All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 15/18] wl1251: disable power saving in monitor mode
@ 2011-01-30 18:02 David Gnedt
  2011-01-30 19:11 ` David Gnedt
  0 siblings, 1 reply; 4+ messages in thread
From: David Gnedt @ 2011-01-30 18:02 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Kalle Valo, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli

Force power saving off while monitor interface is present.

Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
 drivers/net/wireless/wl1251/main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index d6ae6d5..edafa98 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -616,7 +616,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 			goto out_sleep;
 	}
 
-	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
+	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested &&
+	    !wl->monitor_present) {
 		wl1251_debug(DEBUG_PSM, "psm enabled");
 
 		wl->psm_requested = true;
@@ -632,8 +633,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 		ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
 		if (ret < 0)
 			goto out_sleep;
-	} else if (!(conf->flags & IEEE80211_CONF_PS) &&
-		   wl->psm_requested) {
+	} else if ((!(conf->flags & IEEE80211_CONF_PS) || wl->monitor_present)
+		   && wl->psm_requested) {
 		wl1251_debug(DEBUG_PSM, "psm disabled");
 
 		wl->psm_requested = false;
-- 
1.7.0.4



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

* [PATCH 15/18] wl1251: disable power saving in monitor mode
  2011-01-30 18:02 [PATCH 15/18] wl1251: disable power saving in monitor mode David Gnedt
@ 2011-01-30 19:11 ` David Gnedt
  2011-01-31 15:51   ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: David Gnedt @ 2011-01-30 19:11 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Kalle Valo, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli

Force power saving off while monitor interface is present.

Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
Sorry for the partly broken patches, I thought I configured my client the
right way. I tried to stop the mails at my mailserver, but it was mostly
already too late.
---
 drivers/net/wireless/wl1251/main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index d6ae6d5..edafa98 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -616,7 +616,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 			goto out_sleep;
 	}
 
-	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
+	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested &&
+	    !wl->monitor_present) {
 		wl1251_debug(DEBUG_PSM, "psm enabled");
 
 		wl->psm_requested = true;
@@ -632,8 +633,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 		ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
 		if (ret < 0)
 			goto out_sleep;
-	} else if (!(conf->flags & IEEE80211_CONF_PS) &&
-		   wl->psm_requested) {
+	} else if ((!(conf->flags & IEEE80211_CONF_PS) || wl->monitor_present)
+		   && wl->psm_requested) {
 		wl1251_debug(DEBUG_PSM, "psm disabled");
 
 		wl->psm_requested = false;
-- 
1.7.0.4



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

* Re: [PATCH 15/18] wl1251: disable power saving in monitor mode
  2011-01-30 19:11 ` David Gnedt
@ 2011-01-31 15:51   ` Kalle Valo
  2011-01-31 22:59     ` David Gnedt
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2011-01-31 15:51 UTC (permalink / raw)
  To: David Gnedt
  Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli

David Gnedt <david.gnedt@davizone.at> writes:

> Force power saving off while monitor interface is present.

Again, why? 

Maybe to avoid dropping frames when associated? That would make sense.
But on the other hand someone might want to have power save enabled
when using monitor mode, for example when debugging power save related
issues.

Nevertheless, I think mac80211 is the correct place to do this, not
the driver.

-- 
Kalle Valo

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

* Re: [PATCH 15/18] wl1251: disable power saving in monitor mode
  2011-01-31 15:51   ` Kalle Valo
@ 2011-01-31 22:59     ` David Gnedt
  0 siblings, 0 replies; 4+ messages in thread
From: David Gnedt @ 2011-01-31 22:59 UTC (permalink / raw)
  To: Kalle Valo
  Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
	Denis 'GNUtoo' Carikli

Am 2011-01-31 16:51, schrieb Kalle Valo:
> David Gnedt <david.gnedt@davizone.at> writes:
> 
>> Force power saving off while monitor interface is present.
> 
> Again, why? 
> 
> Maybe to avoid dropping frames when associated? That would make sense.
> But on the other hand someone might want to have power save enabled
> when using monitor mode, for example when debugging power save related
> issues.
> 
> Nevertheless, I think mac80211 is the correct place to do this, not
> the driver.

Yeah, my thought was to avoid dropping frames when associated.
I am going to drop that patch in v2.

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

end of thread, other threads:[~2011-01-31 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30 18:02 [PATCH 15/18] wl1251: disable power saving in monitor mode David Gnedt
2011-01-30 19:11 ` David Gnedt
2011-01-31 15:51   ` Kalle Valo
2011-01-31 22:59     ` David Gnedt

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.