staging: rtl8192e: Remove rtllib_device::agregation
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Mon, 15 Jun 2015 19:06:10 +0000 (21:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jun 2015 04:37:21 +0000 (21:37 -0700)
Variable is always true; Resolve condition where it is used
(and change indentation of conditional expression).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_softmac.c

index 74c2a28..fd38c6d 100644 (file)
@@ -1758,7 +1758,6 @@ struct rtllib_device {
        u8 AsocRetryCount;
        struct sk_buff_head skb_waitQ[MAX_QUEUE_SIZE];
        struct sk_buff_head  skb_aggQ[MAX_QUEUE_SIZE];
-       bool aggregation;
 
        bool    bdynamic_txpower_enable;
 
index 48a188a..da862c3 100644 (file)
@@ -1883,38 +1883,34 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
                }
        }
 
-       if (ieee->aggregation) {
-               if (network->bssht.bdSupportHT) {
-                       if (info_element->len >= 4 &&
-                           info_element->data[0] == 0x00 &&
-                           info_element->data[1] == 0xe0 &&
-                           info_element->data[2] == 0x4c &&
-                           info_element->data[3] == 0x02) {
-                               ht_realtek_agg_len = min_t(u8,
-                                                          info_element->len,
-                                                          MAX_IE_LEN);
-                               memcpy(ht_realtek_agg_buf,
-                                      info_element->data,
-                                      info_element->len);
-                       }
-                       if (ht_realtek_agg_len >= 5) {
-                               network->realtek_cap_exit = true;
-                               network->bssht.bdRT2RTAggregation = true;
-
-                               if ((ht_realtek_agg_buf[4] == 1) &&
-                                   (ht_realtek_agg_buf[5] & 0x02))
-                                       network->bssht.bdRT2RTLongSlotTime = true;
-
-                               if ((ht_realtek_agg_buf[4] == 1) &&
-                                   (ht_realtek_agg_buf[5] & RT_HT_CAP_USE_92SE))
-                                       network->bssht.RT2RT_HT_Mode |= RT_HT_CAP_USE_92SE;
-                       }
+       if (network->bssht.bdSupportHT) {
+               if (info_element->len >= 4 &&
+                   info_element->data[0] == 0x00 &&
+                   info_element->data[1] == 0xe0 &&
+                   info_element->data[2] == 0x4c &&
+                   info_element->data[3] == 0x02) {
+                       ht_realtek_agg_len = min_t(u8, info_element->len,
+                                                  MAX_IE_LEN);
+                       memcpy(ht_realtek_agg_buf, info_element->data,
+                              info_element->len);
                }
                if (ht_realtek_agg_len >= 5) {
-                       if ((ht_realtek_agg_buf[5] & RT_HT_CAP_USE_SOFTAP))
-                               network->bssht.RT2RT_HT_Mode |= RT_HT_CAP_USE_SOFTAP;
+                       network->realtek_cap_exit = true;
+                       network->bssht.bdRT2RTAggregation = true;
+
+                       if ((ht_realtek_agg_buf[4] == 1) &&
+                           (ht_realtek_agg_buf[5] & 0x02))
+                               network->bssht.bdRT2RTLongSlotTime = true;
+
+                       if ((ht_realtek_agg_buf[4] == 1) &&
+                           (ht_realtek_agg_buf[5] & RT_HT_CAP_USE_92SE))
+                               network->bssht.RT2RT_HT_Mode |= RT_HT_CAP_USE_92SE;
                }
        }
+       if (ht_realtek_agg_len >= 5) {
+               if ((ht_realtek_agg_buf[5] & RT_HT_CAP_USE_SOFTAP))
+                       network->bssht.RT2RT_HT_Mode |= RT_HT_CAP_USE_SOFTAP;
+       }
 
        if ((info_element->len >= 3 &&
             info_element->data[0] == 0x00 &&
index 3f4a932..444fac7 100644 (file)
@@ -3017,7 +3017,6 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
        ieee->is_set_key = false;
        init_mgmt_queue(ieee);
 
-       ieee->aggregation = true;
        ieee->tx_pending.txb = NULL;
 
        _setup_timer(&ieee->associate_timer,