Search Linux Wireless

Re: [PATCH] mac80211: make HT bogus rate warning more verbose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 9, 2009 at 1:24 PM, Luis R. Rodriguez
<lrodriguez@xxxxxxxxxxx> wrote:
> This will help debug an issue when the driver is passing up
> a bogus HT rate value. The rate must map to a valid MCS index
> which can be any of the values 0 - 76.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
> ---
>  net/mac80211/rx.c |   18 +++++++++++++++---
>  1 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 28316b2..5b26d34 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -2425,9 +2425,21 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
>                goto drop;
>
>        if (status->flag & RX_FLAG_HT) {
> -               /* rate_idx is MCS index */
> -               if (WARN_ON(status->rate_idx < 0 ||
> -                           status->rate_idx >= 76))
> +               /*
> +                * rate_idx is MCS index, which can be 0-76 as documented on:
> +                *
> +                * http://wireless.kernel.org/en/developers/Documentation/ieee80211/802.11n
> +                *
> +                * Anything else would be some sort of driver or hardware error.
> +                * The driver should catch hardware errors.
> +                */
> +               if (WARN((status->rate_idx < 0 ||
> +                        status->rate_idx >= 76),

If 76 is valid value as indicated in comment above: 0-76,
 shouldn't this be

+                        status->rate_idx > 76),

??


> +                        "Rate marked as an HT rate but passed "
> +                        "status->rate_idx is not "
> +                        "an MCS index (0-76): %d (0x%02x)\n",
> +                        status->rate_idx,
> +                        status->rate_idx))
>                        goto drop;
>                /* HT rates are not in the table - use the highest legacy rate
>                 * for now since other parts of mac80211 may not yet be fully
> --
> 1.6.5.2.143.g8cc62
>
> --
> 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
>

-Bob Beers
--
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux