staging: r8188eu: remove rf_type from add_RATid()
authorMichael Straube <straube.linux@gmail.com>
Fri, 19 Nov 2021 12:26:34 +0000 (13:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 16:42:38 +0000 (17:42 +0100)
rf_type is always RF_1T1R. Remove it from add_RATid() and remove
related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211119122635.28435-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_ap.c

index c78feeb9c86271629ecb305be2f3bc1694a5af49..47bd84b67a0856f3addd4016966ec9c1a5eef673 100644 (file)
@@ -318,7 +318,6 @@ void        expire_timeout_chk(struct adapter *padapter)
 void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
 {
        int i;
-       u8 rf_type;
        u32 init_rate = 0;
        unsigned char sta_band = 0, raid, shortGIrate = false;
        unsigned char limit;
@@ -342,11 +341,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
        }
        /* n mode ra_bitmap */
        if (psta_ht->ht_option) {
-               GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
-               if (rf_type == RF_2T2R)
-                       limit = 16;/*  2R */
-               else
-                       limit = 8;/*   1R */
+               limit = 8; /* 1R */
 
                for (i = 0; i < limit; i++) {
                        if (psta_ht->ht_cap.mcs.rx_mask[i / 8] & BIT(i % 8))