Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3585124rwj; Mon, 19 Dec 2022 22:03:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7fOlfNYKm2t+Uo4XJADCnvJN1ESDGOHNBHJGAGzQMbYlovKigJkqFRSXO3hgTSsBGp8hJ8 X-Received: by 2002:a17:903:4282:b0:189:5ca6:af59 with SMTP id ju2-20020a170903428200b001895ca6af59mr40637343plb.51.1671516201127; Mon, 19 Dec 2022 22:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671516201; cv=none; d=google.com; s=arc-20160816; b=dja4y6TwMRGYujXRzX5a20+HRI01RXqlHs19GQWLUvmb9g+G5aCIUHdiK/EEPZohYi AW/2J4lRlD9I+Ua019BdcqCoA5iigvC3IB5aWRp4IPGQGgkrBUFsQO2NfNAM4aAukvk2 Ar0krvWStLhOsJZfSPmb/3AnRqtkh9lAB/N5NE8CC1ZhD0W3Mppmi4kHq/89VkYT/ZVm WRTAtF73cL3oCnFL+NijjiMvAg+xPYffOebHprIMf9ZrSEQ5prerPShOQre1oqgEC32I K3rmSBGK0RKMbB20xAUkFitXS+BaOa8aCvEUS8j5C/QvQfm0I2Ft4WinGALPjZUp3yXc KRmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7qE9xHexBnOSQP7DLwAIc3M9AGwYnVABLly0YPrjr8A=; b=p0LpjRWmlV3jzF4h9PjbBU7KSUeQbS7m3/Kx13i4bLSMUGzgfefVhe94q5dQTFTe9h 6r7ljNRjyljqUowy5wGnN9Oe7QN1DBtJVdneXbsPZZRBuEq/j79vehrFvX5fNhHcpNIa vpvF898QTf+eQS/DY410PBdgY9Dhv6la+BRNtl1GwNolL9p0g5iK6f2tnRP3oMGYdlfR 9pyV2p79Y6yUBSRacUUVoGTuwanqX9wdaW/8y2owmBbBjmib+CdPbWNiKqd6qrR65jw6 vnyK3/u9rWypes4kXTZ8BVZ6J5P8cLu2gvedUBC+zaCkjG2tLq2Q3g9O1WX4G14HigX2 CsXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zzy040330.moe header.s=sig1 header.b=nJyvAOpn; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a170902eb8700b001884e351466si11995246plg.467.2022.12.19.22.03.13; Mon, 19 Dec 2022 22:03:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=@zzy040330.moe header.s=sig1 header.b=nJyvAOpn; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233082AbiLTGCn (ORCPT + 66 others); Tue, 20 Dec 2022 01:02:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232937AbiLTGCc (ORCPT ); Tue, 20 Dec 2022 01:02:32 -0500 Received: from pv50p00im-ztbu10021601.me.com (pv50p00im-ztbu10021601.me.com [17.58.6.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACAC5E005 for ; Mon, 19 Dec 2022 22:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzy040330.moe; s=sig1; t=1671516148; bh=7qE9xHexBnOSQP7DLwAIc3M9AGwYnVABLly0YPrjr8A=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=nJyvAOpnjXw3HDo+bjrSq3f+9gyNPaMuxpKgU0SYbt9BPAM6KwkTGpZxY5uBMSZHI gmTQ2tIjVZAAsIxTDL0wOf+noiYK+P2jYkOhEuqHzfHnE9mathwJw4hBH5c9XOBAMX bFkXb6+MelOiEU2CauDFEMTsdT/iouBs6ymYslRoT8SzE73cXzUgAblRfUXs9RjXCx FyGVej9HfPSv0sn4Lt3hrjFCRjSY/9wYm9L9Olv2FMChvJS4XRrg29Q/DoL5tsj9KI LY5YbC5Sq58odlp5pWRbXnF2zZcn1CdSw/i/NLpFELDiK37OVkZ1HX3z8eEUzsjLpG Hr5CgFj4DXjtA== Received: from [192.168.1.30] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztbu10021601.me.com (Postfix) with ESMTPSA id 34CCA8089D; Tue, 20 Dec 2022 06:02:24 +0000 (UTC) Message-ID: Date: Tue, 20 Dec 2022 14:02:22 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu To: Ping-Ke Shih , "Jes.Sorensen@gmail.com" Cc: "kvalo@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20221217030659.12577-1-JunASAKA@zzy040330.moe> <3b4124ebabcb4ceaae89cd9ccf84c7de@realtek.com> Content-Language: en-US From: Jun ASAKA In-Reply-To: <3b4124ebabcb4ceaae89cd9ccf84c7de@realtek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: Ab5CiSP5moxstGcKAV8LZuvltnmr-6h9 X-Proofpoint-GUID: Ab5CiSP5moxstGcKAV8LZuvltnmr-6h9 X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.517,18.0.572,17.11.64.514.0000000_definitions?= =?UTF-8?Q?=3D2022-06-21=5F01:2022-06-21=5F01,2020-02-14=5F11,2022-02-23?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxlogscore=741 malwarescore=0 bulkscore=0 spamscore=0 suspectscore=0 clxscore=1030 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2212200050 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-wireless@vger.kernel.org On 20/12/2022 13:44, Ping-Ke Shih wrote: > >> -----Original Message----- >> From: Jun ASAKA >> Sent: Saturday, December 17, 2022 11:07 AM >> To: Jes.Sorensen@gmail.com >> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; >> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun ASAKA >> >> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu >> >> Fixing transmission failure which results in >> "authentication with ... timed out". This can be >> fixed by disable the REG_TXPAUSE. >> >> Signed-off-by: Jun ASAKA >> --- >> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c >> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c >> index a7d76693c02d..9d0ed6760cb6 100644 >> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c >> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c >> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv) >> val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1); >> val8 &= ~BIT(0); >> rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8); >> + >> + /* >> + * Fix transmission failure of rtl8192e. >> + */ >> + rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00); > I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX. > The occasions include RF calibration, LPS mode (called by power off), and > going to stop. So, I think RF calibration does TX pause but not restore > settings after calibration, and causes TX stuck. As the flow I traced, > this patch looks reasonable. But, I wonder why other people don't meet > this problem. > > Reviewed-by: Ping-Ke Shih > >> } >> >> static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt) >> -- >> 2.31.1 For my occasion, one of my rtl8192ru device which is Tenda U1 doesn't work originally with this module, it prints "authentication with ... timed out" in dmesg. And this change can fix the problem. Thanks for your review. Jun ASAKA.