From nobody Mon Apr 6 04:45:51 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9643C54EE9 for ; Sun, 11 Sep 2022 14:51:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbiIKOvu (ORCPT ); Sun, 11 Sep 2022 10:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiIKOvn (ORCPT ); Sun, 11 Sep 2022 10:51:43 -0400 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 905CA2CCAF for ; Sun, 11 Sep 2022 07:51:40 -0700 (PDT) Received: from ipservice-092-217-076-063.092.217.pools.vodafone-ip.de ([92.217.76.63] 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 1oXOJ6-000829-SC; Sun, 11 Sep 2022 16:51:36 +0200 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 2/9] staging: r8188eu: cancel blink_work before scan blinking Date: Sun, 11 Sep 2022 16:51:15 +0200 Message-Id: <20220911145122.15444-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220911145122.15444-1-martin@kaiser.cx> References: <20220911145122.15444-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Cancel blink_work before we start scan blinking. Another worker will be scheduled after the state variables are updated. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_led.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188= eu/core/rtw_led.c index c934a1f1e119..30b17c304277 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -266,18 +266,18 @@ void rtw_led_control(struct adapter *padapter, enum L= ED_CTL_MODE LedAction) =20 if (IS_LED_WPS_BLINKING(pLed)) return; - if (pLed->bLedNoLinkBlinkInProgress) { - cancel_delayed_work(&pLed->blink_work); + + cancel_delayed_work(&pLed->blink_work); + + if (pLed->bLedNoLinkBlinkInProgress) pLed->bLedNoLinkBlinkInProgress =3D false; - } - if (pLed->bLedLinkBlinkInProgress) { - cancel_delayed_work(&pLed->blink_work); + + if (pLed->bLedLinkBlinkInProgress) pLed->bLedLinkBlinkInProgress =3D false; - } - if (pLed->bLedBlinkInProgress) { - cancel_delayed_work(&pLed->blink_work); + + if (pLed->bLedBlinkInProgress) pLed->bLedBlinkInProgress =3D false; - } + pLed->bLedScanBlinkInProgress =3D true; pLed->CurrLedState =3D LED_BLINK_SCAN; pLed->BlinkTimes =3D 24; --=20 2.30.2