Variable is always true; Resolve condition where it is used (and change indentation of conditional expression). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@xxxxxxxxx> --- drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_rx.c | 52 ++++++++++++++----------------- drivers/staging/rtl8192e/rtllib_softmac.c | 1 - 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 74c2a28..fd38c6d 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 48a188a..da862c3 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 3f4a932..444fac7 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, -- 1.8.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel