Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp938480rwe; Fri, 14 Apr 2023 11:43:43 -0700 (PDT) X-Google-Smtp-Source: AKy350YXTXGGAkNQaPSNW+i8da75w2FVEGN3aMUdGcBCakjtB6L08mo+ip+BX49iaz7CELtnNAMr X-Received: by 2002:a05:6a00:228e:b0:633:afea:6b1a with SMTP id f14-20020a056a00228e00b00633afea6b1amr9764454pfe.19.1681497823523; Fri, 14 Apr 2023 11:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681497823; cv=none; d=google.com; s=arc-20160816; b=d3eP6RteZOQ8RzuiUw5pc+03kt91Pb9Txvd/OxvhSY4TKcKYfX1MUMtDTcU3BQQyoq 4dG8Y1qPhGNxeVRy6j6MNWqEUwiDzpQCDoPeoLCaLhMhwZ5JuefpX2hpv2ELgQnIl5Wm ba3LvrV7EmVeGRNM1AhCMY4yN3o0NB/QuojFKJPGfeflSZvsqDy44eGyYFXu7bCpHkHW jA8CTXfTwYYIG7mTBDdVISUYdg3I61iIal9MnCUIY8BBjOYWVgRM/mIYEZMglyZ/Th0O mCocRJBaNJdaEf039GqX92O4oQWrbONvHufFnSA5SviRIzeMdQ4tyl8ZFtUbBLAefNmH AZIA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j184-20020a6380c1000000b0051b5fef546fsi3657883pgd.600.2023.04.14.11.43.28; Fri, 14 Apr 2023 11:43:43 -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 S230058AbjDNSe7 (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-Type: text/plain; charset=us-ascii 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 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; } -- 2.40.0