diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-02-15 11:42:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:35 -0500 |
commit | 53bc647a1a96189be53b68b9e8c40df0f42fc300 (patch) | |
tree | 97482c3544d35921ff06f3221456e389194fd640 /drivers/net | |
parent | 62750f421f6eebabedf545183ef8291cd3e63c78 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.h | 4 |
10 files changed, 10 insertions, 25 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index b0848259b455..0f08773328c6 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -114,9 +114,6 @@ static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev, | |||
114 | { | 114 | { |
115 | u32 reg; | 115 | u32 reg; |
116 | 116 | ||
117 | if (!word) | ||
118 | return; | ||
119 | |||
120 | mutex_lock(&rt2x00dev->csr_mutex); | 117 | mutex_lock(&rt2x00dev->csr_mutex); |
121 | 118 | ||
122 | /* | 119 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.h b/drivers/net/wireless/rt2x00/rt2400pci.h index 72ac31c3cb75..ec3b004ddc3c 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.h +++ b/drivers/net/wireless/rt2x00/rt2400pci.h | |||
@@ -48,8 +48,8 @@ | |||
48 | #define EEPROM_SIZE 0x0100 | 48 | #define EEPROM_SIZE 0x0100 |
49 | #define BBP_BASE 0x0000 | 49 | #define BBP_BASE 0x0000 |
50 | #define BBP_SIZE 0x0020 | 50 | #define BBP_SIZE 0x0020 |
51 | #define RF_BASE 0x0000 | 51 | #define RF_BASE 0x0004 |
52 | #define RF_SIZE 0x0010 | 52 | #define RF_SIZE 0x000c |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Number of TX queues. | 55 | * Number of TX queues. |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index eb82860c54f9..276a8232aaa0 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -114,9 +114,6 @@ static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev, | |||
114 | { | 114 | { |
115 | u32 reg; | 115 | u32 reg; |
116 | 116 | ||
117 | if (!word) | ||
118 | return; | ||
119 | |||
120 | mutex_lock(&rt2x00dev->csr_mutex); | 117 | mutex_lock(&rt2x00dev->csr_mutex); |
121 | 118 | ||
122 | /* | 119 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.h b/drivers/net/wireless/rt2x00/rt2500pci.h index 17a0c9c8c184..ce2f065c7486 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.h +++ b/drivers/net/wireless/rt2x00/rt2500pci.h | |||
@@ -59,8 +59,8 @@ | |||
59 | #define EEPROM_SIZE 0x0200 | 59 | #define EEPROM_SIZE 0x0200 |
60 | #define BBP_BASE 0x0000 | 60 | #define BBP_BASE 0x0000 |
61 | #define BBP_SIZE 0x0040 | 61 | #define BBP_SIZE 0x0040 |
62 | #define RF_BASE 0x0000 | 62 | #define RF_BASE 0x0004 |
63 | #define RF_SIZE 0x0014 | 63 | #define RF_SIZE 0x0010 |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Number of TX queues. | 66 | * Number of TX queues. |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 270691ac2361..ca280674180e 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -204,9 +204,6 @@ static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev, | |||
204 | { | 204 | { |
205 | u16 reg; | 205 | u16 reg; |
206 | 206 | ||
207 | if (!word) | ||
208 | return; | ||
209 | |||
210 | mutex_lock(&rt2x00dev->csr_mutex); | 207 | mutex_lock(&rt2x00dev->csr_mutex); |
211 | 208 | ||
212 | /* | 209 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.h b/drivers/net/wireless/rt2x00/rt2500usb.h index afce0e0322c3..5bc46fe72179 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.h +++ b/drivers/net/wireless/rt2x00/rt2500usb.h | |||
@@ -59,8 +59,8 @@ | |||
59 | #define EEPROM_SIZE 0x006a | 59 | #define EEPROM_SIZE 0x006a |
60 | #define BBP_BASE 0x0000 | 60 | #define BBP_BASE 0x0000 |
61 | #define BBP_SIZE 0x0060 | 61 | #define BBP_SIZE 0x0060 |
62 | #define RF_BASE 0x0000 | 62 | #define RF_BASE 0x0004 |
63 | #define RF_SIZE 0x0014 | 63 | #define RF_SIZE 0x0010 |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Number of TX queues. | 66 | * Number of TX queues. |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 0be147f364e7..2ca8b7a9722c 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -123,9 +123,6 @@ static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev, | |||
123 | { | 123 | { |
124 | u32 reg; | 124 | u32 reg; |
125 | 125 | ||
126 | if (!word) | ||
127 | return; | ||
128 | |||
129 | mutex_lock(&rt2x00dev->csr_mutex); | 126 | mutex_lock(&rt2x00dev->csr_mutex); |
130 | 127 | ||
131 | /* | 128 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.h b/drivers/net/wireless/rt2x00/rt61pci.h index 2f97fee7a8de..41e8959919f6 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.h +++ b/drivers/net/wireless/rt2x00/rt61pci.h | |||
@@ -50,8 +50,8 @@ | |||
50 | #define EEPROM_SIZE 0x0100 | 50 | #define EEPROM_SIZE 0x0100 |
51 | #define BBP_BASE 0x0000 | 51 | #define BBP_BASE 0x0000 |
52 | #define BBP_SIZE 0x0080 | 52 | #define BBP_SIZE 0x0080 |
53 | #define RF_BASE 0x0000 | 53 | #define RF_BASE 0x0004 |
54 | #define RF_SIZE 0x0014 | 54 | #define RF_SIZE 0x0010 |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Number of TX queues. | 57 | * Number of TX queues. |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 8f522342b16d..846996c63303 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -122,9 +122,6 @@ static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev, | |||
122 | { | 122 | { |
123 | u32 reg; | 123 | u32 reg; |
124 | 124 | ||
125 | if (!word) | ||
126 | return; | ||
127 | |||
128 | mutex_lock(&rt2x00dev->csr_mutex); | 125 | mutex_lock(&rt2x00dev->csr_mutex); |
129 | 126 | ||
130 | /* | 127 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h index 834b28ce6cde..c8016f65b4bd 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.h +++ b/drivers/net/wireless/rt2x00/rt73usb.h | |||
@@ -50,8 +50,8 @@ | |||
50 | #define EEPROM_SIZE 0x0100 | 50 | #define EEPROM_SIZE 0x0100 |
51 | #define BBP_BASE 0x0000 | 51 | #define BBP_BASE 0x0000 |
52 | #define BBP_SIZE 0x0080 | 52 | #define BBP_SIZE 0x0080 |
53 | #define RF_BASE 0x0000 | 53 | #define RF_BASE 0x0004 |
54 | #define RF_SIZE 0x0014 | 54 | #define RF_SIZE 0x0010 |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Number of TX queues. | 57 | * Number of TX queues. |