staging: rtl8192e: Remove constant variable reg_rt2rt_aggregation
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Wed, 13 Dec 2023 16:52:46 +0000 (17:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Dec 2023 12:37:33 +0000 (13:37 +0100)
ht_info->reg_rt2rt_aggregation is set to 1 and unchanged. Therefore all
equations result accordingly and ht_info->reg_rt2rt_aggregation can be
removed.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/07a0954cc6fd730d9d42054fa36346d1de07cd06.1702406712.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl819x_HT.h
drivers/staging/rtl8192e/rtl819x_HTProc.c

index 315905fa4b2c46b6eece27ae4a1eeb9e382df6b8..514ac9e1f3f88499a369b5e05fe34d74c267d0f9 100644 (file)
@@ -112,7 +112,6 @@ struct rt_hi_throughput {
        enum ht_extchnl_offset CurSTAExtChnlOffset;
        u8 cur_tx_bw40mhz;
        u8 sw_bw_in_progress;
-       u8 reg_rt2rt_aggregation;
        u8 current_rt2rt_aggregation;
        u8 current_rt2rt_long_slot_time;
        u8 sz_rt2rt_agg_buf[10];
index 23ffd0c0dce53d6f48940cc60a83f7d5aaf4ccf6..fdd3b6018867c9220f8442548236f84ae5d812c4 100644 (file)
@@ -79,8 +79,6 @@ void ht_update_default_setting(struct rtllib_device *ieee)
 
        ieee->tx_enable_fw_calc_dur = 1;
 
-       ht_info->reg_rt2rt_aggregation = 1;
-
        ht_info->reg_rx_reorder_enable = 1;
        ht_info->rx_reorder_win_size = 64;
        ht_info->rx_reorder_pending_time = 30;
@@ -471,25 +469,17 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
                        ht_info->current_ampdu_enable = false;
        }
 
-       if (!ht_info->reg_rt2rt_aggregation) {
-               if (ht_info->ampdu_factor > pPeerHTCap->MaxRxAMPDUFactor)
+       if (ieee->current_network.bssht.bd_rt2rt_aggregation) {
+               if (ieee->pairwise_key_type != KEY_TYPE_NA)
                        ht_info->CurrentAMPDUFactor =
-                                                pPeerHTCap->MaxRxAMPDUFactor;
+                                        pPeerHTCap->MaxRxAMPDUFactor;
                else
-                       ht_info->CurrentAMPDUFactor = ht_info->ampdu_factor;
-
+                       ht_info->CurrentAMPDUFactor = HT_AGG_SIZE_64K;
        } else {
-               if (ieee->current_network.bssht.bd_rt2rt_aggregation) {
-                       if (ieee->pairwise_key_type != KEY_TYPE_NA)
-                               ht_info->CurrentAMPDUFactor =
-                                                pPeerHTCap->MaxRxAMPDUFactor;
-                       else
-                               ht_info->CurrentAMPDUFactor = HT_AGG_SIZE_64K;
-               } else {
-                       ht_info->CurrentAMPDUFactor = min_t(u32, pPeerHTCap->MaxRxAMPDUFactor,
-                                                           HT_AGG_SIZE_32K);
-               }
+               ht_info->CurrentAMPDUFactor = min_t(u32, pPeerHTCap->MaxRxAMPDUFactor,
+                                                   HT_AGG_SIZE_32K);
        }
+
        ht_info->current_mpdu_density = pPeerHTCap->MPDUDensity;
        if (ht_info->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) {
                ht_info->current_ampdu_enable = false;
@@ -595,15 +585,10 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
                               pNetwork->bssht.bd_ht_info_buf,
                               pNetwork->bssht.bd_ht_info_len);
 
-               if (ht_info->reg_rt2rt_aggregation) {
-                       ht_info->current_rt2rt_aggregation =
-                                pNetwork->bssht.bd_rt2rt_aggregation;
-                       ht_info->current_rt2rt_long_slot_time =
-                                pNetwork->bssht.bd_rt2rt_long_slot_time;
-               } else {
-                       ht_info->current_rt2rt_aggregation = false;
-                       ht_info->current_rt2rt_long_slot_time = false;
-               }
+               ht_info->current_rt2rt_aggregation =
+                        pNetwork->bssht.bd_rt2rt_aggregation;
+               ht_info->current_rt2rt_long_slot_time =
+                        pNetwork->bssht.bd_rt2rt_long_slot_time;
 
                ht_iot_peer_determine(ieee);