linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
	linux-wireless@vger.kernel.org, Daniel Drake <dsd@gentoo.org>,
	Ulrich Kunitz <kune@deine-taler.de>
Subject: Re: [RFC PATCH 10/17] zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()
Date: Thu, 06 Jan 2011 22:55:20 +0100	[thread overview]
Message-ID: <1294350920.25228.4.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <201101062246.38932.chunkeey@googlemail.com>

On Thu, 2011-01-06 at 22:46 +0100, Christian Lamparter wrote:

> Ideally, you should assign a proper sequence # to beacon frames too.
> (802.11-2007 7.1.3.4.1)
> 
> But as before, the long time between the upload and the actual beacon
> xmit by the hardware make things really difficult. If you just call
> "create_tx_desc_seq" right now, "theoretically" you have to buffer
> all management and other Non-QoS data frames until the beacon was sent.
> 
> However, no one would do that :D. Either the hardware/firmware
> controls the sequence counter or it's simply not implemented
> (and nobody cares ;) ).

Yeah ... it turns out that nobody cares. It's probably easier/better to
actually send beacons with seqno 0 instead of trying to hack around it.



> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index c47d7c0..f71ed31 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -225,6 +225,7 @@ struct ieee80211_if_ap {
>  	struct sk_buff_head ps_bc_buf;
>  	atomic_t num_sta_ps; /* number of stations in PS mode */
>  	int dtim_count;
> +	bool dtim_bc_mc;
>  };
>  
>  struct ieee80211_if_wds {
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 5950e3a..26b688b 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -2178,6 +2178,8 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
>  	if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf))
>  		aid0 = 1;
>  
> +	bss->dtim_bc_mc = aid0 == 1;
> +
>  	if (have_bits) {
>  		/* Find largest even number N1 so that bits numbered 1 through
>  		 * (N1 x 8) - 1 in the bitmap are 0 and number N2 so that bits
> @@ -2540,7 +2542,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
>  	if (sdata->vif.type != NL80211_IFTYPE_AP || !beacon || !beacon->head)
>  		goto out;
>  
> -	if (bss->dtim_count != 0)
> +	if (bss->dtim_count != 0 || !bss->dtim_bc_mc)
>  		goto out; /* send buffered bc/mc only after DTIM beacon */

Hmm, interesting. That makes some sense I guess. Luckily, I have
hardware offload for this (extra queue) so I don't have to worry about
it :-)

johannes


  reply	other threads:[~2011-01-06 21:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 23:47 [RFC PATCH 0/17] zd1211rw: add support for AP mode Jussi Kivilinna
2011-01-04 23:47 ` [RFC PATCH 01/17] zd1211rw: fix tx-queue disabling Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 02/17] zd1211rw: cancel process_intr work on zd_chip_disable_int() Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 03/17] zd1211rw: fix beacon interval setup Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 04/17] zd1211rw: move set_multicast_hash and set_rx_filter from workers to configure_filter Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 05/17] zd1211rw: move set_rts_cts_work to bss_info_changed Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 06/17] zd1211rw: support setting BSSID for AP mode Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 07/17] zd1211rw: fix ack_pending in filter_ack causing tx-packet ordering problem on monitor Jussi Kivilinna
2011-01-04 23:48 ` [RFC PATCH 08/17] zd1211rw: let zd_set_beacon_interval() set dtim_period and add AP-beacon flag Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 09/17] zd1211rw: implement seq_num for IEEE80211_TX_CTL_ASSIGN_SEQ Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 10/17] zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc() Jussi Kivilinna
2011-01-06 21:46   ` Christian Lamparter
2011-01-06 21:55     ` Johannes Berg [this message]
2011-01-09 15:46     ` Jussi Kivilinna
2011-01-09 20:33       ` Christian Lamparter
2011-01-19 18:49         ` Jussi Kivilinna
2011-01-19 20:22           ` Christian Lamparter
2011-01-20  8:16             ` Jussi Kivilinna
2011-01-20  9:13               ` Helmut Schaa
2011-01-20 17:43               ` Christian Lamparter
2011-01-04 23:49 ` [RFC PATCH 11/17] zd1211rw: add beacon watchdog and setting HW beacon more failsafe Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 12/17] zd1211rw: batch beacon config commands together Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 13/17] zd1211rw: use stack for small cmd-buffers Jussi Kivilinna
2011-01-05  9:27   ` Johannes Berg
2011-01-06 18:55     ` Dan Williams
2011-01-06 21:53       ` Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 14/17] zd1211rw: lower hw command timeouts Jussi Kivilinna
2011-01-04 23:49 ` [RFC PATCH 15/17] zd1211rw: collect driver settings and add function to restore theim Jussi Kivilinna
2011-01-04 23:50 ` [RFC PATCH 16/17] zd1211rw: add tx watchdog Jussi Kivilinna
2011-01-04 23:50 ` [RFC PATCH 17/17] zd1211rw: enable NL80211_IFTYPE_AP Jussi Kivilinna

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=1294350920.25228.4.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=chunkeey@googlemail.com \
    --cc=dsd@gentoo.org \
    --cc=jussi.kivilinna@mbnet.fi \
    --cc=kune@deine-taler.de \
    --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).