linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] libertas: fix sanity check on sequence number in command response
Date: Tue, 04 Mar 2008 12:12:44 -0500	[thread overview]
Message-ID: <1204650764.30024.8.camel@localhost.localdomain> (raw)
In-Reply-To: <200803031220.12420.hs4233@mail.mn-solutions.de>

On Mon, 2008-03-03 at 12:20 +0100, Holger Schurig wrote:
> From: David Woodhouse <dwmw2@infradead.org>
> 
> Slightly more useful if we compare it against the sequence number of the
> command we have outstanding, rather than comparing the reply with itself.
>     
> Doh. Pointed out by Sebastian Siewior
>     
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>

Acked-by: Dan Williams <dcbw@redhat.com>

> diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
> index e6b4b23..52d02f3 100644
> --- a/drivers/net/wireless/libertas/cmdresp.c
> +++ b/drivers/net/wireless/libertas/cmdresp.c
> @@ -509,9 +509,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
>  		     respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
>  	lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
>  
> -	if (resp->seqnum != resp->seqnum) {
> +	if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
>  		lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
> -			    le16_to_cpu(resp->seqnum), le16_to_cpu(resp->seqnum));
> +			    le16_to_cpu(resp->seqnum), le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
>  		spin_unlock_irqrestore(&priv->driver_lock, flags);
>  		ret = -1;
>  		goto done;


      reply	other threads:[~2008-03-04 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 11:20 [PATCH] libertas: fix sanity check on sequence number in command response Holger Schurig
2008-03-04 17:12 ` Dan Williams [this message]

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=1204650764.30024.8.camel@localhost.localdomain \
    --to=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 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).