From: Johannes Berg <johannes@sipsolutions.net>
To: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCHv2 1/1] mac80211: Add interface for driver to temporarily disable dynamic ps
Date: Tue, 01 Jun 2010 10:00:33 +0200 [thread overview]
Message-ID: <1275379233.3621.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1275289547-7104-2-git-send-email-juuso.oikarinen@nokia.com>
On Mon, 2010-05-31 at 10:05 +0300, Juuso Oikarinen wrote:
> /**
> + * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm
> + *
> + * @vif: &struct ieee80211_vif pointer from the add_interface callback.
* @disable: ...
The name is also a bit odd since you can re-enable it, but I can't think
of a better name either.
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -478,6 +478,24 @@ static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
> }
> }
>
> +void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif, bool disable)
> +{
> + struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
> + struct ieee80211_local *local = sdata->local;
> +
> + WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION);
> +
> + sdata->disable_dyn_ps = disable;
> +
> + /* immediately go to psm */
> + if (disable && timer_pending(&local->dynamic_ps_timer)) {
> + ieee80211_queue_work(&local->hw,
> + &local->dynamic_ps_enable_work);
> + del_timer_sync(&local->dynamic_ps_timer);
> + }
> +}
The timer trickery seems weird, why not just queue the work and ignore
the timer?
> - if (conf->dynamic_ps_timeout > 0 &&
> + if (conf->dynamic_ps_timeout > 0 && !sdata->disable_dyn_ps &&
As we just discussed on IRC, it might be worthwhile to adjust
dynamic_ps_timeout to 0 instead in this case, so this and the RX and TX
paths need not be touched.
johannes
next prev parent reply other threads:[~2010-06-01 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 7:05 [RFC PATCHv2 0/1] mac80211: Shared BT/WLAN antenna co-existence management Juuso Oikarinen
2010-05-31 7:05 ` [RFC PATCHv2 1/1] mac80211: Add interface for driver to temporarily disable dynamic ps Juuso Oikarinen
2010-06-01 8:00 ` Johannes Berg [this message]
2010-06-01 9:07 ` Juuso Oikarinen
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=1275379233.3621.2.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=juuso.oikarinen@nokia.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).