From patchwork Fri Jan 4 12:48:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 10748285 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 1A2A813AD for ; Fri, 4 Jan 2019 12:48:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0904D205F7 for ; Fri, 4 Jan 2019 12:48:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0C2127FA8; Fri, 4 Jan 2019 12:48:47 +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 35B28205F7 for ; Fri, 4 Jan 2019 12:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbfADMsg (ORCPT ); Fri, 4 Jan 2019 07:48:36 -0500 Received: from mail-oln040092069033.outbound.protection.outlook.com ([40.92.69.33]:11440 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725913AbfADMsf (ORCPT ); Fri, 4 Jan 2019 07:48:35 -0500 Received: from HE1EUR02FT009.eop-EUR02.prod.protection.outlook.com (10.152.10.60) by HE1EUR02HT080.eop-EUR02.prod.protection.outlook.com (10.152.11.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13; Fri, 4 Jan 2019 12:48:32 +0000 Received: from DB7PR07MB5353.eurprd07.prod.outlook.com (10.152.10.52) by HE1EUR02FT009.mail.protection.outlook.com (10.152.10.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1471.13 via Frontend Transport; Fri, 4 Jan 2019 12:48:32 +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.000; Fri, 4 Jan 2019 12:48:31 +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" Subject: [PATCH 0/4] rtlwifi: Fix issues with rtl8723ae Thread-Topic: [PATCH 0/4] rtlwifi: Fix issues with rtl8723ae Thread-Index: AQHUpCvMg4MWqNxywE621z+Jdf/AFQ== Date: Fri, 4 Jan 2019 12:48:31 +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: AM5PR0201CA0011.eurprd02.prod.outlook.com (2603:10a6:203:3d::21) To DB7PR07MB5353.eurprd07.prod.outlook.com (2603:10a6:10:6e::26) x-incomingtopheadermarker: OriginalChecksum:1B54264B180A203E01A1FBAEEB98D30374BB930A10A02F9C581C65F8D3A33D1C;UpperCasedChecksum:CDF22793460A466D47AF062618B82DDFFE4B3F13425CDD43F101E5BDC1D5CF34;SizeAsReceived:8723;Count:62 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [ZAAJYT/6/kmuRUMhQPwfCUXKMi+p0Nee] x-microsoft-original-message-id: x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HE1EUR02HT080;6:ivSc8uocwlUwbGy4z4+Lx0c72WirNKFq62FTmSDn++rx1HVoDx4F5YPxDF9v829lyMAV6fY21vNjbjpFNFSwdZXOy/uTSo6i+2EU38s0yISwezFycFdwJkDVKa7bmWVCph2k73M51fLb4MJ3goVA4wCIM8xLFAtisQmJFwFrBPFp9+Anay1sdI5FjRKOo7zf0N10cpMnrPYlI+5JVpChcbb9odeLQBpZBpabJaHVbWQ6iCtdGRV82N7PDrTksYyR9HmGI8l6Mmk4DNkAHxHdYavRfEZV1fmasdRvfs0osVfPOfOF/hZ6Cmr9iVBEuTpXbua+EL/UOAKt1VIr9sPyOBPdRcUsM5O2/Dj7rLB/2CwF0iIoNkUiJPvDM+lW+sC1wkTPUVfmq96LDfLvKnxLb11Ce2eiOeTn/N7M7dXP0iwlxTYGTHUEkiGtBqefCmgG6MlmAuoPfMJPXZEMTFIqxA==;5:wFIyTAm+yZMVkJnLUINva0GIslhCwT2nkmlX+ek6HmGs2eUoIL9uHDmJfnKwA7kVzMsP0JuEYOYLEXPRigGQ9PJv34wKqbppHu9OKxaA4BqKLYZWZX0Q+VL7SoAblYSlZSlVUy8o0cJAtHty7NEYNpaqT0qUVpkN+HrecRQnVso=;7:k1a6wdP6pZdPG0ABgBHUVMI/gnsB31SnnGtqH6TbcEvpSU4shHnGeaI6kwOJgsrv8W5VBFRZu9Uv/UmEQAJ+ampiFr6H4Y9lEFKsN4Jx5C1YGgCqpqywSK8Ai9goLeVW2fW1hQgYfDon2afSSua8ng== x-incomingheadercount: 62 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(20181119063)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:HE1EUR02HT080; x-ms-traffictypediagnostic: HE1EUR02HT080: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(4566010)(82015058);SRVR:HE1EUR02HT080;BCL:0;PCL:0;RULEID:;SRVR:HE1EUR02HT080; x-microsoft-antispam-message-info: mE7zwk5wdz5MLqSs3GbaMDzEa2g5M54yYbKIH+0GV+GpBcE1ADr5DytcK2uDdHB7 Content-ID: <0B47C024F1AE384CA3FCE7F9EEDCC0BA@eurprd07.prod.outlook.com> 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: ab45de1a-c15d-4f4a-3e70-08d67242ee43 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: d4d70346-2c10-4f39-8c00-e767963926d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2019 12:48:30.5452 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT080 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 remove that code. 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. Bernd Edlinger (4): rtlwifi: rtl8723ae: Take the FW LPS mode handling out rtlwifi: rtl8723ae: Don't use dm.undec_sm_pwdb for input gain control when no beacon was received in the connected state. rtlwifi: rtl8723ae: Re-introduce rtl8723e_dm_refresh_rate_adaptive_mask rtlwifi: Move the clearing of rtlpriv->link_info.num_rx_inperiod in rtl_watchdog_wq_callback a few lines down. 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/fw.c | 20 ----- .../net/wireless/realtek/rtlwifi/rtl8723ae/fw.h | 1 - .../net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 56 +------------ 6 files changed, 98 insertions(+), 80 deletions(-)