aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 82755cf8b73e..79ea3798d597 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -92,7 +92,6 @@ static bool rt2800usb_check_crc(const u8 *data, const size_t len)
92static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev, 92static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev,
93 const u8 *data, const size_t len) 93 const u8 *data, const size_t len)
94{ 94{
95 u16 chipset = (rt2x00_rev(rt2x00dev) >> 16) & 0xffff;
96 size_t offset = 0; 95 size_t offset = 0;
97 96
98 /* 97 /*
@@ -111,9 +110,9 @@ static int rt2800usb_check_firmware(struct rt2x00_dev *rt2x00dev,
111 * Check if we need the upper 4kb firmware data or not. 110 * Check if we need the upper 4kb firmware data or not.
112 */ 111 */
113 if ((len == 4096) && 112 if ((len == 4096) &&
114 (chipset != 0x2860) && 113 !rt2x00_rt(rt2x00dev, RT2860) &&
115 (chipset != 0x2872) && 114 !rt2x00_rt(rt2x00dev, RT2872) &&
116 (chipset != 0x3070)) 115 !rt2x00_rt(rt2x00dev, RT3070))
117 return FW_BAD_VERSION; 116 return FW_BAD_VERSION;
118 117
119 /* 118 /*
@@ -138,14 +137,13 @@ static int rt2800usb_load_firmware(struct rt2x00_dev *rt2x00dev,
138 u32 reg; 137 u32 reg;
139 u32 offset; 138 u32 offset;
140 u32 length; 139 u32 length;
141 u16 chipset = (rt2x00_rev(rt2x00dev) >> 16) & 0xffff;
142 140
143 /* 141 /*
144 * Check which section of the firmware we need. 142 * Check which section of the firmware we need.
145 */ 143 */
146 if ((chipset == 0x2860) || 144 if (rt2x00_rt(rt2x00dev, RT2860) ||
147 (chipset == 0x2872) || 145 rt2x00_rt(rt2x00dev, RT2872) ||
148 (chipset == 0x3070)) { 146 rt2x00_rt(rt2x00dev, RT3070)) {
149 offset = 0; 147 offset = 0;
150 length = 4096; 148 length = 4096;
151 } else { 149 } else {
@@ -200,9 +198,9 @@ static int rt2800usb_load_firmware(struct rt2x00_dev *rt2x00dev,
200 */ 198 */
201 rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0); 199 rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
202 200
203 if ((chipset == 0x3070) || 201 if (rt2x00_rt(rt2x00dev, RT3070) ||
204 (chipset == 0x3071) || 202 rt2x00_rt(rt2x00dev, RT3071) ||
205 (chipset == 0x3572)) { 203 rt2x00_rt(rt2x00dev, RT3572)) {
206 udelay(200); 204 udelay(200);
207 rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0); 205 rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0);
208 udelay(10); 206 udelay(10);