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@xxxxxxxxxxxxxxxxxxxx> > > Acked-by: Dan Williams <dcbw@xxxxxxxxxx> > > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html