Re: [PATCH] staging: rtl8723bs: Reduce indentation in rtw_joinbss_event_prehandle
From: Dan Carpenter
Date: Thu Mar 19 2026 - 04:11:58 EST
On Wed, Mar 18, 2026 at 11:55:44PM +0100, Jose A. Perez de Azpillaga wrote:
> + if (pnetwork->join_res == -4) {
> rtw_reset_securitypriv(adapter);
> _set_timer(&pmlmepriv->assoc_timer, 1);
>
> if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
> _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
>
> - } else {/* if join_res < 0 (join fails), then try again */
> + goto ignore_joinbss_callback;
> + }
> +
> + if (pnetwork->join_res <= 0) {
> +#ifdef REJOIN
REJOIN is never defined. Just delete this code in a separate patch
at the start.
> + int res = _FAIL;
>
> - #ifdef REJOIN
> - res = _FAIL;
> if (retry < 2)
> res = rtw_select_and_join_from_scanned_queue(pmlmepriv);
>
> @@ -1260,21 +1197,92 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
> /* 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 */
> + } else if (res == 2) { /* there is no need to wait for join */
Don't do unrelated changes.
The truth is I haven't reviewed this patch properly. I see you have
made other changes unrelated to indenting. Don't do things like:
- ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.mac_address);
+ ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue,
+ cur_network->network.mac_address);
Those make it harder for me to review and they're against the rules.
regards,
dan carpenter