]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: r8188eu: move bBusyTraffic update
authorMartin Kaiser <martin@kaiser.cx>
Tue, 29 Nov 2022 20:51:50 +0000 (21:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2022 12:29:07 +0000 (13:29 +0100)
Move the update of bBusyTraffic into the else branch. The if branch ends
with a return statement, so bBusyTraffic will not be updated in this case.

With this change in place, we can reorder the code and save some levels of
indentation.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221129205152.128172-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c

index fe58d4e3e2604bc9715fe24028e39529cade5a02..dd1e0b4fc5a0903848fbc1faa642f61be7ec2b06 100644 (file)
@@ -1466,8 +1466,8 @@ static void OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame)
                return;
        } else {
                receive_disconnect(padapter, mgmt->bssid, reason);
+               pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
        }
-       pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
 }
 
 static void OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame)