[PATCH] staging: rtl8723bs: core: Remove unnecessary lines of code

From: Fabio M. De Francesco
Date: Wed May 12 2021 - 13:15:54 EST


Removed unnecessary lines of code inside an "else if" block.
That code acquires a spinlock and iterates over each item in
a linked list for no purpose.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 20 +------------------
1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index c5430e737bb1..74cfc7b0a5a2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -5125,23 +5125,9 @@ void _linked_info_dump(struct adapter *padapter)

if (padapter->bLinkInfoDump) {

- if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) {
+ if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
rtw_hal_get_def_var(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB);
- } else if ((pmlmeinfo->state&0x03) == _HW_STATE_AP_) {
- struct list_head *phead, *plist;

- struct sta_info *psta = NULL;
- struct sta_priv *pstapriv = &padapter->stapriv;
-
- spin_lock_bh(&pstapriv->asoc_list_lock);
- phead = &pstapriv->asoc_list;
- list_for_each(plist, phead) {
- psta = list_entry(plist, struct sta_info,
- asoc_list);
- }
- spin_unlock_bh(&pstapriv->asoc_list_lock);
-
- }
for (i = 0; i < NUM_STA; i++) {
if (pdvobj->macid[i]) {
if (i != 1) /* skip bc/mc sta */
@@ -5150,11 +5136,7 @@ void _linked_info_dump(struct adapter *padapter)
}
}
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_RX_INFO_DUMP, NULL);
-
-
}
-
-
}

static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta)
--
2.31.1