From patchwork Tue Nov 29 20:51:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 27505 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp567922wrr; Tue, 29 Nov 2022 13:07:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf7/T9i5OkRYmcmpMmYcIaKSEYYPCB0/vWvovuz+TAXCFnZ8zJiiHvzjn+AgXXy8IP413kH/ X-Received: by 2002:aa7:980c:0:b0:574:80b6:5706 with SMTP id e12-20020aa7980c000000b0057480b65706mr29042015pfl.30.1669756061184; Tue, 29 Nov 2022 13:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669756061; cv=none; d=google.com; s=arc-20160816; b=LZXMl5loT9QreypKU4It+WiMymFdcjUnST0gHy3DlsaZsXLlJ+CY+CHtc6tB0h0kk8 y6NuhfSUIWozHK2xz5/W94mDR5fr2T2UUayjV7bN4SXSxagDS1z1gMpKaeoCBJqniQZE miSnpWSpBY1kw5yk1uOOU5/yWYZt9oKj5m2c1/1cyg6q6GbgrLSkcMBfvSW6MeZp5jp8 ZcGKTZfhfffWwsTW7aqf+IFjpAYbK+vzquRBKA5mX+E34jETWvk9COw9+v8i8gVvVcJS ftIcJbGRU9bUgX7DTaeH9Wms5XQkyIjeZ82Jb4P1IzJvWIjAnO0Puc1qnHKANWi2ZsNz tXoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nDqBmaYjepcaULXf01e5RBgZ7FUv3DjUHMptIxB4vsc=; b=C6gxghRcXDB6F3mlmA15Q18fry4JOKyDZKErNrewANgWWWDs2rwFmrhTsA7ymzgVml w0GcIhYqCXs0GgBKUkOLAsTwXMZUjQVxldEKkAapwfyDDjPWzVvtmMxzz9Bk00ckB6Lo rD7jK4xPVWzpy2lWXbRDKRQIXu15TAzywBvZ7+dmljBw5IhMYmQNt7a3C/CGKogFXIoZ heajUKWLdkNeFreFs8ZhERGsxdsPBSXhzi7k4NFs18+LwUgvYnxPT56gGVvESXfmGZA5 EGxumdIJV+W22ujo2WOxenmXp9o9jbDoP7IG/W6bkah77LKItRhDXUjS4UlvBdoMYMcC NsXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x23-20020a170902821700b00188fadf1f1asi14182835pln.101.2022.11.29.13.07.25; Tue, 29 Nov 2022 13:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236568AbiK2Uw3 (ORCPT + 99 others); Tue, 29 Nov 2022 15:52:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236627AbiK2UwV (ORCPT ); Tue, 29 Nov 2022 15:52:21 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86B0018E3A for ; Tue, 29 Nov 2022 12:52:20 -0800 (PST) Received: from dslb-188-104-061-001.188.104.pools.vodafone-ip.de ([188.104.61.1] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1p07aQ-0001pO-E5; Tue, 29 Nov 2022 21:52:14 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/5] staging: r8188eu: move bBusyTraffic update Date: Tue, 29 Nov 2022 21:51:50 +0100 Message-Id: <20221129205152.128172-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221129205152.128172-1-martin@kaiser.cx> References: <20221129205152.128172-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750866131246806502?= X-GMAIL-MSGID: =?utf-8?q?1750866131246806502?= 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. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index fe58d4e3e260..dd1e0b4fc5a0 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -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)