mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
staging: rtl8723bs: remove dead REJOIN code
The REJOIN macro is not defined anywhere in the kernel tree. Remove this dead code to simplify the function. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260321182713.665872-2-azpijr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e23ad15700
commit
96e82c72fe
@@ -1145,10 +1145,8 @@ void rtw_reset_securitypriv(struct adapter *adapter)
|
||||
/* if join_res > 0, for (fw_state ==WIFI_ADHOC_STATE), we only check if "ptarget_wlan" exist. */
|
||||
/* if join_res > 0, update "cur_network->network" from "pnetwork->network" if (ptarget_wlan != NULL). */
|
||||
/* */
|
||||
/* define REJOIN */
|
||||
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||
{
|
||||
static u8 __maybe_unused retry;
|
||||
struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
@@ -1170,7 +1168,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||
|
||||
if (pnetwork->join_res > 0) {
|
||||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
retry = 0;
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
|
||||
/* s1. find ptarget_wlan */
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||
@@ -1242,29 +1239,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
} else {/* if join_res < 0 (join fails), then try again */
|
||||
|
||||
#ifdef REJOIN
|
||||
res = _FAIL;
|
||||
if (retry < 2)
|
||||
res = rtw_select_and_join_from_scanned_queue(pmlmepriv);
|
||||
|
||||
if (res == _SUCCESS) {
|
||||
/* extend time of assoc_timer */
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
retry++;
|
||||
} else if (res == 2) {/* there is no need to wait for join */
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
rtw_indicate_connect(adapter);
|
||||
} else {
|
||||
#endif
|
||||
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
#ifdef REJOIN
|
||||
retry = 0;
|
||||
}
|
||||
#endif
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
}
|
||||
|
||||
ignore_joinbss_callback:
|
||||
|
||||
Reference in New Issue
Block a user