All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliad Peller <eliad@wizery.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: add PS flag to bss_conf
Date: Wed, 25 Jul 2012 13:57:25 +0300	[thread overview]
Message-ID: <CAB3XZEc2Z20v2txO_B2H7iZXWsx+SWU_2YtCuRfdE6y7+ktGnA@mail.gmail.com> (raw)
In-Reply-To: <1343140469.4415.36.camel@jlt3.sipsolutions.net>

On Tue, Jul 24, 2012 at 5:34 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2012-07-19 at 16:11 +0300, Eliad Peller wrote:
>> Currently, ps mode is indicated per device (rather than
>> per interface), which doesn't make a lot of sense.
>>
>> Moreover, there are subtle bugs caused by the inability
>> to indicate ps change along with other changes
>> (e.g. when the AP deauth us, we'd like to indicate
>> CHANGED_PS | CHANGED_ASSOC, as changing PS before
>> notifying about disassociation will result in null-packets
>> being sent (if IEEE80211_HW_SUPPORTS_DYNAMIC_PS) while
>> the sta is already disconnected.)
>>
>> Keep the current per-device notifications, and add
>> additional per-vif notifications. In order to keep it
>> simple, these notifications are NOT called due to
>> (temporary) dynamic_ps/offchannel operations.
>
> So I think if we do this, it would make sense to not do it in recalc_ps,
> but like you did in disassoc:
>
>> @@ -1368,6 +1388,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
>>       if (local->hw.conf.flags & IEEE80211_CONF_PS) {
>>               local->hw.conf.flags &= ~IEEE80211_CONF_PS;
>>               ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
>> +             sdata->vif.bss_conf.ps = false;
>> +             changed |= BSS_CHANGED_PS;
>>       }
>>       local->ps_sdata = NULL;
>
> set it directly in the relevant code.
>
>
> However, I'm not sure that we really should toggle it with association?
> For the original CONF_PS semantics where mac80211 actually woke up for
> dynamic PS etc. this made sense, but for smarter devices I think the PS
> flag could be solely mirroring the combination of
>  a) broken AP => no PS
>  b) user enable/disable
>
ok, i think i got your point.

> even when not associated?

we actually check for authorization, so i think it does make some
sense to leave this check.

thanks for the review.
i'll apply your comments and send it as a patch.

Eliad.

      reply	other threads:[~2012-07-25 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 13:11 [RFC] mac80211: add PS flag to bss_conf Eliad Peller
2012-07-24 14:34 ` Johannes Berg
2012-07-25 10:57   ` Eliad Peller [this message]

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=CAB3XZEc2Z20v2txO_B2H7iZXWsx+SWU_2YtCuRfdE6y7+ktGnA@mail.gmail.com \
    --to=eliad@wizery.com \
    --cc=johannes@sipsolutions.net \
    --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: link
Be 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.