From patchwork Sun Jan 6 00:02:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 10749411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED9D31399 for ; Sun, 6 Jan 2019 00:02:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4F452880A for ; Sun, 6 Jan 2019 00:02:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7FC428816; Sun, 6 Jan 2019 00:02:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 875332880A for ; Sun, 6 Jan 2019 00:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726372AbfAFACK (ORCPT ); Sat, 5 Jan 2019 19:02:10 -0500 Received: from mail-oln040092066017.outbound.protection.outlook.com ([40.92.66.17]:60642 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726363AbfAFACK (ORCPT ); Sat, 5 Jan 2019 19:02:10 -0500 Received: from HE1EUR01FT038.eop-EUR01.prod.protection.outlook.com (10.152.0.54) by HE1EUR01HT212.eop-EUR01.prod.protection.outlook.com (10.152.1.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13; Sun, 6 Jan 2019 00:02:05 +0000 Received: from DB7PR07MB5353.eurprd07.prod.outlook.com (10.152.0.58) by HE1EUR01FT038.mail.protection.outlook.com (10.152.1.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13 via Frontend Transport; Sun, 6 Jan 2019 00:02:05 +0000 Received: from DB7PR07MB5353.eurprd07.prod.outlook.com ([fe80::e1f9:8635:f629:eb8e]) by DB7PR07MB5353.eurprd07.prod.outlook.com ([fe80::e1f9:8635:f629:eb8e%4]) with mapi id 15.20.1516.010; Sun, 6 Jan 2019 00:02:05 +0000 From: Bernd Edlinger To: Ping-Ke Shih , Larry Finger , Kalle Valo , "David S. Miller" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andrew Lunn Subject: [PATCH v3 0/4] rtlwifi: Fix issues with rtl8723ae Thread-Topic: [PATCH v3 0/4] rtlwifi: Fix issues with rtl8723ae Thread-Index: AQHUpVMOhOTwyJzVpEik1aol4KfSfQ== Date: Sun, 6 Jan 2019 00:02:05 +0000 Message-ID: Accept-Language: en-US, en-GB, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR06CA0011.eurprd06.prod.outlook.com (2603:10a6:20b:14::24) To DB7PR07MB5353.eurprd07.prod.outlook.com (2603:10a6:10:6e::26) x-incomingtopheadermarker: OriginalChecksum:2B2A6F999BEE0A08169ED0A838DDCCEA68908974C2733684B562936B6FBD6D9B;UpperCasedChecksum:26984F858AAD8479CB098F2F0C8C14C33561753E9AF35DC047542832AA799895;SizeAsReceived:8761;Count:62 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [NFImcgpbZSiC6tZdNMtNUWnYTS+9UHrF] x-microsoft-original-message-id: x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HE1EUR01HT212;6:AcVB3CzA0c38ydNE2r8DlU+1jWOyXirVjZ2vDi16T880HgOnHgLU1HX2aeg0XCAOt/V1FXwz2LUDIiUGjOCJJS4ZpZj4wcBi0uURfWZMD/j+LAMmdp+ccCwdx4kUmEtZt7nyaDIpKwFp6xA0BDVzJj03CKfeWDNm8v1xYJFCC2n13bHSgifgnXhisMpjNUYJ1P7WKeeaK28XLA6Ks4fXs/qyZACMbgJ5xTSFu1iOnEVzJP8mvhmei+4r1RIxhgyGm2c+vwGRMBXubUczLrqOzRsqtUytSdnSVjoBNkkU0DlJlz7MQsOzLt+ocbTDzwUesRqiHXAjRxfIZhSftfHaN9kXJR13WAP+q/UGQji8Vg/DYR8YbNDi791XKTQbwAME0F1g5H3MiMCowjGep/S+fWV1yd8jRVqR1YsW2bmXTce5vlnmYhEkiAcWLabfbcKae4R6Wwfq/X8hi3ps5oMAYA==;5:qisw0UCSd+Wi8V+O6SbFjxgNtHYK2+ruFprVSBe1lpYDTPKD8zdLOfkiKs5Y5GcFODgQGUGJ9TwJ4pxJy+6nXbh0MLd/uCZYt9BjUvu6bI5gojgfLWdX5Hkxu63UenYOC1PPF3M78JcJS9lvdfDToJBRXSfuR3oJDUFHgJ2/uZc=;7:tqBbIvvg297Fjn3/0LVoZP+Cl+g/5QSVwl8/IyPcmDClTbIBFIIA/rbZLRRNcqFYP3varbdYLXQAy01UFgXLphkWOzDcCmjYjqiKAsLthBCXWGhKseuMCVu/YGbyFCOW6ajQ6LNtPuiKOLcwGv8eGw== x-incomingheadercount: 62 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:HE1EUR01HT212; x-ms-traffictypediagnostic: HE1EUR01HT212: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(4566010)(82015058);SRVR:HE1EUR01HT212;BCL:0;PCL:0;RULEID:;SRVR:HE1EUR01HT212; x-microsoft-antispam-message-info: QRXXc88hs7A2YnAXfQQQjK8pgYShx3ZmjytubL3e1TJ758L/x4+2mJwRAHyTMcsp Content-ID: MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: d4d70346-2c10-4f39-8c00-e767963926d9 X-MS-Exchange-CrossTenant-Network-Message-Id: 1affd2c0-22f0-4517-9eb6-08d6736a313e X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: d4d70346-2c10-4f39-8c00-e767963926d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2019 00:02:04.5043 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT212 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the rtl8723ae driver is broken (since v4.7). Connection to AP is lost very often, especially when the signal level is not very good. The main issue is the power save mode is basically not working, and seems to trigger a firmware bug. So I had to take out the FW LPS mode handling. While debugging the driver I found a couple related issues, for instance that the signal level in dm.undec_sm_pwdb is no longer accurate (may be even much too high) when no more packets are received, and it increases the likelihood to receive something if the input gain is set to maximum. The patch was tested with the rtl8723ae PCI card in my laptop against a FRITZ!Box 7590 AP -- the WiFi connection works now very reliable for me. ChangeLog: v2: Adjusts the defaults of swlps and fwlps module parameters to match the firmware capabilities instead of removing the whole code, so it can be easily re-activated once a firmware update is available. v3: Make the title of each patch fit in one line. Bernd Edlinger (4): rtl8723ae: Take the FW LPS mode handling out rtl8723ae: Dont use old data for input gain control rtl8723ae: Re-introduce the adaptive rate control rtlwifi: Don't clear num_rx_inperiod too early drivers/net/wireless/realtek/rtlwifi/base.c | 4 +- drivers/net/wireless/realtek/rtlwifi/core.c | 2 + .../net/wireless/realtek/rtlwifi/rtl8723ae/dm.c | 95 +++++++++++++++++++++- .../net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 8 +- 4 files changed, 101 insertions(+), 8 deletions(-)