mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-30 13:38:40 +00:00
rt2x00: Remove check for rf word 0
The only way rf_write() can be called with word 0 is when the user sends the wrong word index through debugfs. However the values which are send through debugfs are validated using the RF_BASE and RF_SIZE macro values, the most logical solution is to increase RF_BASE with 4 and decrease RF_SIZE with 4 (RF_SIZE has always been 1 word too big) Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
62750f421f
commit
53bc647a1a
@ -114,9 +114,6 @@ static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev,
|
|||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (!word)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mutex_lock(&rt2x00dev->csr_mutex);
|
mutex_lock(&rt2x00dev->csr_mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
#define EEPROM_SIZE 0x0100
|
#define EEPROM_SIZE 0x0100
|
||||||
#define BBP_BASE 0x0000
|
#define BBP_BASE 0x0000
|
||||||
#define BBP_SIZE 0x0020
|
#define BBP_SIZE 0x0020
|
||||||
#define RF_BASE 0x0000
|
#define RF_BASE 0x0004
|
||||||
#define RF_SIZE 0x0010
|
#define RF_SIZE 0x000c
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of TX queues.
|
* Number of TX queues.
|
||||||
|
@ -114,9 +114,6 @@ static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev,
|
|||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (!word)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mutex_lock(&rt2x00dev->csr_mutex);
|
mutex_lock(&rt2x00dev->csr_mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
#define EEPROM_SIZE 0x0200
|
#define EEPROM_SIZE 0x0200
|
||||||
#define BBP_BASE 0x0000
|
#define BBP_BASE 0x0000
|
||||||
#define BBP_SIZE 0x0040
|
#define BBP_SIZE 0x0040
|
||||||
#define RF_BASE 0x0000
|
#define RF_BASE 0x0004
|
||||||
#define RF_SIZE 0x0014
|
#define RF_SIZE 0x0010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of TX queues.
|
* Number of TX queues.
|
||||||
|
@ -204,9 +204,6 @@ static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
|
|||||||
{
|
{
|
||||||
u16 reg;
|
u16 reg;
|
||||||
|
|
||||||
if (!word)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mutex_lock(&rt2x00dev->csr_mutex);
|
mutex_lock(&rt2x00dev->csr_mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
#define EEPROM_SIZE 0x006a
|
#define EEPROM_SIZE 0x006a
|
||||||
#define BBP_BASE 0x0000
|
#define BBP_BASE 0x0000
|
||||||
#define BBP_SIZE 0x0060
|
#define BBP_SIZE 0x0060
|
||||||
#define RF_BASE 0x0000
|
#define RF_BASE 0x0004
|
||||||
#define RF_SIZE 0x0014
|
#define RF_SIZE 0x0010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of TX queues.
|
* Number of TX queues.
|
||||||
|
@ -123,9 +123,6 @@ static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev,
|
|||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (!word)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mutex_lock(&rt2x00dev->csr_mutex);
|
mutex_lock(&rt2x00dev->csr_mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -50,8 +50,8 @@
|
|||||||
#define EEPROM_SIZE 0x0100
|
#define EEPROM_SIZE 0x0100
|
||||||
#define BBP_BASE 0x0000
|
#define BBP_BASE 0x0000
|
||||||
#define BBP_SIZE 0x0080
|
#define BBP_SIZE 0x0080
|
||||||
#define RF_BASE 0x0000
|
#define RF_BASE 0x0004
|
||||||
#define RF_SIZE 0x0014
|
#define RF_SIZE 0x0010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of TX queues.
|
* Number of TX queues.
|
||||||
|
@ -122,9 +122,6 @@ static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
|
|||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (!word)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mutex_lock(&rt2x00dev->csr_mutex);
|
mutex_lock(&rt2x00dev->csr_mutex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -50,8 +50,8 @@
|
|||||||
#define EEPROM_SIZE 0x0100
|
#define EEPROM_SIZE 0x0100
|
||||||
#define BBP_BASE 0x0000
|
#define BBP_BASE 0x0000
|
||||||
#define BBP_SIZE 0x0080
|
#define BBP_SIZE 0x0080
|
||||||
#define RF_BASE 0x0000
|
#define RF_BASE 0x0004
|
||||||
#define RF_SIZE 0x0014
|
#define RF_SIZE 0x0010
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of TX queues.
|
* Number of TX queues.
|
||||||
|
Loading…
Reference in New Issue
Block a user