linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Coelho <coelho@ti.com>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] wl12xx: handle CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID
Date: Mon, 19 Sep 2011 08:21:50 +0300	[thread overview]
Message-ID: <1316409710.2157.18.camel@cumari> (raw)
In-Reply-To: <1316347759-22030-2-git-send-email-eliad@wizery.com>

On Sun, 2011-09-18 at 15:09 +0300, Eliad Peller wrote: 
> The fw sends the CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID event
> when it wants the driver to increase the dynamic ps (auto-mode)
> timeout (or restore the original timeout).
> 
> unmask CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID, and increase/restore
> the dynamic ps default timeout upon getting this event.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Okay, now I see you're doing it automatically here (I should read all
the series before commenting :P).  Anyway, do we really need the debugfs
stuff? It's okay to make it readable, but I still don't see why we need
to write.


> diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
> index c73fe4c..79ff3bb 100644
> --- a/drivers/net/wireless/wl12xx/event.c
> +++ b/drivers/net/wireless/wl12xx/event.c
> @@ -258,6 +258,14 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
>  		wl12xx_event_soft_gemini_sense(wl,
>  					       mbox->soft_gemini_sense_info);
>  
> +	if (vector & CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID &&
> +	    wl->bss_type == BSS_TYPE_STA_BSS) {
> +		int timeout = -1;
> +		if (mbox->change_auto_mode_timeout)
> +			timeout = 500;
> +		ieee80211_set_dyn_ps_timeout(wl->vif, timeout);
> +	}
> +
>  	/*
>  	 * The BSS_LOSE_EVENT_ID is only needed while psm (and hence beacon
>  	 * filtering) is enabled. Without PSM, the stack will receive all

Any more details on why you chose 500? Should this be part of conf or a
macro to avoid magic numbers?

-- 
Cheers,
Luca.


  reply	other threads:[~2011-09-19  5:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 12:09 [PATCH 1/2] wl12xx: add dynamic_ps_timeout debugfs entry Eliad Peller
2011-09-18 12:09 ` [PATCH 2/2] wl12xx: handle CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID Eliad Peller
2011-09-19  5:21   ` Luciano Coelho [this message]
2011-09-19  7:07     ` Eliad Peller
2011-09-19  5:07 ` [PATCH 1/2] wl12xx: add dynamic_ps_timeout debugfs entry Luciano Coelho
2011-09-19  5:11 ` Luciano Coelho
2011-09-22  5:33 ` Luciano Coelho

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=1316409710.2157.18.camel@cumari \
    --to=coelho@ti.com \
    --cc=eliad@wizery.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).