From patchwork Sat Dec 17 03:06:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun ASAKA X-Patchwork-Id: 634967 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 AD7C8C4332F for ; Sat, 17 Dec 2022 03:07:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbiLQDHP (ORCPT ); Fri, 16 Dec 2022 22:07:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbiLQDHL (ORCPT ); Fri, 16 Dec 2022 22:07:11 -0500 Received: from pv50p00im-ztdg10012101.me.com (pv50p00im-ztdg10012101.me.com [17.58.6.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23FD255AB2 for ; Fri, 16 Dec 2022 19:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzy040330.moe; s=sig1; t=1671246429; bh=fNvQnkuKnVzOUlC/PJc/EbNg3vsHt+if+VgLf1PDnd4=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=NzByFag19fYj4hrO5KfIXHOSv7fkQ6OfsSHluY8f0RAVAihSph2NZZnkyr2kZEzGp O+9GcDBpgCjdISOIwOJO0hIWG5iBRzXu7qs6Cs9h3h7o7mhHL+bAH3UQc4HvYbMJVu jJCkbChTzb0flUJLwWUqCv4xKrHVhy+8ZWMIFjyaUXkIRShvtvdun2sbgywGo95NUq 66Q0bX/7kET0RJApfke7+icAGmSEvZKwsRTGTM+bsfmwXnTNSj1EubkKsVXDrpaJMd 2VAQjNX87A2q6GWlMobtMLf+St/h27Y/l8zpzKmQS/0yUAntkN67UxwBRbYrlUPclg Mx9Wto2V5GaGA== Received: from localhost.localdomain (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10012101.me.com (Postfix) with ESMTPSA id DEB6E7403E5; Sat, 17 Dec 2022 03:07:05 +0000 (UTC) From: Jun ASAKA 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 Date: Sat, 17 Dec 2022 11:06:59 +0800 Message-Id: <20221217030659.12577-1-JunASAKA@zzy040330.moe> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: dZqxiBTEh1IB4iYiQuFvsHE6Xy2mqvCy X-Proofpoint-GUID: dZqxiBTEh1IB4iYiQuFvsHE6Xy2mqvCy X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 bulkscore=0 clxscore=1030 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=520 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2212170023 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixing transmission failure which results in "authentication with ... timed out". This can be fixed by disable the REG_TXPAUSE. Signed-off-by: Jun ASAKA Reviewed-by: Ping-Ke Shih --- 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); } static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)