All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linville@tuxdriver.com, mickflemm@gmail.com, jirislaby@gmail.com,
	lrodriguez@atheros.com, linux-wireless@vger.kernel.org,
	ath5k-devel@lists.ath5k.org, linux-kernel@vger.kernel.org,
	michael+ath5k@stapelberg.de
Subject: Re: [PATCH] ath5k: fix detection of jumbo frames
Date: Mon, 03 Nov 2008 08:35:28 -0500	[thread overview]
Message-ID: <1225719328.3575.9.camel@dv> (raw)
In-Reply-To: <1225652938-6244-1-git-send-email-me@bobcopeland.com>

On Sun, 2008-11-02 at 14:08 -0500, Bob Copeland wrote:
> Set ath5k_rs_status.rs_more using mask + shift.  rs_more is a
> u8, but we were setting it with a bitwise AND of a 16 bit value.
> As a consequence, jumbo frames would not be discarded as intended.
> Then, because the hw rate value of such frames is zero, and, since
> 63266a653589e1a237527479f10212ea77ce7844 "ath5k: rates cleanup",
> we do not fall back to the basic rate, such packets would trigger
> the following WARN_ON:

Thanks for catching it!  Please mention rs_antenna in addition to
rs_more.

> -	rs->rs_antenna = rx_status->rx_status_0 &
> -		AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA;
> -	rs->rs_more = rx_status->rx_status_0 &
> -		AR5K_5210_RX_DESC_STATUS0_MORE;
> +	rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0,
> +		AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA);
> +	rs->rs_more = AR5K_REG_MS(rx_status->rx_status_0,
> +		AR5K_5210_RX_DESC_STATUS0_MORE);

rs_more should be boolean.  It would be better to use "!!" to calculate
rs_rate.  No need to shift anything.  As for rs_antenna, it's fine with
me.

> +#define AR5K_5212_RX_DESC_STATUS0_DECOMP_CRC_ERROR_S	13

This doesn't belong to the patch.  It looks like it's another boolean
value, but it's not currently used.

-- 
Regards,
Pavel Roskin

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Roskin <proski@gnu.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linville@tuxdriver.com, mickflemm@gmail.com, jirislaby@gmail.com,
	lrodriguez@atheros.com, linux-wireless@vger.kernel.org,
	ath5k-devel@venema.h4ckr.net, linux-kernel@vger.kernel.org,
	michael+ath5k@stapelberg.de
Subject: Re: [PATCH] ath5k: fix detection of jumbo frames
Date: Mon, 03 Nov 2008 08:35:28 -0500	[thread overview]
Message-ID: <1225719328.3575.9.camel@dv> (raw)
In-Reply-To: <1225652938-6244-1-git-send-email-me@bobcopeland.com>

On Sun, 2008-11-02 at 14:08 -0500, Bob Copeland wrote:
> Set ath5k_rs_status.rs_more using mask + shift.  rs_more is a
> u8, but we were setting it with a bitwise AND of a 16 bit value.
> As a consequence, jumbo frames would not be discarded as intended.
> Then, because the hw rate value of such frames is zero, and, since
> 63266a653589e1a237527479f10212ea77ce7844 "ath5k: rates cleanup",
> we do not fall back to the basic rate, such packets would trigger
> the following WARN_ON:

Thanks for catching it!  Please mention rs_antenna in addition to
rs_more.

> -	rs->rs_antenna = rx_status->rx_status_0 &
> -		AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA;
> -	rs->rs_more = rx_status->rx_status_0 &
> -		AR5K_5210_RX_DESC_STATUS0_MORE;
> +	rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0,
> +		AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA);
> +	rs->rs_more = AR5K_REG_MS(rx_status->rx_status_0,
> +		AR5K_5210_RX_DESC_STATUS0_MORE);

rs_more should be boolean.  It would be better to use "!!" to calculate
rs_rate.  No need to shift anything.  As for rs_antenna, it's fine with
me.

> +#define AR5K_5212_RX_DESC_STATUS0_DECOMP_CRC_ERROR_S	13

This doesn't belong to the patch.  It looks like it's another boolean
value, but it's not currently used.

-- 
Regards,
Pavel Roskin

  parent reply	other threads:[~2008-11-03 13:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 19:08 [PATCH] ath5k: fix detection of jumbo frames Bob Copeland
2008-11-02 19:08 ` Bob Copeland
2008-11-02 21:00 ` [ath5k-devel] " Luis R. Rodriguez
2008-11-02 21:00   ` Luis R. Rodriguez
2008-11-02 21:52   ` Bob Copeland
2008-11-02 21:52     ` Bob Copeland
2008-11-02 22:33     ` Luis R. Rodriguez
2008-11-02 22:33       ` Luis R. Rodriguez
2008-11-03  2:44       ` Bob Copeland
2008-11-03  2:44         ` Bob Copeland
2008-11-03  7:29   ` Kalle Valo
2008-11-03 13:35 ` Pavel Roskin [this message]
2008-11-03 13:35   ` Pavel Roskin
2008-11-03 14:26   ` [ath5k-devel] " Bob Copeland
2008-11-03 14:26     ` Bob Copeland
2008-11-03 14:40     ` Pavel Roskin
2008-11-03 14:40       ` Pavel Roskin
2008-11-04  3:14 ` [PATCH] ath5k: correct handling of rx status fields Bob Copeland
2008-11-04  3:14   ` Bob Copeland

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=1225719328.3575.9.camel@dv \
    --to=proski@gnu.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=me@bobcopeland.com \
    --cc=michael+ath5k@stapelberg.de \
    --cc=mickflemm@gmail.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.