[rt2x00-users] [PATCH] rt2800: validate step value for temperature compensation

Ivo Van Doorn ivdoorn at gmail.com
Fri Oct 26 19:46:40 AEDT 2012


On Thu, Oct 25, 2012 at 9:51 AM, Stanislaw Gruszka <sgruszka at redhat.com> wrote:
> Some hardware has correct (!= 0xff) value of tssi_bounds[4] in the
> EEPROM, but step is equal to 0xff. This results on ridiculous delta
> calculations and completely broke TX power settings.
>
> Reported-and-tested-by: Pavel Lucik <pavel.lucik at gmail.com>
> Cc: stable at vger.kernel.org
> Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>

Acked-by: Ivo van Doorn <IvDoorn at gmail.com>

> ---
>  drivers/net/wireless/rt2x00/rt2800lib.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 3bc206d..c0441a7 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -2449,7 +2449,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev)
>         /*
>          * Check if temperature compensation is supported.
>          */
> -       if (tssi_bounds[4] == 0xff)
> +       if (tssi_bounds[4] == 0xff || step == 0xff)
>                 return 0;
>
>         /*
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




More information about the users mailing list