linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Marcelo Tosatti <marcelo@kvack.org>,
	Dan Williams <dcbw@redhat.com>,
	linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	libertas-dev@lists.infradead.org
Subject: Re: [PATCH, take 3] libertas: convert RSSI to a direct command
Date: Thu, 10 Apr 2008 12:43:41 -0300	[thread overview]
Message-ID: <20080410154341.GB6741@dmt> (raw)
In-Reply-To: <200804010848.48789.hs4233@mail.mn-solutions.de>

On Tue, Apr 01, 2008 at 08:48:48AM +0200, Holger Schurig wrote:
> > Won't this call block? You can't block in the get_wireless
> > handler (it holds the rtnl lock). See wext_handle_ioctl.
> 
> Yes, this blocks.
> 
> So you mean that when I cannot get a current RSSI value at this 
> time I have to re-use some old value?

All I mean is that get_wireless_stats should not schedule() because it
holds the rtnl_lock. You get ugly hangs doing that.

>   The older code used this 
> schema:
> 
> 
> when associated:
>    get rssi in-the-background and store it away
> 
> when AdHoc network created:
>    get rssi in-the-background and store it away
> 
> 
> in lbs_get_wireless_stats()
>    use stored away RSSI value
>    get rssi in-the-background and store it away
>    
> 
> The problem with this scheme is that the "stored away RSSI" might 
> be an hour ago. So the first call to to get the wireless stats 
> gives you back a blatant lie.
> 
> Do you see a way around this?

Either live with the fact that you need to query the driver a few times
for a reliable result or add a timer to periodically update RSSI.

  parent reply	other threads:[~2008-04-10 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26  9:21 [PATCH, take 3] libertas: convert RSSI to a direct command Holger Schurig
2008-03-27 21:24 ` Dan Williams
2008-04-01  3:15   ` Marcelo Tosatti
2008-04-01  6:48     ` Holger Schurig
     [not found]       ` <200804010943.56075.marc.pignat@hevs.ch>
2008-04-01 13:30         ` Holger Schurig
2008-04-10 15:43       ` Marcelo Tosatti [this message]
2008-04-10 15:47         ` Johannes Berg
2008-04-10 19:08           ` Marcelo Tosatti
2008-04-11 12:17             ` Johannes Berg

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=20080410154341.GB6741@dmt \
    --to=mtosatti@redhat.com \
    --cc=dcbw@redhat.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marcelo@kvack.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).