From nobody Fri Apr 3 02:23:13 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 A6B7CECAAD8 for ; Sun, 18 Sep 2022 17:57:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbiIRR5P (ORCPT ); Sun, 18 Sep 2022 13:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiIRR5N (ORCPT ); Sun, 18 Sep 2022 13:57:13 -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 8FF4815FF9 for ; Sun, 18 Sep 2022 10:57:11 -0700 (PDT) Received: from dslb-188-096-149-102.188.096.pools.vodafone-ip.de ([188.96.149.102] 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 1oZyXT-0006VL-Ex; Sun, 18 Sep 2022 19:57:07 +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 1/6] staging: r8188eu: cancel blink_work during wps stop Date: Sun, 18 Sep 2022 19:56:55 +0200 Message-Id: <20220918175700.215170-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220918175700.215170-1-martin@kaiser.cx> References: <20220918175700.215170-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" We can always cancel blink_work during wps_stop. The blinking pattern will be updated to show that wps was successful. Another worker will be started for this. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_led.c | 27 ++++++++++++-------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188= eu/core/rtw_led.c index 98eebe3e4119..389fb2cc7379 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -322,26 +322,23 @@ void rtw_led_control(struct adapter *padapter, enum L= ED_CTL_MODE LedAction) schedule_delayed_work(&pLed->blink_work, LED_BLINK_SCAN_INTVL); break; case LED_CTL_STOP_WPS: - 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; - } - if (pLed->bLedScanBlinkInProgress) { - cancel_delayed_work(&pLed->blink_work); + + if (pLed->bLedScanBlinkInProgress) pLed->bLedScanBlinkInProgress =3D false; - } - if (pLed->bLedWPSBlinkInProgress) - cancel_delayed_work(&pLed->blink_work); - else + + if (!pLed->bLedWPSBlinkInProgress) pLed->bLedWPSBlinkInProgress =3D true; + pLed->CurrLedState =3D LED_BLINK_WPS_STOP; if (pLed->bLedOn) { pLed->BlinkingLedState =3D RTW_LED_OFF; --=20 2.30.2