diff options
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce/phy.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 71 |
1 files changed, 11 insertions, 60 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c index 73262ca3864b..98b22303c84d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "../wifi.h" | 30 | #include "../wifi.h" |
31 | #include "../pci.h" | 31 | #include "../pci.h" |
32 | #include "../ps.h" | 32 | #include "../ps.h" |
33 | #include "../core.h" | ||
33 | #include "reg.h" | 34 | #include "reg.h" |
34 | #include "def.h" | 35 | #include "def.h" |
35 | #include "hw.h" | 36 | #include "hw.h" |
@@ -198,18 +199,7 @@ bool _rtl92ce_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, | |||
198 | } | 199 | } |
199 | if (configtype == BASEBAND_CONFIG_PHY_REG) { | 200 | if (configtype == BASEBAND_CONFIG_PHY_REG) { |
200 | for (i = 0; i < phy_reg_arraylen; i = i + 2) { | 201 | for (i = 0; i < phy_reg_arraylen; i = i + 2) { |
201 | if (phy_regarray_table[i] == 0xfe) | 202 | rtl_addr_delay(phy_regarray_table[i]); |
202 | mdelay(50); | ||
203 | else if (phy_regarray_table[i] == 0xfd) | ||
204 | mdelay(5); | ||
205 | else if (phy_regarray_table[i] == 0xfc) | ||
206 | mdelay(1); | ||
207 | else if (phy_regarray_table[i] == 0xfb) | ||
208 | udelay(50); | ||
209 | else if (phy_regarray_table[i] == 0xfa) | ||
210 | udelay(5); | ||
211 | else if (phy_regarray_table[i] == 0xf9) | ||
212 | udelay(1); | ||
213 | rtl_set_bbreg(hw, phy_regarray_table[i], MASKDWORD, | 203 | rtl_set_bbreg(hw, phy_regarray_table[i], MASKDWORD, |
214 | phy_regarray_table[i + 1]); | 204 | phy_regarray_table[i + 1]); |
215 | udelay(1); | 205 | udelay(1); |
@@ -245,18 +235,7 @@ bool _rtl92ce_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, | |||
245 | 235 | ||
246 | if (configtype == BASEBAND_CONFIG_PHY_REG) { | 236 | if (configtype == BASEBAND_CONFIG_PHY_REG) { |
247 | for (i = 0; i < phy_regarray_pg_len; i = i + 3) { | 237 | for (i = 0; i < phy_regarray_pg_len; i = i + 3) { |
248 | if (phy_regarray_table_pg[i] == 0xfe) | 238 | rtl_addr_delay(phy_regarray_table_pg[i]); |
249 | mdelay(50); | ||
250 | else if (phy_regarray_table_pg[i] == 0xfd) | ||
251 | mdelay(5); | ||
252 | else if (phy_regarray_table_pg[i] == 0xfc) | ||
253 | mdelay(1); | ||
254 | else if (phy_regarray_table_pg[i] == 0xfb) | ||
255 | udelay(50); | ||
256 | else if (phy_regarray_table_pg[i] == 0xfa) | ||
257 | udelay(5); | ||
258 | else if (phy_regarray_table_pg[i] == 0xf9) | ||
259 | udelay(1); | ||
260 | 239 | ||
261 | _rtl92c_store_pwrIndex_diffrate_offset(hw, | 240 | _rtl92c_store_pwrIndex_diffrate_offset(hw, |
262 | phy_regarray_table_pg[i], | 241 | phy_regarray_table_pg[i], |
@@ -305,46 +284,16 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | |||
305 | switch (rfpath) { | 284 | switch (rfpath) { |
306 | case RF90_PATH_A: | 285 | case RF90_PATH_A: |
307 | for (i = 0; i < radioa_arraylen; i = i + 2) { | 286 | for (i = 0; i < radioa_arraylen; i = i + 2) { |
308 | if (radioa_array_table[i] == 0xfe) | 287 | rtl_rfreg_delay(hw, rfpath, radioa_array_table[i], |
309 | mdelay(50); | 288 | RFREG_OFFSET_MASK, |
310 | else if (radioa_array_table[i] == 0xfd) | 289 | radioa_array_table[i + 1]); |
311 | mdelay(5); | ||
312 | else if (radioa_array_table[i] == 0xfc) | ||
313 | mdelay(1); | ||
314 | else if (radioa_array_table[i] == 0xfb) | ||
315 | udelay(50); | ||
316 | else if (radioa_array_table[i] == 0xfa) | ||
317 | udelay(5); | ||
318 | else if (radioa_array_table[i] == 0xf9) | ||
319 | udelay(1); | ||
320 | else { | ||
321 | rtl_set_rfreg(hw, rfpath, radioa_array_table[i], | ||
322 | RFREG_OFFSET_MASK, | ||
323 | radioa_array_table[i + 1]); | ||
324 | udelay(1); | ||
325 | } | ||
326 | } | 290 | } |
327 | break; | 291 | break; |
328 | case RF90_PATH_B: | 292 | case RF90_PATH_B: |
329 | for (i = 0; i < radiob_arraylen; i = i + 2) { | 293 | for (i = 0; i < radiob_arraylen; i = i + 2) { |
330 | if (radiob_array_table[i] == 0xfe) { | 294 | rtl_rfreg_delay(hw, rfpath, radiob_array_table[i], |
331 | mdelay(50); | 295 | RFREG_OFFSET_MASK, |
332 | } else if (radiob_array_table[i] == 0xfd) | 296 | radiob_array_table[i + 1]); |
333 | mdelay(5); | ||
334 | else if (radiob_array_table[i] == 0xfc) | ||
335 | mdelay(1); | ||
336 | else if (radiob_array_table[i] == 0xfb) | ||
337 | udelay(50); | ||
338 | else if (radiob_array_table[i] == 0xfa) | ||
339 | udelay(5); | ||
340 | else if (radiob_array_table[i] == 0xf9) | ||
341 | udelay(1); | ||
342 | else { | ||
343 | rtl_set_rfreg(hw, rfpath, radiob_array_table[i], | ||
344 | RFREG_OFFSET_MASK, | ||
345 | radiob_array_table[i + 1]); | ||
346 | udelay(1); | ||
347 | } | ||
348 | } | 297 | } |
349 | break; | 298 | break; |
350 | case RF90_PATH_C: | 299 | case RF90_PATH_C: |
@@ -355,6 +304,8 @@ bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | |||
355 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 304 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
356 | "switch case not processed\n"); | 305 | "switch case not processed\n"); |
357 | break; | 306 | break; |
307 | default: | ||
308 | break; | ||
358 | } | 309 | } |
359 | return true; | 310 | return true; |
360 | } | 311 | } |