staging: r8188eu: cur_ant is set but never used
authorMichael Straube <straube.linux@gmail.com>
Tue, 5 Apr 2022 10:49:07 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Apr 2022 14:11:32 +0000 (16:11 +0200)
In rtw_select_and_join_from_scanned_queue() the local variable cur_ant
is set but never used. Remove the variable and related dead code.

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

index cddd8ab..2690bce 100644 (file)
@@ -1458,7 +1458,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
        struct __queue *queue   = &pmlmepriv->scanned_queue;
        struct  wlan_network    *pnetwork = NULL;
        struct  wlan_network    *candidate = NULL;
-       u8      supp_ant_div = false;
 
        spin_lock_bh(&pmlmepriv->scanned_queue.lock);
        phead = get_list_head(queue);
@@ -1485,12 +1484,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
                rtw_free_assoc_resources(adapter, 0);
        }
 
-       GetHalDefVar8188EUsb(adapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &supp_ant_div);
-       if (supp_ant_div) {
-               u8 cur_ant;
-               GetHalDefVar8188EUsb(adapter, HAL_DEF_CURRENT_ANTENNA, &cur_ant);
-       }
-
        ret = rtw_joinbss_cmd(adapter, candidate);
 
 exit: