All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: disable power save if an infra AP vif exists
@ 2011-01-31 18:45 Rajkumar Manoharan
  2011-01-31 18:53 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Rajkumar Manoharan @ 2011-01-31 18:45 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Rajkumar Manoharan

PS should not be enabled if an infra AP vif exists in
the interface list. So while recalculating PS,
AP vif type should be taken into account.

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 net/mac80211/mlme.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3221069..82e6b89 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -601,6 +601,15 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
 	list_for_each_entry(sdata, &local->interfaces, list) {
 		if (!ieee80211_sdata_running(sdata))
 			continue;
+		if ((sdata->vif.type == NL80211_IFTYPE_AP) ||
+		    (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) {
+			/* If an AP vif is found, then disable PS
+			 * by setting the count to zero thereby setting
+			 * ps_sdata to NULL.
+			 */
+			count = 0;
+			break;
+		}
 		if (sdata->vif.type != NL80211_IFTYPE_STATION)
 			continue;
 		found = sdata;
-- 
1.7.3.5


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

* Re: [PATCH] mac80211: disable power save if an infra AP vif exists
  2011-01-31 18:45 [PATCH] mac80211: disable power save if an infra AP vif exists Rajkumar Manoharan
@ 2011-01-31 18:53 ` Johannes Berg
  2011-01-31 18:56   ` Rajkumar Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2011-01-31 18:53 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless

On Tue, 2011-02-01 at 00:15 +0530, Rajkumar Manoharan wrote:

> +		if ((sdata->vif.type == NL80211_IFTYPE_AP) ||
> +		    (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) {

I still think you should drop the VLAN check?

johannes


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

* Re: [PATCH] mac80211: disable power save if an infra AP vif exists
  2011-01-31 18:53 ` Johannes Berg
@ 2011-01-31 18:56   ` Rajkumar Manoharan
  0 siblings, 0 replies; 3+ messages in thread
From: Rajkumar Manoharan @ 2011-01-31 18:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Rajkumar Manoharan, linville, linux-wireless

On Tue, Feb 01, 2011 at 12:23:38AM +0530, Johannes Berg wrote:
> On Tue, 2011-02-01 at 00:15 +0530, Rajkumar Manoharan wrote:
> 
> > +		if ((sdata->vif.type == NL80211_IFTYPE_AP) ||
> > +		    (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) {
> 
> I still think you should drop the VLAN check?
Sorry. I missed it.

--
Rajkumar

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-31 18:45 [PATCH] mac80211: disable power save if an infra AP vif exists Rajkumar Manoharan
2011-01-31 18:53 ` Johannes Berg
2011-01-31 18:56   ` Rajkumar Manoharan

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.