All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] mac80211: disable ps if an AP type vif is present
@ 2011-01-30 13:36 Rajkumar Manoharan
  2011-01-31 11:32 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Rajkumar Manoharan @ 2011-01-30 13:36 UTC (permalink / raw)
  To: linux-wireless; +Cc: Rajkumar Manoharan

PS should be disabled for AP type. So while recalculating
PS, AP vif type should be taken into account.

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

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3221069..1fd6023 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -601,6 +601,12 @@ 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)) &&
+		    !sdata->vif.p2p) {
+			count = 0;
+			break;
+		}
 		if (sdata->vif.type != NL80211_IFTYPE_STATION)
 			continue;
 		found = sdata;
-- 
1.7.3.5


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

* Re: [RFC] mac80211: disable ps if an AP type vif is present
  2011-01-30 13:36 [RFC] mac80211: disable ps if an AP type vif is present Rajkumar Manoharan
@ 2011-01-31 11:32 ` Johannes Berg
  2011-01-31 11:53   ` Rajkumar Manoharan
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2011-01-31 11:32 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linux-wireless

On Sun, 2011-01-30 at 19:06 +0530, Rajkumar Manoharan wrote:
> PS should be disabled for AP type. So while recalculating
> PS, AP vif type should be taken into account.
> 
> Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
> ---
>  net/mac80211/mlme.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 3221069..1fd6023 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -601,6 +601,12 @@ 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)) &&
> +		    !sdata->vif.p2p) {
> +			count = 0;
> +			break;

I'd leave out the P2P check for now -- as soon as you have more than one
interface we don't go to PS, and we don't have NoA things etc. yet.

Also, the VLAN check can go, since if there's a VLAN then there must
also be an AP.

Setting count to 0 is likely to be confusing to somebody trying to
implement multi-interface PS though, a comment would be good.

johannes


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

* Re: [RFC] mac80211: disable ps if an AP type vif is present
  2011-01-31 11:32 ` Johannes Berg
@ 2011-01-31 11:53   ` Rajkumar Manoharan
  2011-01-31 12:07     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Rajkumar Manoharan @ 2011-01-31 11:53 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Rajkumar Manoharan, linux-wireless

On Mon, Jan 31, 2011 at 05:02:38PM +0530, Johannes Berg wrote:
> On Sun, 2011-01-30 at 19:06 +0530, Rajkumar Manoharan wrote:
> > PS should be disabled for AP type. So while recalculating
> > PS, AP vif type should be taken into account.
> > 
> > Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
> > ---
> >  net/mac80211/mlme.c |    6 ++++++
> >  1 files changed, 6 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> > index 3221069..1fd6023 100644
> > --- a/net/mac80211/mlme.c
> > +++ b/net/mac80211/mlme.c
> > @@ -601,6 +601,12 @@ 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)) &&
> > +		    !sdata->vif.p2p) {
> > +			count = 0;
> > +			break;
> 
> I'd leave out the P2P check for now -- as soon as you have more than one
> interface we don't go to PS,
Not exactly. we are counting only station type, though we have multi vifs.
>and we don't have NoA things etc. yet.
the p2p check means that infra AP only.

> Also, the VLAN check can go, since if there's a VLAN then there must
> also be an AP.
> 
> Setting count to 0 is likely to be confusing to somebody trying to
> implement multi-interface PS though, a comment would be good.
Sure. 

--
Rajkumar

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

* Re: [RFC] mac80211: disable ps if an AP type vif is present
  2011-01-31 11:53   ` Rajkumar Manoharan
@ 2011-01-31 12:07     ` Johannes Berg
  2011-01-31 13:55       ` Rajkumar Manoharan
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2011-01-31 12:07 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: Rajkumar Manoharan, linux-wireless

On Mon, 2011-01-31 at 17:23 +0530, Rajkumar Manoharan wrote:

> > >  	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)) &&
> > > +		    !sdata->vif.p2p) {
> > > +			count = 0;
> > > +			break;
> > 
> > I'd leave out the P2P check for now -- as soon as you have more than one
> > interface we don't go to PS,
> Not exactly. we are counting only station type, though we have multi vifs.

Right -- that was confusing.

> >and we don't have NoA things etc. yet.
> the p2p check means that infra AP only.

Yeah but do we have any drivers that handle PS in P2P mode? I guess
iwlwifi might if you have the right firmware, but ath9k surely won't?
I'd rather not have to worry about it right now.

johannes


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

* Re: [RFC] mac80211: disable ps if an AP type vif is present
  2011-01-31 12:07     ` Johannes Berg
@ 2011-01-31 13:55       ` Rajkumar Manoharan
  0 siblings, 0 replies; 5+ messages in thread
From: Rajkumar Manoharan @ 2011-01-31 13:55 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Rajkumar Manoharan, linux-wireless

On Mon, Jan 31, 2011 at 05:37:16PM +0530, Johannes Berg wrote:
> On Mon, 2011-01-31 at 17:23 +0530, Rajkumar Manoharan wrote:
> 
> > > >  	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)) &&
> > > > +		    !sdata->vif.p2p) {
> > > > +			count = 0;
> > > > +			break;
> > > 
> > > I'd leave out the P2P check for now -- as soon as you have more than one
> > > interface we don't go to PS,
> > Not exactly. we are counting only station type, though we have multi vifs.
> 
> Right -- that was confusing.
> 
> > >and we don't have NoA things etc. yet.
> > the p2p check means that infra AP only.
> 
> Yeah but do we have any drivers that handle PS in P2P mode? I guess
> iwlwifi might if you have the right firmware, but ath9k surely won't?
> I'd rather not have to worry about it right now.
Ok. I leave the p2p check and send the patch. Thanks for the review.

--
Rajkumar

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30 13:36 [RFC] mac80211: disable ps if an AP type vif is present Rajkumar Manoharan
2011-01-31 11:32 ` Johannes Berg
2011-01-31 11:53   ` Rajkumar Manoharan
2011-01-31 12:07     ` Johannes Berg
2011-01-31 13:55       ` 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.