All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@kvack.org>
To: Dan Williams <dcbw@redhat.com>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>,
	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: Tue, 1 Apr 2008 00:15:30 -0300	[thread overview]
Message-ID: <20080401031530.GA14633@dmt> (raw)
In-Reply-To: <1206653042.21106.10.camel@localhost.localdomain>

On Thu, Mar 27, 2008 at 05:24:02PM -0400, Dan Williams wrote:
> On Wed, 2008-03-26 at 10:21 +0100, Holger Schurig wrote:
> > Besided the direct conversion of the CMD_802_11_RSSI command, this
> > patch also changes the following things:
> > 
> > * calls CMD_802_11_RSSI either asynchronosly (in the background)
> >   when main.c thinks the firmware is hosed and just want's to
> >   get a command through
> > * calls CMD_802_11_RSSI synchronously when called to get wireless
> >   statistics.
> > * don't do in-driver averaging anymore, this and the previous point
> >   eliminates the need for any "struct lbs_private" values
> > * use a 100% quality in a  special ADHOC case
> > 
> > Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
> 
> Acked-by: Dan Williams <dcbw@redhat.com>
> 
> > Index: wireless-testing/drivers/net/wireless/libertas/cmd.c
> > ===================================================================
> > --- wireless-testing.orig/drivers/net/wireless/libertas/cmd.c	2008-03-26 09:18:24.000000000 +0100
> > +++ wireless-testing/drivers/net/wireless/libertas/cmd.c	2008-03-26 09:18:31.000000000 +0100
> > @@ -692,6 +692,44 @@ static int lbs_cmd_802_11_rate_adapt_rat
> >  	return 0;
> >  }
> >  
> > +int lbs_get_rssi(struct lbs_private *priv, u16 *snr, u16 *nf)
> > +{
> > +	struct cmd_ds_802_11_rssi cmd;
> > +	struct cmd_ds_802_11_rssi_rsp rsp;
> > +	int ret;
> > +	u16 _snr, _nf;
> > +
> > +	lbs_deb_enter(LBS_DEB_CMD);
> > +
> > +	cmd.hdr.size = cpu_to_le16(sizeof(cmd));
> > +	cmd.avg_factor = cpu_to_le16(1);
> > +	rsp.hdr.size = cpu_to_le16(sizeof(rsp));
> > +
> > +	/* main.c might have called us just to un-break a hanging firmware */
> > +	if (!snr && !nf) {
> > +		lbs_cmd_async(priv, CMD_802_11_RSSI, &cmd.hdr, sizeof(cmd));
> > +		return 0;
> > +	}
> > +
> > +	ret = lbs_cmd(priv, CMD_802_11_RSSI,
> > +		&cmd, lbs_cmd_copyback, (unsigned long) &rsp);

Won't this call block? You can't block in the get_wireless handler (it
holds the rtnl lock). See wext_handle_ioctl.

  reply	other threads:[~2008-04-01  3:12 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 [this message]
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
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=20080401031530.GA14633@dmt \
    --to=marcelo@kvack.org \
    --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 \
    /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.