staging: rtl8188eu: remove unused rtw_hal_set_def_var
authorLuca Ceresoli <luca@lucaceresoli.net>
Tue, 14 Jul 2015 22:44:54 +0000 (00:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2015 17:15:14 +0000 (10:15 -0700)
rtw_hal_set_def_var() is never referenced, so remove it.

It used to be the only place where the SetHalDefVarHandler callback was
called, so get rid of the function pointer as well.

Also remove the callback itself, SetHalDefVar8188EUsb(), which was not
called anywhere else.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/hal_intf.c
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/include/hal_intf.h

index fecd2ef11b85aa8e6c623cb62cefd6a9ac9af356..5af57400503532d1f7a667da59b1846d2848b1d5 100644 (file)
@@ -131,14 +131,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val)
                adapt->HalFunc.GetHwRegHandler(adapt, variable, val);
 }
 
-u8 rtw_hal_set_def_var(struct adapter *adapt, enum hal_def_variable var,
-                     void *val)
-{
-       if (adapt->HalFunc.SetHalDefVarHandler)
-               return adapt->HalFunc.SetHalDefVarHandler(adapt, var, val);
-       return _FAIL;
-}
-
 u8 rtw_hal_get_def_var(struct adapter *adapt,
                       enum hal_def_variable var, void *val)
 {
index ffcca6b03fe2a8ad913d2415d457c0a22b1e1c46..6dc0869924ec64b7e44aaaa2f78f172ebf37d7d1 100644 (file)
@@ -1961,75 +1961,6 @@ GetHalDefVar8188EUsb(
        return bResult;
 }
 
-/*  */
-/*     Description: */
-/*             Change default setting of specified variable. */
-/*  */
-static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue)
-{
-       struct hal_data_8188e   *haldata = GET_HAL_DATA(Adapter);
-       u8 bResult = _SUCCESS;
-
-       switch (eVariable) {
-       case HAL_DEF_DBG_DM_FUNC:
-               {
-                       u8 dm_func = *((u8 *)pValue);
-                       struct odm_dm_struct *podmpriv = &haldata->odmpriv;
-
-                       if (dm_func == 0) { /* disable all dynamic func */
-                               podmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE;
-                               DBG_88E("==> Disable all dynamic function...\n");
-                       } else if (dm_func == 1) {/* disable DIG */
-                               podmpriv->SupportAbility  &= (~DYNAMIC_BB_DIG);
-                               DBG_88E("==> Disable DIG...\n");
-                       } else if (dm_func == 2) {/* disable High power */
-                               podmpriv->SupportAbility  &= (~DYNAMIC_BB_DYNAMIC_TXPWR);
-                       } else if (dm_func == 3) {/* disable tx power tracking */
-                               podmpriv->SupportAbility  &= (~DYNAMIC_RF_CALIBRATION);
-                               DBG_88E("==> Disable tx power tracking...\n");
-                       } else if (dm_func == 5) {/* disable antenna diversity */
-                               podmpriv->SupportAbility  &= (~DYNAMIC_BB_ANT_DIV);
-                       } else if (dm_func == 6) {/* turn on all dynamic func */
-                               if (!(podmpriv->SupportAbility  & DYNAMIC_BB_DIG)) {
-                                       struct rtw_dig *pDigTable = &podmpriv->DM_DigTable;
-                                       pDigTable->CurIGValue = usb_read8(Adapter, 0xc50);
-                               }
-                               podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE;
-                               DBG_88E("==> Turn on all dynamic function...\n");
-                       }
-               }
-               break;
-       case HAL_DEF_DBG_DUMP_RXPKT:
-               haldata->bDumpRxPkt = *((u8 *)pValue);
-               break;
-       case HAL_DEF_DBG_DUMP_TXPKT:
-               haldata->bDumpTxPkt = *((u8 *)pValue);
-               break;
-       case HW_DEF_FA_CNT_DUMP:
-               {
-                       u8 bRSSIDump = *((u8 *)pValue);
-                       struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
-                       if (bRSSIDump)
-                               dm_ocm->DebugComponents =       ODM_COMP_DIG|ODM_COMP_FA_CNT;
-                       else
-                               dm_ocm->DebugComponents = 0;
-               }
-               break;
-       case HW_DEF_ODM_DBG_FLAG:
-               {
-                       u64     DebugComponents = *((u64 *)pValue);
-                       struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
-                       dm_ocm->DebugComponents = DebugComponents;
-               }
-               break;
-       default:
-               bResult = _FAIL;
-               break;
-       }
-
-       return bResult;
-}
-
 static void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
 {
        u8 init_rate = 0;
@@ -2200,7 +2131,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
        halfunc->SetHwRegHandler = &SetHwReg8188EU;
        halfunc->GetHwRegHandler = &GetHwReg8188EU;
        halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
-       halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;
 
        halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb;
        halfunc->SetBeaconRelatedRegistersHandler = &SetBeaconRelatedRegisters8188EUsb;
index d85bc441d98ea0152da2c3598961c0f906dc5f0d..bf894ce8eab1ba7a9195d432542f79164372fa3b 100644 (file)
@@ -188,9 +188,6 @@ struct hal_ops {
        u8      (*GetHalDefVarHandler)(struct adapter *padapter,
                                       enum hal_def_variable eVariable,
                                       void *pValue);
-       u8      (*SetHalDefVarHandler)(struct adapter *padapter,
-                                      enum hal_def_variable eVariable,
-                                      void *pValue);
 
        void    (*SetHalODMVarHandler)(struct adapter *padapter,
                                       enum hal_odm_variable eVariable,
@@ -265,8 +262,6 @@ void rtw_hal_chip_configure(struct adapter *padapter);
 void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
-u8 rtw_hal_set_def_var(struct adapter *padapter,
-                      enum hal_def_variable eVariable, void *pValue);
 u8 rtw_hal_get_def_var(struct adapter *padapter,
                       enum hal_def_variable eVariable, void *pValue);