From patchwork Fri Apr 14 18:34:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 83559 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp586498vqo; Fri, 14 Apr 2023 11:40:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZuLdVs+yMCleLM32UlvLwUDE5YoX8gSCnbJadc+bwC/sJOiDw+eauHxxbM/+irK74Re6QH X-Received: by 2002:a17:90a:de92:b0:246:ac68:297 with SMTP id n18-20020a17090ade9200b00246ac680297mr6509053pjv.0.1681497602888; Fri, 14 Apr 2023 11:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681497602; cv=none; d=google.com; s=arc-20160816; b=WwIq9iMjKOSz1M/2cnCMUYsWfplSUveTI66IsiXfe4l73NdH2/tXUNcplLCk3VVwW4 YpwMAwbLTSK4CGGh6RFn5yBTtEy2MoVpiAbFw8ZAIOMapjW7eIZpBEuy42VlUXUOxnp1 /t83veTZIMnctXDZvlRloPibY9vRnW5mDOeBrDSN3wjC45adQ6V10yPXan58TqIVNwxM cubCgej7ajhsXTFyUXoMbHmSyXeApS6E5CKisFi9RNGk4FBq/pUOB09EltzJALdgYBpQ 4uXNAwsegDbnXPCp7i2BI1RFcKu27+pZBx1ZLDcEJAnNtE44f+eRSkjRwLCUFb3UUC7j oOVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=/J+vjdb6cOyet1NlcJdx7Gney2QIkG13+uv7x6+rlKE=; b=GknIv21GsiMXwsmXAcjJ/Bb2Pkuj19pqRd8W1iCuWEspoGpSvEMI/LgFsrux+iHNGJ OMkiVTlLcTYjxaYYl31mTWcsJCcacobssLvHZ3wir/fg0ug6I+4WYcdNzE6ubhOrMaR1 Hth7u4/xeR/CrUndxU4oPLv9m5KDJAO2rqr+VVvgFeUDh23fy6OhluCzyCnSPR4dDcUr +IGNrMnvM098Se1CtzBTg11LQMp9AK9EWa2Vwg8/bZYrs8cO7Oc37hbHudI1QrA/EJqw +gY5HvU1ViEVRxGm2Fpsnludujka4zxs1hsQzuWYpqlgmcpQ7KVfyJn6ATLMuzmH5xBP CUeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=G05SBNFy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu16-20020a17090b389000b002471589f0d9si5759953pjb.95.2023.04.14.11.39.48; Fri, 14 Apr 2023 11:40:02 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=G05SBNFy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbjDNSe7 (ORCPT + 99 others); Fri, 14 Apr 2023 14:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbjDNSe6 (ORCPT ); Fri, 14 Apr 2023 14:34:58 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E42384EDD for ; Fri, 14 Apr 2023 11:34:56 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-94a342f202cso47882066b.0 for ; Fri, 14 Apr 2023 11:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681497295; x=1684089295; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=/J+vjdb6cOyet1NlcJdx7Gney2QIkG13+uv7x6+rlKE=; b=G05SBNFy+5LmoPB7N11GwA1JML3OifQBNYPoauP/kLqe28fX59OGvQikVdsU4O2tDh zOVj501kf2xTO+zvTMDq+Kp3aZf+eYqSK5ua93Kja/71tEvabIKH1sKsPC43lAsaDyxa 2tEn0/DMof+CP2PLedntGb1xlx8uKxCHbsofChiYZtDQXfp+80LxC7owTaumdLcudxSk 9DNIyE9PdqzsdES5sUSsGT2tGVek6S186vBvQTOs4T63Y2DZpHmZQzFOVppbxnt0IKZw 5pjqR1HRtfrwumCZwBC+wyXKi2zgAqi04XXYr4NdQDbBD0wZkL5pSDSiK72I/3J/RVIY SqtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681497295; x=1684089295; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/J+vjdb6cOyet1NlcJdx7Gney2QIkG13+uv7x6+rlKE=; b=gA6ICQogITuzjsp+kO5MjZqXNU0ZPrGgJYMaOlfASceZIR2NYmAhavmLUms73uiSAX 0wbxSCxznQo/DQiOVD88SnuxJahN39j2dMjXbN9X9GsRL4O6lOCbJ8TUP16KQXskOlmL 5UE+T7OKc2ly885n7dEBoNmUhQ/gYGQXpubsRW1CE9AkkSTvIWmI7KM9PPpZ/qcTcsgt 9ksma7oXJRudhyRWCZyjE3CywEx5OEXX9DYmgUDJdm+mjlT/8sUXP6Joj7yvIVI8DTlO oya1/Ve6AGnX4q7vFvdrlcp7oVpRF88P2YhJgtBdQpz/kEHgka0zz2asbrq43vvXuJNu pKzw== X-Gm-Message-State: AAQBX9dwJZ/M8rxWVtSMBWaqqKsAGlXbX5Rk7/GxQ9WqWb23kzwL0cA9 WblDAaaCZF199sMOv78ubM0rYkFaEPI= X-Received: by 2002:a17:906:d4:b0:947:bff2:1c2b with SMTP id 20-20020a17090600d400b00947bff21c2bmr2971926eji.1.1681497294723; Fri, 14 Apr 2023 11:34:54 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id m9-20020a1709062b8900b0094a9b9c4979sm2781449ejg.88.2023.04.14.11.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 11:34:54 -0700 (PDT) Date: Fri, 14 Apr 2023 20:34:52 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start Message-ID: <20230414183452.GA12295@matrix-ESPRIMO-P710> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1763178030137537356?= X-GMAIL-MSGID: =?utf-8?q?1763178030137537356?= When loading the driver for rtl8192e, the W_DISABLE# switch is working as intended. But when the WLAN is turned off in software and then turned on again the W_DISABLE# does not work anymore. Reason for this is that in the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is checked and returned when true. bfirst_after_down is set true when switching the WLAN off in software. But it is not set to false again when WLAN is turned on again. Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix above described bug. Signed-off-by: Philipp Hortmann --- Tested with rtl8192e (WLL6130-D99) Transferred this patch over wlan connection of rtl8192e --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 45989a77a27c..a644543015ee 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -648,6 +648,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset) else netif_wake_queue(dev); + priv->bfirst_after_down = false; return 0; }