staging: r8188eu: rf_chip is constant
authorMartin Kaiser <martin@kaiser.cx>
Thu, 11 Nov 2021 21:26:42 +0000 (22:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Nov 2021 09:02:04 +0000 (10:02 +0100)
For this driver, rf_chip is always RF_6052. Remove the rf_chip component
from struct hal_data_8188e and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
drivers/staging/r8188eu/include/rtl8188e_hal.h

index bb0cda0c16a0ae0c5ccf818e7611d71ae5e78102..47402851700b333065f25b7da69ab4ea3a0c343d 100644 (file)
@@ -756,13 +756,6 @@ _PHY_SetBWMode92C(
        u8 regBwOpMode;
        u8 regRRSR_RSC;
 
-       if (pHalData->rf_chip == RF_PSEUDO_11N)
-               return;
-
-       /*  There is no 40MHz mode in RF_8225. */
-       if (pHalData->rf_chip == RF_8225)
-               return;
-
        if (Adapter->bDriverStopped)
                return;
 
@@ -814,21 +807,7 @@ _PHY_SetBWMode92C(
        }
        /* Skip over setting of J-mode in BB register here. Default value is "None J mode". Emily 20070315 */
 
-       /* 3<3>Set RF related register */
-       switch (pHalData->rf_chip) {
-       case RF_8225:
-               break;
-       case RF_8256:
-               /*  Please implement this function in Hal8190PciPhy8256.c */
-               break;
-       case RF_PSEUDO_11N:
-               break;
-       case RF_6052:
-               rtl8188e_PHY_RF6052SetBandwidth(Adapter, pHalData->CurrentChannelBW);
-               break;
-       default:
-               break;
-       }
+       rtl8188e_PHY_RF6052SetBandwidth(Adapter, pHalData->CurrentChannelBW);
 }
 
  /*-----------------------------------------------------------------------------
@@ -885,9 +864,6 @@ void PHY_SwChnl8188E(struct adapter *Adapter, u8 channel)
        /*  Call after initialization */
        struct hal_data_8188e   *pHalData = GET_HAL_DATA(Adapter);
 
-       if (pHalData->rf_chip == RF_PSEUDO_11N)
-               return;         /* return immediately if it is peudo-phy */
-
        if (channel == 0)
                channel = 1;
 
index 1625873aa742edc5183142711fb9fb68d2e657c8..119523d9c38a79d32703f906df9b238b124527a4 100644 (file)
@@ -1037,16 +1037,8 @@ static void _ReadPROMContent(
        readAdapterInfo_8188EU(Adapter);
 }
 
-static void _ReadRFType(struct adapter *Adapter)
-{
-       struct hal_data_8188e   *haldata = GET_HAL_DATA(Adapter);
-
-       haldata->rf_chip = RF_6052;
-}
-
 static int _ReadAdapterInfo8188EU(struct adapter *Adapter)
 {
-       _ReadRFType(Adapter);/* rf_chip -> _InitRFType() */
        _ReadPROMContent(Adapter);
 
        return _SUCCESS;
index 6f901ce607e885f332c90d541212da683ee23322..b1ba7acb454c7e05ab4f89c6fd5d1432d4bdb162 100644 (file)
@@ -48,16 +48,6 @@ enum rf_radio_path {
                                                 * total three groups */
 #define CHANNEL_GROUP_MAX_88E          6
 
-/* BB/RF related */
-enum RF_TYPE_8190P {
-       RF_TYPE_MIN,            /*  0 */
-       RF_8225 = 1,            /*  1 11b/g RF for verification only */
-       RF_8256 = 2,            /*  2 11b/g/n */
-       RF_6052 = 4,            /*  4 11b/g/n RF */
-       /*  TODO: We should remove this psudo PHY RF after we get new RF. */
-       RF_PSEUDO_11N = 5,      /*  5, It is a temporality RF. */
-};
-
 struct bb_reg_def {
        u32 rfintfs;            /*  set software control: */
                                /*      0x870~0x877[8 bytes] */
index 3593334e24b6451336db8398e3a398a53c03e1cf..6630cb5c5e5565ab48e162e88c1eeff99fd9ce7a 100644 (file)
@@ -169,7 +169,6 @@ struct hal_data_8188e {
        u16     BasicRateSet;
 
        /* rf_ctrl */
-       u8      rf_chip;
        u8      rf_type;
 
        u8      BoardType;