All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [RFC] rt2x00: Add autowakeup timer for receiving beacons while in powersave mode
Date: Mon, 31 Jan 2011 19:17:25 +0100	[thread overview]
Message-ID: <20110131181725.GA11054@sig21.net> (raw)
In-Reply-To: <201101311600.39486.IvDoorn@gmail.com>

Hi,

On Mon, Jan 31, 2011 at 04:00:38PM +0100, Ivo van Doorn wrote:
> --- a/drivers/net/wireless/rt2x00/rt2x00config.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00config.c
> @@ -192,6 +192,11 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
>  		       sizeof(libconf.channel));
>  	}
>  
> +	if (test_bit(DRIVER_REQUIRE_PS_AUTOWAKE, &rt2x00dev->flags) &&
> +	    (ieee80211_flags & IEEE80211_CONF_CHANGE_PS) &&
> +	    !(conf->flags & IEEE80211_CONF_PS))
> +		cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);	
> +
>  	/*
>  	 * Start configuration.
>  	 */
> @@ -204,6 +209,13 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
>  	if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL)
>  		rt2x00link_reset_tuner(rt2x00dev, false);
>  
> +	if (test_bit(DRIVER_REQUIRE_PS_AUTOWAKE, &rt2x00dev->flags) &&
> +	    (ieee80211_flags & IEEE80211_CONF_CHANGE_PS) &&
> +	    (conf->flags & IEEE80211_CONF_PS))
> +		queue_delayed_work(rt2x00dev->workqueue,
> +				   &rt2x00dev->autowakeup_work,
> +				   msecs_to_jiffies(rt2x00dev->beacon_int) - 1);
> +

I have doubts about this part.  Doesn't this just catch
one beacon?  I'm not sure how often mac80211 calls the .config
op, I thought it is called once when going to sleep, and then the
hw/fw/driver is responsible to wakeup every n'th beacon
(according to the configured listen interval).

Also, I think rt2x00dev->beacon_int is in TUs, not msecs.


Johannes

  parent reply	other threads:[~2011-01-31 18:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 15:00 [RFC] rt2x00: Add autowakeup timer for receiving beacons while in powersave mode Ivo van Doorn
2011-01-31 15:22 ` Johannes Berg
2011-01-31 15:38   ` Ivo Van Doorn
2011-01-31 15:54     ` [rt2x00-users] " Johannes Stezenbach
2011-01-31 18:17 ` Johannes Stezenbach [this message]
2011-01-31 19:00   ` Ivo Van Doorn
2011-01-31 21:05     ` Johannes Stezenbach
2011-02-02 17:42 ` Kalle Valo
2011-02-02 19:09   ` Ivo Van Doorn
2011-02-10  5:24     ` RA-Jay Hung
2011-02-14 10:14       ` Ivo Van Doorn
2011-02-14 10:25         ` Johannes Berg
2011-02-02 21:29   ` Johannes Stezenbach
2011-02-07 23:33     ` [rt2x00-users] " Aleksandar Milivojevic
2011-02-08  8:48       ` Kalle Valo
2011-02-08 19:11         ` Aleksandar Milivojevic
2011-02-09 12:17           ` Kalle Valo
2011-02-09 14:31           ` Johannes Stezenbach
2011-02-08  8:27     ` Kalle Valo
2011-02-08 20:09       ` Johannes Stezenbach

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=20110131181725.GA11054@sig21.net \
    --to=js@sig21.net \
    --cc=ivdoorn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=users@rt2x00.serialmonkey.com \
    /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.