From: Johannes Berg <johannes@sipsolutions.net>
To: Piotr.Nakraszewicz@tieto.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: Advertise dtim period to all drivers
Date: Tue, 17 Apr 2012 08:23:53 -0700 [thread overview]
Message-ID: <4F8D8B09.8080205@sipsolutions.net> (raw)
In-Reply-To: <E50901D4F2CF69428D43141B7C85867929CC14EA67@EXMB03.eu.tieto.com>
On 4/17/2012 7:40 AM, Piotr.Nakraszewicz@tieto.com wrote:
> Hi,
>
> Don't look for IEEE80211_HW_NEED_DTIM_PERIOD flag after association finishes and advertise DTIM period to all drivers.
This is not possible. If you don't set the flag, we don't necessarily
*know* the DTIM period since we might not ever have received a beacon
from the AP.
johannes
> Signed-off-by: Piotr Nakraszewicz<piotr.nakraszewicz@tieto.com>
> ---
> include/net/mac80211.h | 4 +---
> net/mac80211/mlme.c | 6 +-----
> 2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index bebd89f..436267f 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -230,9 +230,7 @@ enum ieee80211_rssi_event {
> * if the hardware cannot handle this it must set the
> * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag
> * @dtim_period: num of beacons before the next DTIM, for beaconing,
> - * valid in station mode only while @assoc is true and if also
> - * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf
> - * @ps_dtim_period)
> + * valid in station mode only while @assoc is true
> * @last_tsf: last beacon's/probe response's TSF timestamp (could be old
> * as it may have been received during scanning long ago)
> * @beacon_int: beacon interval
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index c8836fa..39e0912 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1290,11 +1290,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
>
> ieee80211_led_assoc(local, 1);
>
> - if (local->hw.flags& IEEE80211_HW_NEED_DTIM_PERIOD)
> - bss_conf->dtim_period = bss->dtim_period;
> - else
> - bss_conf->dtim_period = 0;
> -
> + bss_conf->dtim_period = bss->dtim_period;
> bss_conf->assoc = 1;
>
> /* Tell the driver to monitor connection quality (if supported) */
prev parent reply other threads:[~2012-04-17 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 14:40 [RFC] mac80211: Advertise dtim period to all drivers Piotr.Nakraszewicz
2012-04-17 15:23 ` Johannes Berg [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=4F8D8B09.8080205@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Piotr.Nakraszewicz@tieto.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).