aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2012-01-07 21:46:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:08:37 -0500
commit9ef11f7b34c0896a1d476dd8cb9a18671aaab892 (patch)
tree9c5c36e33a42a901edcccfd5e1d7ef2862352386 /drivers
parent76a92be537f1c8c259e393632301446257ca3ea9 (diff)
rtl8192cu: Remove dead code never selected
The original driver contained some conditional code that was not selected, but was not deleted in case it would be used later. That code can now be removed. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/hw.c170
1 files changed, 0 insertions, 170 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index ae38bc52a716..b8af2cf4db22 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -339,144 +339,8 @@ static void _rtl92cu_read_board_type(struct ieee80211_hw *hw, u8 *contents)
339 if (IS_HIGHT_PA(rtlefuse->board_type)) 339 if (IS_HIGHT_PA(rtlefuse->board_type))
340 rtlefuse->external_pa = 1; 340 rtlefuse->external_pa = 1;
341 pr_info("Board Type %x\n", rtlefuse->board_type); 341 pr_info("Board Type %x\n", rtlefuse->board_type);
342
343#ifdef CONFIG_ANTENNA_DIVERSITY
344 /* Antenna Diversity setting. */
345 if (registry_par->antdiv_cfg == 2) /* 2: From Efuse */
346 rtl_efuse->antenna_cfg = (contents[EEPROM_RF_OPT1]&0x18)>>3;
347 else
348 rtl_efuse->antenna_cfg = registry_par->antdiv_cfg; /* 0:OFF, */
349
350 pr_info("Antenna Config %x\n", rtl_efuse->antenna_cfg);
351#endif
352} 342}
353 343
354#ifdef CONFIG_BT_COEXIST
355static void _update_bt_param(_adapter *padapter)
356{
357 struct btcoexist_priv *pbtpriv = &(padapter->halpriv.bt_coexist);
358 struct registry_priv *registry_par = &padapter->registrypriv;
359 if (2 != registry_par->bt_iso) {
360 /* 0:Low, 1:High, 2:From Efuse */
361 pbtpriv->BT_Ant_isolation = registry_par->bt_iso;
362 }
363 if (registry_par->bt_sco == 1) {
364 /* 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy,
365 * 5.OtherBusy */
366 pbtpriv->BT_Service = BT_OtherAction;
367 } else if (registry_par->bt_sco == 2) {
368 pbtpriv->BT_Service = BT_SCO;
369 } else if (registry_par->bt_sco == 4) {
370 pbtpriv->BT_Service = BT_Busy;
371 } else if (registry_par->bt_sco == 5) {
372 pbtpriv->BT_Service = BT_OtherBusy;
373 } else {
374 pbtpriv->BT_Service = BT_Idle;
375 }
376 pbtpriv->BT_Ampdu = registry_par->bt_ampdu;
377 pbtpriv->bCOBT = _TRUE;
378 pbtpriv->BtEdcaUL = 0;
379 pbtpriv->BtEdcaDL = 0;
380 pbtpriv->BtRssiState = 0xff;
381 pbtpriv->bInitSet = _FALSE;
382 pbtpriv->bBTBusyTraffic = _FALSE;
383 pbtpriv->bBTTrafficModeSet = _FALSE;
384 pbtpriv->bBTNonTrafficModeSet = _FALSE;
385 pbtpriv->CurrentState = 0;
386 pbtpriv->PreviousState = 0;
387 pr_info("BT Coexistance = %s\n",
388 (pbtpriv->BT_Coexist == _TRUE) ? "enable" : "disable");
389 if (pbtpriv->BT_Coexist) {
390 if (pbtpriv->BT_Ant_Num == Ant_x2)
391 pr_info("BlueTooth BT_Ant_Num = Antx2\n");
392 else if (pbtpriv->BT_Ant_Num == Ant_x1)
393 pr_info("BlueTooth BT_Ant_Num = Antx1\n");
394 switch (pbtpriv->BT_CoexistType) {
395 case BT_2Wire:
396 pr_info("BlueTooth BT_CoexistType = BT_2Wire\n");
397 break;
398 case BT_ISSC_3Wire:
399 pr_info("BlueTooth BT_CoexistType = BT_ISSC_3Wire\n");
400 break;
401 case BT_Accel:
402 pr_info("BlueTooth BT_CoexistType = BT_Accel\n");
403 break;
404 case BT_CSR_BC4:
405 pr_info("BlueTooth BT_CoexistType = BT_CSR_BC4\n");
406 break;
407 case BT_CSR_BC8:
408 pr_info("BlueTooth BT_CoexistType = BT_CSR_BC8\n");
409 break;
410 case BT_RTL8756:
411 pr_info("BlueTooth BT_CoexistType = BT_RTL8756\n");
412 break;
413 default:
414 pr_info("BlueTooth BT_CoexistType = Unknown\n");
415 break;
416 }
417 pr_info("BlueTooth BT_Ant_isolation = %d\n",
418 pbtpriv->BT_Ant_isolation);
419 switch (pbtpriv->BT_Service) {
420 case BT_OtherAction:
421 pr_info("BlueTooth BT_Service = BT_OtherAction\n");
422 break;
423 case BT_SCO:
424 pr_info("BlueTooth BT_Service = BT_SCO\n");
425 break;
426 case BT_Busy:
427 pr_info("BlueTooth BT_Service = BT_Busy\n");
428 break;
429 case BT_OtherBusy:
430 pr_info("BlueTooth BT_Service = BT_OtherBusy\n");
431 break;
432 default:
433 pr_info("BlueTooth BT_Service = BT_Idle\n");
434 break;
435 }
436 pr_info("BT_RadioSharedType = 0x%x\n",
437 pbtpriv->BT_RadioSharedType);
438 }
439}
440
441#define GET_BT_COEXIST(priv) (&priv->bt_coexist)
442
443static void _rtl92cu_read_bluetooth_coexistInfo(struct ieee80211_hw *hw,
444 u8 *contents,
445 bool bautoloadfailed);
446{
447 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
448 bool isNormal = IS_NORMAL_CHIP(pHalData->VersionID);
449 struct btcoexist_priv *pbtpriv = &pHalData->bt_coexist;
450 u8 rf_opt4;
451
452 _rtw_memset(pbtpriv, 0, sizeof(struct btcoexist_priv));
453 if (AutoloadFail) {
454 pbtpriv->BT_Coexist = _FALSE;
455 pbtpriv->BT_CoexistType = BT_2Wire;
456 pbtpriv->BT_Ant_Num = Ant_x2;
457 pbtpriv->BT_Ant_isolation = 0;
458 pbtpriv->BT_RadioSharedType = BT_Radio_Shared;
459 return;
460 }
461 if (isNormal) {
462 if (pHalData->BoardType == BOARD_USB_COMBO)
463 pbtpriv->BT_Coexist = _TRUE;
464 else
465 pbtpriv->BT_Coexist = ((PROMContent[EEPROM_RF_OPT3] &
466 0x20) >> 5); /* bit[5] */
467 rf_opt4 = PROMContent[EEPROM_RF_OPT4];
468 pbtpriv->BT_CoexistType = ((rf_opt4&0xe)>>1); /* bit [3:1] */
469 pbtpriv->BT_Ant_Num = (rf_opt4&0x1); /* bit [0] */
470 pbtpriv->BT_Ant_isolation = ((rf_opt4&0x10)>>4); /* bit [4] */
471 pbtpriv->BT_RadioSharedType = ((rf_opt4&0x20)>>5); /* bit [5] */
472 } else {
473 pbtpriv->BT_Coexist = (PROMContent[EEPROM_RF_OPT4] >> 4) ?
474 _TRUE : _FALSE;
475 }
476 _update_bt_param(Adapter);
477}
478#endif
479
480static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw) 344static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw)
481{ 345{
482 struct rtl_priv *rtlpriv = rtl_priv(hw); 346 struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -552,10 +416,6 @@ static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw)
552 } 416 }
553 } 417 }
554 _rtl92cu_read_board_type(hw, hwinfo); 418 _rtl92cu_read_board_type(hw, hwinfo);
555#ifdef CONFIG_BT_COEXIST
556 _rtl92cu_read_bluetooth_coexistInfo(hw, hwinfo,
557 rtlefuse->autoload_failflag);
558#endif
559} 419}
560 420
561static void _rtl92cu_hal_customized_behavior(struct ieee80211_hw *hw) 421static void _rtl92cu_hal_customized_behavior(struct ieee80211_hw *hw)
@@ -1107,34 +967,6 @@ static void _InitPABias(struct ieee80211_hw *hw)
1107 } 967 }
1108} 968}
1109 969
1110static void _InitAntenna_Selection(struct ieee80211_hw *hw)
1111{
1112#ifdef CONFIG_ANTENNA_DIVERSITY
1113 struct rtl_priv *rtlpriv = rtl_priv(hw);
1114 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1115 struct rtl_phy *rtlphy = &(rtlpriv->phy);
1116
1117 if (pHalData->AntDivCfg == 0)
1118 return;
1119
1120 if (rtlphy->rf_type == RF_1T1R) {
1121 rtl_write_dword(rtlpriv, REG_LEDCFG0,
1122 rtl_read_dword(rtlpriv,
1123 REG_LEDCFG0)|BIT(23));
1124 rtl_set_bbreg(hw, rFPGA0_XAB_RFPARAMETER, BIT(13), 0x01);
1125 if (rtl_get_bbreg(hw, RFPGA0_XA_RFINTERFACEOE, 0x300) ==
1126 Antenna_A)
1127 pHalData->CurAntenna = Antenna_A;
1128 else
1129 pHalData->CurAntenna = Antenna_B;
1130 }
1131#endif
1132}
1133
1134static void _dump_registers(struct ieee80211_hw *hw)
1135{
1136}
1137
1138static void _update_mac_setting(struct ieee80211_hw *hw) 970static void _update_mac_setting(struct ieee80211_hw *hw)
1139{ 971{
1140 struct rtl_priv *rtlpriv = rtl_priv(hw); 972 struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -1205,10 +1037,8 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
1205 } 1037 }
1206 _rtl92cu_hw_configure(hw); 1038 _rtl92cu_hw_configure(hw);
1207 _InitPABias(hw); 1039 _InitPABias(hw);
1208 _InitAntenna_Selection(hw);
1209 _update_mac_setting(hw); 1040 _update_mac_setting(hw);
1210 rtl92c_dm_init(hw); 1041 rtl92c_dm_init(hw);
1211 _dump_registers(hw);
1212 return err; 1042 return err;
1213} 1043}
1214 1044