* [PATCH] rt2800: validate step value for temperature compensation
@ 2012-10-25 7:51 Stanislaw Gruszka
2012-10-26 8:46 ` Ivo Van Doorn
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2012-10-25 7:51 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, users, Pavel Lucik
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@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rt2800: validate step value for temperature compensation
2012-10-25 7:51 [PATCH] rt2800: validate step value for temperature compensation Stanislaw Gruszka
@ 2012-10-26 8:46 ` Ivo Van Doorn
0 siblings, 0 replies; 2+ messages in thread
From: Ivo Van Doorn @ 2012-10-26 8:46 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: John W. Linville, linux-wireless, users, Pavel Lucik
On Thu, Oct 25, 2012 at 9:51 AM, Stanislaw Gruszka <sgruszka@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@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-26 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 7:51 [PATCH] rt2800: validate step value for temperature compensation Stanislaw Gruszka
2012-10-26 8:46 ` Ivo Van Doorn
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).