mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-04 10:09:06 +00:00
rt2x00: adjust EEPROM_SIZE for rt2500usb
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
bafc6e4cd8
commit
f10746fef3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user