Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204607 > unrolled thread

[PATCH] rt2x00: adjust EEPROM_SIZE for rt2500usb

Started byAdrien Schildknecht <adrien+dev@schischi.me>
First post2015-08-11 00:30 +0200
Last post2015-08-18 08:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rt2x00: adjust EEPROM_SIZE for rt2500usb Adrien Schildknecht <adrien+dev@schischi.me> - 2015-08-11 00:30 +0200
    Re: [PATCH] rt2x00: adjust EEPROM_SIZE for rt2500usb Stanislaw Gruszka <sgruszka@redhat.com> - 2015-08-12 11:10 +0200
    Re: rt2x00: adjust EEPROM_SIZE for rt2500usb Kalle Valo <kvalo@codeaurora.org> - 2015-08-18 08:10 +0200

#1204607 — [PATCH] rt2x00: adjust EEPROM_SIZE for rt2500usb

FromAdrien Schildknecht <adrien+dev@schischi.me>
Date2015-08-11 00:30 +0200
Subject[PATCH] rt2x00: adjust EEPROM_SIZE for rt2500usb
Message-ID<pW3JU-2OH-25@gated-at.bofh.it>
rt2500usb_validate_eeprom() read data up to 0x6e (EEPROM_CALIBRATE_OFFSET)
but only 0x6a bytes has been allocated and read from the eeprom.

This lead to out-of-bound accesses and invalid values for
EEPROM_BBPTUNE_R17 and EEPROM_CALIBRATE_OFFSET.

Change the EEPROM_SIZE to 0x6e in order to retrieve all the fields.

Tested with a rt2570 device.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
---
 drivers/net/wireless/rt2x00/rt2500usb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rt2x00/rt2500usb.h b/drivers/net/wireless/rt2x00/rt2500usb.h
index afba073..78cc035 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.h
+++ b/drivers/net/wireless/rt2x00/rt2500usb.h
@@ -54,7 +54,7 @@
 #define CSR_REG_BASE			0x0400
 #define CSR_REG_SIZE			0x0100
 #define EEPROM_BASE			0x0000
-#define EEPROM_SIZE			0x006a
+#define EEPROM_SIZE			0x006e
 #define BBP_BASE			0x0000
 #define BBP_SIZE			0x0060
 #define RF_BASE				0x0004
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1205728

FromStanislaw Gruszka <sgruszka@redhat.com>
Date2015-08-12 11:10 +0200
Message-ID<pWAcO-8hY-21@gated-at.bofh.it>
In reply to#1204607
On Tue, Aug 11, 2015 at 12:25:53AM +0200, Adrien Schildknecht wrote:
> rt2500usb_validate_eeprom() read data up to 0x6e (EEPROM_CALIBRATE_OFFSET)
> but only 0x6a bytes has been allocated and read from the eeprom.
> 
> This lead to out-of-bound accesses and invalid values for
> EEPROM_BBPTUNE_R17 and EEPROM_CALIBRATE_OFFSET.
> 
> Change the EEPROM_SIZE to 0x6e in order to retrieve all the fields.
> 
> Tested with a rt2570 device.
> 
> Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>

Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1209059 — Re: rt2x00: adjust EEPROM_SIZE for rt2500usb

FromKalle Valo <kvalo@codeaurora.org>
Date2015-08-18 08:10 +0200
SubjectRe: rt2x00: adjust EEPROM_SIZE for rt2500usb
Message-ID<pYIfU-631-23@gated-at.bofh.it>
In reply to#1204607
> rt2500usb_validate_eeprom() read data up to 0x6e (EEPROM_CALIBRATE_OFFSET)
> but only 0x6a bytes has been allocated and read from the eeprom.
> 
> This lead to out-of-bound accesses and invalid values for
> EEPROM_BBPTUNE_R17 and EEPROM_CALIBRATE_OFFSET.
> 
> Change the EEPROM_SIZE to 0x6e in order to retrieve all the fields.
> 
> Tested with a rt2570 device.
> 
> Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web