From: Mateusz Kulikowski Date: Mon, 15 Jun 2015 19:06:10 +0000 (+0200) Subject: staging: rtl8192e: Remove rtllib_device::agregation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=47eae6ddd9cf12781cefe6ec458d791174cb59b9;p=linux-beck.git staging: rtl8192e: Remove rtllib_device::agregation Variable is always true; Resolve condition where it is used (and change indentation of conditional expression). Signed-off-by: Mateusz Kulikowski Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 74c2a2856ec6..fd38c6dd146b 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -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; diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 48a188a1ad46..da862c3da4ce 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -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 && diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 3f4a932e2353..444fac73a8a8 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -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,