aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c22
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h10
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00debug.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.h8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h11
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c14
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c22
10 files changed, 57 insertions, 62 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index fc162122617e..f2d0febbec49 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -54,7 +54,7 @@
54 * the access attempt is considered to have failed, 54 * the access attempt is considered to have failed,
55 * and we will print an error. 55 * and we will print an error.
56 */ 56 */
57static u32 rt2400pci_bbp_check(const struct rt2x00_dev *rt2x00dev) 57static u32 rt2400pci_bbp_check(struct rt2x00_dev *rt2x00dev)
58{ 58{
59 u32 reg; 59 u32 reg;
60 unsigned int i; 60 unsigned int i;
@@ -69,7 +69,7 @@ static u32 rt2400pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
69 return reg; 69 return reg;
70} 70}
71 71
72static void rt2400pci_bbp_write(const struct rt2x00_dev *rt2x00dev, 72static void rt2400pci_bbp_write(struct rt2x00_dev *rt2x00dev,
73 const unsigned int word, const u8 value) 73 const unsigned int word, const u8 value)
74{ 74{
75 u32 reg; 75 u32 reg;
@@ -95,7 +95,7 @@ static void rt2400pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
95 rt2x00pci_register_write(rt2x00dev, BBPCSR, reg); 95 rt2x00pci_register_write(rt2x00dev, BBPCSR, reg);
96} 96}
97 97
98static void rt2400pci_bbp_read(const struct rt2x00_dev *rt2x00dev, 98static void rt2400pci_bbp_read(struct rt2x00_dev *rt2x00dev,
99 const unsigned int word, u8 *value) 99 const unsigned int word, u8 *value)
100{ 100{
101 u32 reg; 101 u32 reg;
@@ -132,7 +132,7 @@ static void rt2400pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
132 *value = rt2x00_get_field32(reg, BBPCSR_VALUE); 132 *value = rt2x00_get_field32(reg, BBPCSR_VALUE);
133} 133}
134 134
135static void rt2400pci_rf_write(const struct rt2x00_dev *rt2x00dev, 135static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev,
136 const unsigned int word, const u32 value) 136 const unsigned int word, const u32 value)
137{ 137{
138 u32 reg; 138 u32 reg;
@@ -195,13 +195,13 @@ static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
195#ifdef CONFIG_RT2X00_LIB_DEBUGFS 195#ifdef CONFIG_RT2X00_LIB_DEBUGFS
196#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) 196#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
197 197
198static void rt2400pci_read_csr(const struct rt2x00_dev *rt2x00dev, 198static void rt2400pci_read_csr(struct rt2x00_dev *rt2x00dev,
199 const unsigned int word, u32 *data) 199 const unsigned int word, u32 *data)
200{ 200{
201 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); 201 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
202} 202}
203 203
204static void rt2400pci_write_csr(const struct rt2x00_dev *rt2x00dev, 204static void rt2400pci_write_csr(struct rt2x00_dev *rt2x00dev,
205 const unsigned int word, u32 data) 205 const unsigned int word, u32 data)
206{ 206{
207 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); 207 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 869b1a7cec73..3d02c0d297e8 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -54,7 +54,7 @@
54 * the access attempt is considered to have failed, 54 * the access attempt is considered to have failed,
55 * and we will print an error. 55 * and we will print an error.
56 */ 56 */
57static u32 rt2500pci_bbp_check(const struct rt2x00_dev *rt2x00dev) 57static u32 rt2500pci_bbp_check(struct rt2x00_dev *rt2x00dev)
58{ 58{
59 u32 reg; 59 u32 reg;
60 unsigned int i; 60 unsigned int i;
@@ -69,7 +69,7 @@ static u32 rt2500pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
69 return reg; 69 return reg;
70} 70}
71 71
72static void rt2500pci_bbp_write(const struct rt2x00_dev *rt2x00dev, 72static void rt2500pci_bbp_write(struct rt2x00_dev *rt2x00dev,
73 const unsigned int word, const u8 value) 73 const unsigned int word, const u8 value)
74{ 74{
75 u32 reg; 75 u32 reg;
@@ -95,7 +95,7 @@ static void rt2500pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
95 rt2x00pci_register_write(rt2x00dev, BBPCSR, reg); 95 rt2x00pci_register_write(rt2x00dev, BBPCSR, reg);
96} 96}
97 97
98static void rt2500pci_bbp_read(const struct rt2x00_dev *rt2x00dev, 98static void rt2500pci_bbp_read(struct rt2x00_dev *rt2x00dev,
99 const unsigned int word, u8 *value) 99 const unsigned int word, u8 *value)
100{ 100{
101 u32 reg; 101 u32 reg;
@@ -132,7 +132,7 @@ static void rt2500pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
132 *value = rt2x00_get_field32(reg, BBPCSR_VALUE); 132 *value = rt2x00_get_field32(reg, BBPCSR_VALUE);
133} 133}
134 134
135static void rt2500pci_rf_write(const struct rt2x00_dev *rt2x00dev, 135static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev,
136 const unsigned int word, const u32 value) 136 const unsigned int word, const u32 value)
137{ 137{
138 u32 reg; 138 u32 reg;
@@ -195,13 +195,13 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
195#ifdef CONFIG_RT2X00_LIB_DEBUGFS 195#ifdef CONFIG_RT2X00_LIB_DEBUGFS
196#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) 196#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
197 197
198static void rt2500pci_read_csr(const struct rt2x00_dev *rt2x00dev, 198static void rt2500pci_read_csr(struct rt2x00_dev *rt2x00dev,
199 const unsigned int word, u32 *data) 199 const unsigned int word, u32 *data)
200{ 200{
201 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); 201 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
202} 202}
203 203
204static void rt2500pci_write_csr(const struct rt2x00_dev *rt2x00dev, 204static void rt2500pci_write_csr(struct rt2x00_dev *rt2x00dev,
205 const unsigned int word, u32 data) 205 const unsigned int word, u32 data)
206{ 206{
207 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); 207 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 4f8e388700c0..164548fd22b7 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -53,7 +53,7 @@
53 * the access attempt is considered to have failed, 53 * the access attempt is considered to have failed,
54 * and we will print an error. 54 * and we will print an error.
55 */ 55 */
56static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev, 56static inline void rt2500usb_register_read(struct rt2x00_dev *rt2x00dev,
57 const unsigned int offset, 57 const unsigned int offset,
58 u16 *value) 58 u16 *value)
59{ 59{
@@ -64,8 +64,7 @@ static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev,
64 *value = le16_to_cpu(reg); 64 *value = le16_to_cpu(reg);
65} 65}
66 66
67static inline void rt2500usb_register_multiread(const struct rt2x00_dev 67static inline void rt2500usb_register_multiread(struct rt2x00_dev *rt2x00dev,
68 *rt2x00dev,
69 const unsigned int offset, 68 const unsigned int offset,
70 void *value, const u16 length) 69 void *value, const u16 length)
71{ 70{
@@ -75,7 +74,7 @@ static inline void rt2500usb_register_multiread(const struct rt2x00_dev
75 value, length, timeout); 74 value, length, timeout);
76} 75}
77 76
78static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev, 77static inline void rt2500usb_register_write(struct rt2x00_dev *rt2x00dev,
79 const unsigned int offset, 78 const unsigned int offset,
80 u16 value) 79 u16 value)
81{ 80{
@@ -85,8 +84,7 @@ static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev,
85 &reg, sizeof(u16), REGISTER_TIMEOUT); 84 &reg, sizeof(u16), REGISTER_TIMEOUT);
86} 85}
87 86
88static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev 87static inline void rt2500usb_register_multiwrite(struct rt2x00_dev *rt2x00dev,
89 *rt2x00dev,
90 const unsigned int offset, 88 const unsigned int offset,
91 void *value, const u16 length) 89 void *value, const u16 length)
92{ 90{
@@ -96,7 +94,7 @@ static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev
96 value, length, timeout); 94 value, length, timeout);
97} 95}
98 96
99static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev) 97static u16 rt2500usb_bbp_check(struct rt2x00_dev *rt2x00dev)
100{ 98{
101 u16 reg; 99 u16 reg;
102 unsigned int i; 100 unsigned int i;
@@ -111,7 +109,7 @@ static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
111 return reg; 109 return reg;
112} 110}
113 111
114static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev, 112static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
115 const unsigned int word, const u8 value) 113 const unsigned int word, const u8 value)
116{ 114{
117 u16 reg; 115 u16 reg;
@@ -136,7 +134,7 @@ static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev,
136 rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg); 134 rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg);
137} 135}
138 136
139static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev, 137static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
140 const unsigned int word, u8 *value) 138 const unsigned int word, u8 *value)
141{ 139{
142 u16 reg; 140 u16 reg;
@@ -173,7 +171,7 @@ static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev,
173 *value = rt2x00_get_field16(reg, PHY_CSR7_DATA); 171 *value = rt2x00_get_field16(reg, PHY_CSR7_DATA);
174} 172}
175 173
176static void rt2500usb_rf_write(const struct rt2x00_dev *rt2x00dev, 174static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
177 const unsigned int word, const u32 value) 175 const unsigned int word, const u32 value)
178{ 176{
179 u16 reg; 177 u16 reg;
@@ -210,13 +208,13 @@ rf_write:
210#ifdef CONFIG_RT2X00_LIB_DEBUGFS 208#ifdef CONFIG_RT2X00_LIB_DEBUGFS
211#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) ) 209#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) )
212 210
213static void rt2500usb_read_csr(const struct rt2x00_dev *rt2x00dev, 211static void rt2500usb_read_csr(struct rt2x00_dev *rt2x00dev,
214 const unsigned int word, u32 *data) 212 const unsigned int word, u32 *data)
215{ 213{
216 rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data); 214 rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data);
217} 215}
218 216
219static void rt2500usb_write_csr(const struct rt2x00_dev *rt2x00dev, 217static void rt2500usb_write_csr(struct rt2x00_dev *rt2x00dev,
220 const unsigned int word, u32 data) 218 const unsigned int word, u32 data)
221{ 219{
222 rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data); 220 rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data);
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 871d631a5ca8..d18cca89eede 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -782,13 +782,13 @@ struct rt2x00_dev {
782 * Generic RF access. 782 * Generic RF access.
783 * The RF is being accessed by word index. 783 * The RF is being accessed by word index.
784 */ 784 */
785static inline void rt2x00_rf_read(const struct rt2x00_dev *rt2x00dev, 785static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev,
786 const unsigned int word, u32 *data) 786 const unsigned int word, u32 *data)
787{ 787{
788 *data = rt2x00dev->rf[word]; 788 *data = rt2x00dev->rf[word];
789} 789}
790 790
791static inline void rt2x00_rf_write(const struct rt2x00_dev *rt2x00dev, 791static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev,
792 const unsigned int word, u32 data) 792 const unsigned int word, u32 data)
793{ 793{
794 rt2x00dev->rf[word] = data; 794 rt2x00dev->rf[word] = data;
@@ -798,19 +798,19 @@ static inline void rt2x00_rf_write(const struct rt2x00_dev *rt2x00dev,
798 * Generic EEPROM access. 798 * Generic EEPROM access.
799 * The EEPROM is being accessed by word index. 799 * The EEPROM is being accessed by word index.
800 */ 800 */
801static inline void *rt2x00_eeprom_addr(const struct rt2x00_dev *rt2x00dev, 801static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev,
802 const unsigned int word) 802 const unsigned int word)
803{ 803{
804 return (void *)&rt2x00dev->eeprom[word]; 804 return (void *)&rt2x00dev->eeprom[word];
805} 805}
806 806
807static inline void rt2x00_eeprom_read(const struct rt2x00_dev *rt2x00dev, 807static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
808 const unsigned int word, u16 *data) 808 const unsigned int word, u16 *data)
809{ 809{
810 *data = le16_to_cpu(rt2x00dev->eeprom[word]); 810 *data = le16_to_cpu(rt2x00dev->eeprom[word]);
811} 811}
812 812
813static inline void rt2x00_eeprom_write(const struct rt2x00_dev *rt2x00dev, 813static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev,
814 const unsigned int word, u16 data) 814 const unsigned int word, u16 data)
815{ 815{
816 rt2x00dev->eeprom[word] = cpu_to_le16(data); 816 rt2x00dev->eeprom[word] = cpu_to_le16(data);
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.h b/drivers/net/wireless/rt2x00/rt2x00debug.h
index 860e8fa3a0da..d37efbd09c41 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.h
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.h
@@ -30,9 +30,9 @@ struct rt2x00_dev;
30 30
31#define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \ 31#define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \
32struct reg##__name { \ 32struct reg##__name { \
33 void (*read)(const struct rt2x00_dev *rt2x00dev, \ 33 void (*read)(struct rt2x00_dev *rt2x00dev, \
34 const unsigned int word, __type *data); \ 34 const unsigned int word, __type *data); \
35 void (*write)(const struct rt2x00_dev *rt2x00dev, \ 35 void (*write)(struct rt2x00_dev *rt2x00dev, \
36 const unsigned int word, __type data); \ 36 const unsigned int word, __type data); \
37 \ 37 \
38 unsigned int word_size; \ 38 unsigned int word_size; \
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h
index 82adeac061d0..03572054509a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.h
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.h
@@ -57,7 +57,7 @@
57/* 57/*
58 * Register access. 58 * Register access.
59 */ 59 */
60static inline void rt2x00pci_register_read(const struct rt2x00_dev *rt2x00dev, 60static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev,
61 const unsigned long offset, 61 const unsigned long offset,
62 u32 *value) 62 u32 *value)
63{ 63{
@@ -65,14 +65,14 @@ static inline void rt2x00pci_register_read(const struct rt2x00_dev *rt2x00dev,
65} 65}
66 66
67static inline void 67static inline void
68rt2x00pci_register_multiread(const struct rt2x00_dev *rt2x00dev, 68rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev,
69 const unsigned long offset, 69 const unsigned long offset,
70 void *value, const u16 length) 70 void *value, const u16 length)
71{ 71{
72 memcpy_fromio(value, rt2x00dev->csr_addr + offset, length); 72 memcpy_fromio(value, rt2x00dev->csr_addr + offset, length);
73} 73}
74 74
75static inline void rt2x00pci_register_write(const struct rt2x00_dev *rt2x00dev, 75static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev,
76 const unsigned long offset, 76 const unsigned long offset,
77 u32 value) 77 u32 value)
78{ 78{
@@ -80,7 +80,7 @@ static inline void rt2x00pci_register_write(const struct rt2x00_dev *rt2x00dev,
80} 80}
81 81
82static inline void 82static inline void
83rt2x00pci_register_multiwrite(const struct rt2x00_dev *rt2x00dev, 83rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev,
84 const unsigned long offset, 84 const unsigned long offset,
85 void *value, const u16 length) 85 void *value, const u16 length)
86{ 86{
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 568d73847dca..d16f0a79d985 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -38,7 +38,7 @@
38/* 38/*
39 * Interfacing with the HW. 39 * Interfacing with the HW.
40 */ 40 */
41int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, 41int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
42 const u8 request, const u8 requesttype, 42 const u8 request, const u8 requesttype,
43 const u16 offset, const u16 value, 43 const u16 offset, const u16 value,
44 void *buffer, const u16 buffer_length, 44 void *buffer, const u16 buffer_length,
@@ -76,7 +76,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
76} 76}
77EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request); 77EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request);
78 78
79int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev, 79int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
80 const u8 request, const u8 requesttype, 80 const u8 request, const u8 requesttype,
81 const u16 offset, void *buffer, 81 const u16 offset, void *buffer,
82 const u16 buffer_length, const int timeout) 82 const u16 buffer_length, const int timeout)
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index 2681abe4d49e..53282b036927 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -91,7 +91,7 @@
91 * a buffer allocated by kmalloc. Failure to do so can lead 91 * a buffer allocated by kmalloc. Failure to do so can lead
92 * to unexpected behavior depending on the architecture. 92 * to unexpected behavior depending on the architecture.
93 */ 93 */
94int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, 94int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
95 const u8 request, const u8 requesttype, 95 const u8 request, const u8 requesttype,
96 const u16 offset, const u16 value, 96 const u16 offset, const u16 value,
97 void *buffer, const u16 buffer_length, 97 void *buffer, const u16 buffer_length,
@@ -107,7 +107,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
107 * kmalloc. Hence the reason for using a previously allocated cache 107 * kmalloc. Hence the reason for using a previously allocated cache
108 * which has been allocated properly. 108 * which has been allocated properly.
109 */ 109 */
110int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev, 110int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
111 const u8 request, const u8 requesttype, 111 const u8 request, const u8 requesttype,
112 const u16 offset, void *buffer, 112 const u16 offset, void *buffer,
113 const u16 buffer_length, const int timeout); 113 const u16 buffer_length, const int timeout);
@@ -117,8 +117,7 @@ int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev,
117 * command to the device. Since we don't use the buffer argument we 117 * command to the device. Since we don't use the buffer argument we
118 * don't have to worry about kmalloc here. 118 * don't have to worry about kmalloc here.
119 */ 119 */
120static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev 120static inline int rt2x00usb_vendor_request_sw(struct rt2x00_dev *rt2x00dev,
121 *rt2x00dev,
122 const u8 request, 121 const u8 request,
123 const u16 offset, 122 const u16 offset,
124 const u16 value, 123 const u16 value,
@@ -134,8 +133,8 @@ static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev
134 * from the device. Note that the eeprom argument _must_ be allocated using 133 * from the device. Note that the eeprom argument _must_ be allocated using
135 * kmalloc for correct handling inside the kernel USB layer. 134 * kmalloc for correct handling inside the kernel USB layer.
136 */ 135 */
137static inline int rt2x00usb_eeprom_read(const struct rt2x00_dev *rt2x00dev, 136static inline int rt2x00usb_eeprom_read(struct rt2x00_dev *rt2x00dev,
138 __le16 *eeprom, const u16 lenght) 137 __le16 *eeprom, const u16 lenght)
139{ 138{
140 int timeout = REGISTER_TIMEOUT * (lenght / sizeof(u16)); 139 int timeout = REGISTER_TIMEOUT * (lenght / sizeof(u16));
141 140
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 7c97761034e7..19ae8f49d9c8 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -52,7 +52,7 @@
52 * the access attempt is considered to have failed, 52 * the access attempt is considered to have failed,
53 * and we will print an error. 53 * and we will print an error.
54 */ 54 */
55static u32 rt61pci_bbp_check(const struct rt2x00_dev *rt2x00dev) 55static u32 rt61pci_bbp_check(struct rt2x00_dev *rt2x00dev)
56{ 56{
57 u32 reg; 57 u32 reg;
58 unsigned int i; 58 unsigned int i;
@@ -67,7 +67,7 @@ static u32 rt61pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
67 return reg; 67 return reg;
68} 68}
69 69
70static void rt61pci_bbp_write(const struct rt2x00_dev *rt2x00dev, 70static void rt61pci_bbp_write(struct rt2x00_dev *rt2x00dev,
71 const unsigned int word, const u8 value) 71 const unsigned int word, const u8 value)
72{ 72{
73 u32 reg; 73 u32 reg;
@@ -93,7 +93,7 @@ static void rt61pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
93 rt2x00pci_register_write(rt2x00dev, PHY_CSR3, reg); 93 rt2x00pci_register_write(rt2x00dev, PHY_CSR3, reg);
94} 94}
95 95
96static void rt61pci_bbp_read(const struct rt2x00_dev *rt2x00dev, 96static void rt61pci_bbp_read(struct rt2x00_dev *rt2x00dev,
97 const unsigned int word, u8 *value) 97 const unsigned int word, u8 *value)
98{ 98{
99 u32 reg; 99 u32 reg;
@@ -130,7 +130,7 @@ static void rt61pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
130 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); 130 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE);
131} 131}
132 132
133static void rt61pci_rf_write(const struct rt2x00_dev *rt2x00dev, 133static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev,
134 const unsigned int word, const u32 value) 134 const unsigned int word, const u32 value)
135{ 135{
136 u32 reg; 136 u32 reg;
@@ -160,7 +160,7 @@ rf_write:
160 rt2x00_rf_write(rt2x00dev, word, value); 160 rt2x00_rf_write(rt2x00dev, word, value);
161} 161}
162 162
163static void rt61pci_mcu_request(const struct rt2x00_dev *rt2x00dev, 163static void rt61pci_mcu_request(struct rt2x00_dev *rt2x00dev,
164 const u8 command, const u8 token, 164 const u8 command, const u8 token,
165 const u8 arg0, const u8 arg1) 165 const u8 arg0, const u8 arg1)
166{ 166{
@@ -220,13 +220,13 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
220#ifdef CONFIG_RT2X00_LIB_DEBUGFS 220#ifdef CONFIG_RT2X00_LIB_DEBUGFS
221#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) 221#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
222 222
223static void rt61pci_read_csr(const struct rt2x00_dev *rt2x00dev, 223static void rt61pci_read_csr(struct rt2x00_dev *rt2x00dev,
224 const unsigned int word, u32 *data) 224 const unsigned int word, u32 *data)
225{ 225{
226 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); 226 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
227} 227}
228 228
229static void rt61pci_write_csr(const struct rt2x00_dev *rt2x00dev, 229static void rt61pci_write_csr(struct rt2x00_dev *rt2x00dev,
230 const unsigned int word, u32 data) 230 const unsigned int word, u32 data)
231{ 231{
232 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); 232 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index b9d5310c386f..6b6649624470 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -53,7 +53,7 @@
53 * the access attempt is considered to have failed, 53 * the access attempt is considered to have failed,
54 * and we will print an error. 54 * and we will print an error.
55 */ 55 */
56static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev, 56static inline void rt73usb_register_read(struct rt2x00_dev *rt2x00dev,
57 const unsigned int offset, u32 *value) 57 const unsigned int offset, u32 *value)
58{ 58{
59 __le32 reg; 59 __le32 reg;
@@ -63,8 +63,7 @@ static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev,
63 *value = le32_to_cpu(reg); 63 *value = le32_to_cpu(reg);
64} 64}
65 65
66static inline void rt73usb_register_multiread(const struct rt2x00_dev 66static inline void rt73usb_register_multiread(struct rt2x00_dev *rt2x00dev,
67 *rt2x00dev,
68 const unsigned int offset, 67 const unsigned int offset,
69 void *value, const u32 length) 68 void *value, const u32 length)
70{ 69{
@@ -74,7 +73,7 @@ static inline void rt73usb_register_multiread(const struct rt2x00_dev
74 value, length, timeout); 73 value, length, timeout);
75} 74}
76 75
77static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev, 76static inline void rt73usb_register_write(struct rt2x00_dev *rt2x00dev,
78 const unsigned int offset, u32 value) 77 const unsigned int offset, u32 value)
79{ 78{
80 __le32 reg = cpu_to_le32(value); 79 __le32 reg = cpu_to_le32(value);
@@ -83,8 +82,7 @@ static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev,
83 &reg, sizeof(u32), REGISTER_TIMEOUT); 82 &reg, sizeof(u32), REGISTER_TIMEOUT);
84} 83}
85 84
86static inline void rt73usb_register_multiwrite(const struct rt2x00_dev 85static inline void rt73usb_register_multiwrite(struct rt2x00_dev *rt2x00dev,
87 *rt2x00dev,
88 const unsigned int offset, 86 const unsigned int offset,
89 void *value, const u32 length) 87 void *value, const u32 length)
90{ 88{
@@ -94,7 +92,7 @@ static inline void rt73usb_register_multiwrite(const struct rt2x00_dev
94 value, length, timeout); 92 value, length, timeout);
95} 93}
96 94
97static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev) 95static u32 rt73usb_bbp_check(struct rt2x00_dev *rt2x00dev)
98{ 96{
99 u32 reg; 97 u32 reg;
100 unsigned int i; 98 unsigned int i;
@@ -109,7 +107,7 @@ static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
109 return reg; 107 return reg;
110} 108}
111 109
112static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev, 110static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
113 const unsigned int word, const u8 value) 111 const unsigned int word, const u8 value)
114{ 112{
115 u32 reg; 113 u32 reg;
@@ -135,7 +133,7 @@ static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev,
135 rt73usb_register_write(rt2x00dev, PHY_CSR3, reg); 133 rt73usb_register_write(rt2x00dev, PHY_CSR3, reg);
136} 134}
137 135
138static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev, 136static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
139 const unsigned int word, u8 *value) 137 const unsigned int word, u8 *value)
140{ 138{
141 u32 reg; 139 u32 reg;
@@ -172,7 +170,7 @@ static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev,
172 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); 170 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE);
173} 171}
174 172
175static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev, 173static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
176 const unsigned int word, const u32 value) 174 const unsigned int word, const u32 value)
177{ 175{
178 u32 reg; 176 u32 reg;
@@ -212,13 +210,13 @@ rf_write:
212#ifdef CONFIG_RT2X00_LIB_DEBUGFS 210#ifdef CONFIG_RT2X00_LIB_DEBUGFS
213#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) 211#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
214 212
215static void rt73usb_read_csr(const struct rt2x00_dev *rt2x00dev, 213static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev,
216 const unsigned int word, u32 *data) 214 const unsigned int word, u32 *data)
217{ 215{
218 rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data); 216 rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data);
219} 217}
220 218
221static void rt73usb_write_csr(const struct rt2x00_dev *rt2x00dev, 219static void rt73usb_write_csr(struct rt2x00_dev *rt2x00dev,
222 const unsigned int word, u32 data) 220 const unsigned int word, u32 data)
223{ 221{
224 rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data); 222 rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data);