From patchwork Tue May 1 22:46:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= X-Patchwork-Id: 907240 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ae0fboNR"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40bGkR4mNRz9rx7 for ; Wed, 2 May 2018 08:47:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751851AbeEAWqs (ORCPT ); Tue, 1 May 2018 18:46:48 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33883 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbeEAWqe (ORCPT ); Tue, 1 May 2018 18:46:34 -0400 Received: by mail-pf0-f194.google.com with SMTP id a14so10101225pfi.1; Tue, 01 May 2018 15:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1N2qTKL6rQdcDmCpKi6cNkzt26cakRW7g5J0qSLkRXM=; b=ae0fboNRRw42wb+E9sOEgmh0T2+xdf2eJ+CZpIeecW6Pyxw48LvCocmMZb23HtTgnE NnOIKkWzcF7dVAPC9Wr6z2pglee+uQws1Gcq8XkS80ggXWouEzS99FImrTydrH5GDHqO GlUmwO7jh/UPfTPQtXlfiDCIlk1XtH3QdgrNbKQcDcwJLiWNQYJLVBlbannsJfOa9F+w EP9l5e0h3fDX6rjA9YXiEQNXFVDwGRJbLb0R11s5hC0EGhwBpA+QSkW27jYwwmU2bTO9 8zp1N1kNI+JL94HQwEiMMPmmeS3xmU2T+l2nPpakZPEHZpi3cGJAeidH2OrfndEf7wX7 Otrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1N2qTKL6rQdcDmCpKi6cNkzt26cakRW7g5J0qSLkRXM=; b=SznLBpX4NnLhSpf771ZFBU7sthEriiQUAH4Z+v2paRTu3a7rZI2eTbC6bKi4QQMvuT A/cgPZ39j40/65H8t0bCy8eUmrZUJtdTo4rvHOy1ropwVfB4FmSp30Oiv0fKsRGYzHKM zcwgRxr4pjAmqAzdV2v/SPGwRfXj+iFLyAUeEwFXAOxWH3AaHaVZWpWb7vfFwt2z36Qp FX44GFkQXLsKIwuJa63XuBy6RwcuuXV27p369UKj2jdUuxaZyNRZJkOJyWziwMiFOHVT pcLcLixlcjXQJxu8yhHwgg27vy1P2Xu88LJdVdWVQ1wNCv5bAVcTUV/PS73IY4aZjqzB 95GQ== X-Gm-Message-State: ALQs6tAHhiqkjklObcKBO9gSfC7BgIq7thUUK5FPwwnP2diDFAVhqrxj 3+rd995TOIPEODhbSVmtTPmJ1GR2vws= X-Google-Smtp-Source: AB8JxZpfc26Gcp13fp73N1Uch8dNkZx3RNUUtYpYmtWEcayY+Y1Fw1Peri0SziM9wWO1Z9eMIN3kFA== X-Received: by 2002:a63:9c09:: with SMTP id f9-v6mr14493397pge.274.1525214793787; Tue, 01 May 2018 15:46:33 -0700 (PDT) Received: from kiddo.hsd1.wa.comcast.net (c-73-97-192-101.hsd1.wa.comcast.net. [73.97.192.101]) by smtp.gmail.com with ESMTPSA id l8sm18294259pff.126.2018.05.01.15.46.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 15:46:32 -0700 (PDT) From: "=?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?=" X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Larry Finger Cc: Steve deRosier , Yan-Hsuan Chuang , Ping-Ke Shih , Birming Chiu , Shaofu , Steven Ting , Chaoming Li , Kalle Valo , linux-wireless , Network Development , LKML , Daniel Drake , =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= , linux@endlessm.com Subject: [RFC PATCH 1/3] rtlwifi: btcoex: Don't init antenna position to main port Date: Tue, 1 May 2018 15:46:11 -0700 Message-Id: <20180501224613.32460-1-jprvita@endlessm.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This partially reverts commit 40d9dd4f1c5dcd0d4a2a1f0efcd225c9c4b36d6f, which does not only remove global variables from btcoex, as described on its commit message, but also does a few other things -- in particular, setting the default antenna position to BTC_ANTENNA_AT_MAIN_PORT. This drastically affects the upload performance and signal strenght on the HP 240 G4 laptop, as shown by the results bellow: Without this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -42.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 39678 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 735 KBytes 6.02 Mbits/sec 1 1.41 KBytes [ 4] 1.00-2.00 sec 274 KBytes 2.25 Mbits/sec 1 1.41 KBytes [ 4] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 1 28.3 KBytes [ 4] 5.00-6.00 sec 423 KBytes 3.47 Mbits/sec 3 41.0 KBytes [ 4] 6.00-7.00 sec 840 KBytes 6.88 Mbits/sec 0 58.0 KBytes [ 4] 7.00-8.00 sec 830 KBytes 6.79 Mbits/sec 1 1.41 KBytes [ 4] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 3.03 MBytes 2.54 Mbits/sec 7 sender [ 4] 0.00-10.00 sec 2.88 MBytes 2.41 Mbits/sec receiver iperf Done. With this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -14.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 59380 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 4.63 MBytes 38.8 Mbits/sec 0 194 KBytes [ 4] 1.00-2.00 sec 4.58 MBytes 38.4 Mbits/sec 0 273 KBytes [ 4] 2.00-3.00 sec 5.05 MBytes 42.3 Mbits/sec 0 332 KBytes [ 4] 3.00-4.00 sec 4.98 MBytes 41.8 Mbits/sec 0 393 KBytes [ 4] 4.00-5.00 sec 4.76 MBytes 39.9 Mbits/sec 0 434 KBytes [ 4] 5.00-6.00 sec 4.85 MBytes 40.7 Mbits/sec 0 434 KBytes [ 4] 6.00-7.00 sec 3.96 MBytes 33.2 Mbits/sec 0 464 KBytes [ 4] 7.00-8.00 sec 4.74 MBytes 39.8 Mbits/sec 0 481 KBytes [ 4] 8.00-9.00 sec 4.22 MBytes 35.4 Mbits/sec 0 508 KBytes [ 4] 9.00-10.00 sec 4.09 MBytes 34.3 Mbits/sec 0 564 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 45.9 MBytes 38.5 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 45.0 MBytes 37.7 Mbits/sec receiver iperf Done. Signed-off-by: João Paulo Rechi Vita --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index b026e80940a4..86182b917c92 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -1388,9 +1388,6 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) ant_num = rtl_get_hwpg_ant_num(rtlpriv); exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num); - /* set default antenna position to main port */ - btcoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT; - single_ant_path = rtl_get_hwpg_single_ant_path(rtlpriv); exhalbtc_set_single_ant_path(btcoexist, single_ant_path); From patchwork Tue May 1 22:46:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= X-Patchwork-Id: 907242 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TJoQQ0KD"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40bGkw0wSxz9rx7 for ; Wed, 2 May 2018 08:47:36 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751616AbeEAWqn (ORCPT ); Tue, 1 May 2018 18:46:43 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39320 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbeEAWqf (ORCPT ); Tue, 1 May 2018 18:46:35 -0400 Received: by mail-pf0-f194.google.com with SMTP id z9so10081228pfe.6; Tue, 01 May 2018 15:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ppPTCq/dX49J7eRStxPXubxD/lJf4DDA5qYH2nTrXqQ=; b=TJoQQ0KDpdGoFoPYLcEyDr2CvNnKWV3cNekoObvh7qHEShlIIw0Dp7mrKBrHtAyOw1 C6OB5jLTN69cL/JPwKF0e/I8piCbFylWEWkJqrx2IIzBOJ0zJ8VnM86NCRyglXZw9T7I 0a84hFjxPNujU/Lb/qyGfMRciYnz5JMwvc19F2j+RmOoCaR/IHh8osl37/czWC4SUWCt NSQ/5w9IiqF5/xCFdF5jxNCvCiWku1SrTnUjnCcbgM9iQk6QcEPTdGqvb2t9LkQY8TIr 03H0PJvLCKuJNB7rk+oYQt3GpmA+7ikf2jFZ9PIWnUrPrHHcuFwg1On8MC9+OVrNUo8X sEOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ppPTCq/dX49J7eRStxPXubxD/lJf4DDA5qYH2nTrXqQ=; b=Eg2f07R1qDFHPfsiRs2QJCbzxysFdAEIRWp1He9PoaOg6gqngxUfN3YvYOC796e51Q vt5rRwwmI41CYDAioxNDfNd5ZRUZJtHJBWj07SGbIxm2WUciDh/WJQxR30jALaRMT2hW NzYqj8BVmUN6NC8i+EQ411P7fNfMah+rT+I0Lynf2haz9XvcbUl2MnTpbhQGokcz0OIv WCxAgad8OgKuzvN5IIO/K5ymfJQv1taLcOtjyMj/dS2yiVlUIiJ+OmDtSOjB3GbDGSpw wld1nZlfxnEuCjGahYEsJ09BDnEOQvd5JghIvUwI0vGxy/Ftrzw97UC4X1Jfo26Zap9A 4l7A== X-Gm-Message-State: ALQs6tBme2wJCffhBjbkal7hSzzNAtVQzQ0idgDwTbnHX0Kvmu6U9QB3 /YsUR33SSzQlF82895VrCQg= X-Google-Smtp-Source: AB8JxZqmaRxf0+G6i90dUJL0YLNCkisNQXAJnKMkEFXvB/v1/J4kYyyo0rqOdt6KoZ+lChwwtsSBlQ== X-Received: by 2002:a63:751d:: with SMTP id q29-v6mr14414613pgc.269.1525214794940; Tue, 01 May 2018 15:46:34 -0700 (PDT) Received: from kiddo.hsd1.wa.comcast.net (c-73-97-192-101.hsd1.wa.comcast.net. [73.97.192.101]) by smtp.gmail.com with ESMTPSA id l8sm18294259pff.126.2018.05.01.15.46.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 15:46:34 -0700 (PDT) From: "=?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?=" X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Larry Finger Cc: Steve deRosier , Yan-Hsuan Chuang , Ping-Ke Shih , Birming Chiu , Shaofu , Steven Ting , Chaoming Li , Kalle Valo , linux-wireless , Network Development , LKML , Daniel Drake , =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= , linux@endlessm.com Subject: [RFC PATCH 2/3] Revert "rtlwifi: fill FW version and subversion" Date: Tue, 1 May 2018 15:46:12 -0700 Message-Id: <20180501224613.32460-2-jprvita@endlessm.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180501224613.32460-1-jprvita@endlessm.com> References: <20180501224613.32460-1-jprvita@endlessm.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This reverts commit 874e837d67d0db179c9771f38fd21df07c703e93. This drastically affects the upload performance and signal strenght on the HP 240 G4 laptop, as shown by the results bellow: Without this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -42.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 39678 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 735 KBytes 6.02 Mbits/sec 1 1.41 KBytes [ 4] 1.00-2.00 sec 274 KBytes 2.25 Mbits/sec 1 1.41 KBytes [ 4] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 1 28.3 KBytes [ 4] 5.00-6.00 sec 423 KBytes 3.47 Mbits/sec 3 41.0 KBytes [ 4] 6.00-7.00 sec 840 KBytes 6.88 Mbits/sec 0 58.0 KBytes [ 4] 7.00-8.00 sec 830 KBytes 6.79 Mbits/sec 1 1.41 KBytes [ 4] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 3.03 MBytes 2.54 Mbits/sec 7 sender [ 4] 0.00-10.00 sec 2.88 MBytes 2.41 Mbits/sec receiver iperf Done. With this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -14.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 59380 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 4.63 MBytes 38.8 Mbits/sec 0 194 KBytes [ 4] 1.00-2.00 sec 4.58 MBytes 38.4 Mbits/sec 0 273 KBytes [ 4] 2.00-3.00 sec 5.05 MBytes 42.3 Mbits/sec 0 332 KBytes [ 4] 3.00-4.00 sec 4.98 MBytes 41.8 Mbits/sec 0 393 KBytes [ 4] 4.00-5.00 sec 4.76 MBytes 39.9 Mbits/sec 0 434 KBytes [ 4] 5.00-6.00 sec 4.85 MBytes 40.7 Mbits/sec 0 434 KBytes [ 4] 6.00-7.00 sec 3.96 MBytes 33.2 Mbits/sec 0 464 KBytes [ 4] 7.00-8.00 sec 4.74 MBytes 39.8 Mbits/sec 0 481 KBytes [ 4] 8.00-9.00 sec 4.22 MBytes 35.4 Mbits/sec 0 508 KBytes [ 4] 9.00-10.00 sec 4.09 MBytes 34.3 Mbits/sec 0 564 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 45.9 MBytes 38.5 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 45.0 MBytes 37.7 Mbits/sec receiver iperf Done. Signed-off-by: João Paulo Rechi Vita --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 2 -- drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c index 63874512598b..a2eca669873b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c @@ -141,8 +141,6 @@ int rtl88e_download_fw(struct ieee80211_hw *hw, return 1; pfwheader = (struct rtlwifi_firmware_header *)rtlhal->pfirmware; - rtlhal->fw_version = le16_to_cpu(pfwheader->version); - rtlhal->fw_subversion = pfwheader->subversion; pfwdata = rtlhal->pfirmware; fwsize = rtlhal->fwsize; RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c index 521039c5d4ce..0d1ebc861720 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c @@ -200,8 +200,6 @@ int rtl8723_download_fw(struct ieee80211_hw *hw, return 1; pfwheader = (struct rtlwifi_firmware_header *)rtlhal->pfirmware; - rtlhal->fw_version = le16_to_cpu(pfwheader->version); - rtlhal->fw_subversion = pfwheader->subversion; pfwdata = rtlhal->pfirmware; fwsize = rtlhal->fwsize; From patchwork Tue May 1 22:46:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= X-Patchwork-Id: 907241 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WZMBoswE"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40bGkh4rsGz9rx7 for ; Wed, 2 May 2018 08:47:24 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797AbeEAWqp (ORCPT ); Tue, 1 May 2018 18:46:45 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:43610 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbeEAWqh (ORCPT ); Tue, 1 May 2018 18:46:37 -0400 Received: by mail-pg0-f68.google.com with SMTP id k11-v6so8074394pgo.10; Tue, 01 May 2018 15:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6ISBjlElGU/qNp+vwoCewQQTmIXfh1nRY23toTklSQA=; b=WZMBoswERYvLzeTTPSRsRvmlzna8yoJgM4ee63IX19WvzBsQRiV/6rUfbWAWVaCzmG BJRIpezKoidhfqRLvxXjKys9iHGGWAU12M0+1oqB4ANnPZDFm1S2iWBXlqKpPnJwH827 Iyz4uFGN5qx/dVeP3NxpfxnIU/zVG0Atan4c6E5a5h4sAtQkOABFcHLo2OExa5pSGlfT flrtCZcgUDkOj3kaXO6LoNXLDR2F5GZNPe8Ek5/IJSjeej1xzTe5U0LYQ65Bbuwy2ijh 8nEYAUu0UEOU7kgtPIlSszBqMgtLHnmwYzBaESgZl5igWOQXfJ/ILMPj1oT4r9ub52PC /HgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ISBjlElGU/qNp+vwoCewQQTmIXfh1nRY23toTklSQA=; b=mDs39PniXFBYHnuRriIMGw053OWjpWMRvBFOm3zyeMa8ZS47Pl5ounjzSZNCkZ7LJe sb1FPgyvblYl6gEhTrM1D4E6D/F9tVSpsgMUYuTRhiOh6pBMm59jU+kpB2o3FIv4FL7j zc2N2WfStIh8kEQE0cXNxjgtt2ccrfLB5/0Gpjmo9UCgPhC9AHIeoK5HZo3/J8gRRfvR po5/MVOlHYj5mVuk8IwHbUW5FtvIGvV2u08cAMfY15qjVKOebPB1QSaw3VSX2uLBDaBg OM29ExU9fhFwhSqEYEtSPByt/CIxhEkWHJRKe9fllcFPlyBeRhWOyZLkDZa1O66jr6tq odCQ== X-Gm-Message-State: ALQs6tAQJYQekXg0SeX8Ulm9IUKzb2//bOqqdIl4vSCctyYbLEcSEmCf OkNjFF7PkdTd/7V63jIb9TY= X-Google-Smtp-Source: AB8JxZpHEQg732DrE3AxoNJzW0uadLGhEaZYu5AgeHZVg13sSxbQlcnf0Wh+Vffb2eOMYsW/bfYDCg== X-Received: by 2002:a63:203:: with SMTP id 3-v6mr7428236pgc.133.1525214796251; Tue, 01 May 2018 15:46:36 -0700 (PDT) Received: from kiddo.hsd1.wa.comcast.net (c-73-97-192-101.hsd1.wa.comcast.net. [73.97.192.101]) by smtp.gmail.com with ESMTPSA id l8sm18294259pff.126.2018.05.01.15.46.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 15:46:35 -0700 (PDT) From: "=?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?=" X-Google-Original-From: =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= To: Larry Finger Cc: Steve deRosier , Yan-Hsuan Chuang , Ping-Ke Shih , Birming Chiu , Shaofu , Steven Ting , Chaoming Li , Kalle Valo , linux-wireless , Network Development , LKML , Daniel Drake , =?utf-8?q?Jo=C3=A3o_Paulo_Rechi_Vita?= , linux@endlessm.com Subject: [RFC PATCH 3/3] rtlwifi: btcoex: Always use 2ant-functions for RTL8723BE Date: Tue, 1 May 2018 15:46:13 -0700 Message-Id: <20180501224613.32460-3-jprvita@endlessm.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180501224613.32460-1-jprvita@endlessm.com> References: <20180501224613.32460-1-jprvita@endlessm.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This partially reverts commit 7937f02d1953952a6eaf626b175ea9db5541e699, which not only hooked external functions for newer ICs, as described in its commit message, but also changed the behavior for RTL8723BE depending on the value of board_info.btdm_ant_num. When board_info.btdm_ant_num == 1, 7937f02d19 changes the codepath to use a whole different set of functions ex_btc8723b1ant_*, instead of the ex_btc8723b2ant_* that were used before it. This drastically affects the upload performance and signal strenght on the HP 240 G4 laptop, as shown by the results bellow: Without this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -42.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 39678 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 735 KBytes 6.02 Mbits/sec 1 1.41 KBytes [ 4] 1.00-2.00 sec 274 KBytes 2.25 Mbits/sec 1 1.41 KBytes [ 4] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 1 28.3 KBytes [ 4] 5.00-6.00 sec 423 KBytes 3.47 Mbits/sec 3 41.0 KBytes [ 4] 6.00-7.00 sec 840 KBytes 6.88 Mbits/sec 0 58.0 KBytes [ 4] 7.00-8.00 sec 830 KBytes 6.79 Mbits/sec 1 1.41 KBytes [ 4] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 4] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 3.03 MBytes 2.54 Mbits/sec 7 sender [ 4] 0.00-10.00 sec 2.88 MBytes 2.41 Mbits/sec receiver iperf Done. With this change: $ sudo iw dev wlp2s0 scan | grep -B3 JJ | grep signal signal: -14.00 dBm $ iperf3 -c 192.168.1.254 Connecting to host 192.168.1.254, port 5201 [ 4] local 192.168.1.253 port 59380 connected to 192.168.1.254 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 4.63 MBytes 38.8 Mbits/sec 0 194 KBytes [ 4] 1.00-2.00 sec 4.58 MBytes 38.4 Mbits/sec 0 273 KBytes [ 4] 2.00-3.00 sec 5.05 MBytes 42.3 Mbits/sec 0 332 KBytes [ 4] 3.00-4.00 sec 4.98 MBytes 41.8 Mbits/sec 0 393 KBytes [ 4] 4.00-5.00 sec 4.76 MBytes 39.9 Mbits/sec 0 434 KBytes [ 4] 5.00-6.00 sec 4.85 MBytes 40.7 Mbits/sec 0 434 KBytes [ 4] 6.00-7.00 sec 3.96 MBytes 33.2 Mbits/sec 0 464 KBytes [ 4] 7.00-8.00 sec 4.74 MBytes 39.8 Mbits/sec 0 481 KBytes [ 4] 8.00-9.00 sec 4.22 MBytes 35.4 Mbits/sec 0 508 KBytes [ 4] 9.00-10.00 sec 4.09 MBytes 34.3 Mbits/sec 0 564 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 45.9 MBytes 38.5 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 45.0 MBytes 37.7 Mbits/sec receiver iperf Done. Signed-off-by: João Paulo Rechi Vita --- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 62 ++++--------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index 86182b917c92..a862b5efdf55 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -1452,10 +1452,7 @@ void exhalbtc_init_hw_config(struct btc_coexist *btcoexist, bool wifi_only) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_init_hwconfig(btcoexist, wifi_only); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_init_hwconfig(btcoexist); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_init_hwconfig(btcoexist, wifi_only); + ex_btc8723b2ant_init_hwconfig(btcoexist); } else if (IS_HARDWARE_TYPE_8723A(btcoexist->adapter)) { /* 8723A has no this function */ } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { @@ -1481,10 +1478,7 @@ void exhalbtc_init_coex_dm(struct btc_coexist *btcoexist) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_init_coex_dm(btcoexist); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_init_coex_dm(btcoexist); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_init_coex_dm(btcoexist); + ex_btc8723b2ant_init_coex_dm(btcoexist); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_init_coex_dm(btcoexist); @@ -1516,10 +1510,7 @@ void exhalbtc_ips_notify(struct btc_coexist *btcoexist, u8 type) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_ips_notify(btcoexist, ips_type); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_ips_notify(btcoexist, ips_type); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_ips_notify(btcoexist, ips_type); + ex_btc8723b2ant_ips_notify(btcoexist, ips_type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_ips_notify(btcoexist, ips_type); @@ -1549,10 +1540,7 @@ void exhalbtc_lps_notify(struct btc_coexist *btcoexist, u8 type) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_lps_notify(btcoexist, lps_type); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_lps_notify(btcoexist, lps_type); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_lps_notify(btcoexist, lps_type); + ex_btc8723b2ant_lps_notify(btcoexist, lps_type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_lps_notify(btcoexist, lps_type); @@ -1582,10 +1570,7 @@ void exhalbtc_scan_notify(struct btc_coexist *btcoexist, u8 type) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_scan_notify(btcoexist, scan_type); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_scan_notify(btcoexist, scan_type); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_scan_notify(btcoexist, scan_type); + ex_btc8723b2ant_scan_notify(btcoexist, scan_type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_scan_notify(btcoexist, scan_type); @@ -1630,10 +1615,7 @@ void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_connect_notify(btcoexist, asso_type); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_connect_notify(btcoexist, asso_type); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_connect_notify(btcoexist, asso_type); + ex_btc8723b2ant_connect_notify(btcoexist, asso_type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_connect_notify(btcoexist, asso_type); @@ -1666,10 +1648,7 @@ void exhalbtc_mediastatus_notify(struct btc_coexist *btcoexist, else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_media_status_notify(btcoexist, status); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_media_status_notify(btcoexist, status); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_media_status_notify(btcoexist, status); + ex_btc8723b2ant_media_status_notify(btcoexist, status); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_media_status_notify(btcoexist, status); @@ -1709,12 +1688,8 @@ void exhalbtc_special_packet_notify(struct btc_coexist *btcoexist, u8 pkt_type) ex_btc8821a1ant_special_packet_notify(btcoexist, packet_type); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_special_packet_notify(btcoexist, - packet_type); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_special_packet_notify(btcoexist, - packet_type); + ex_btc8723b2ant_special_packet_notify(btcoexist, + packet_type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_special_packet_notify(btcoexist, @@ -1741,12 +1716,7 @@ void exhalbtc_bt_info_notify(struct btc_coexist *btcoexist, ex_btc8821a1ant_bt_info_notify(btcoexist, tmp_buf, length); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_bt_info_notify(btcoexist, tmp_buf, - length); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_bt_info_notify(btcoexist, tmp_buf, - length); + ex_btc8723b2ant_bt_info_notify(btcoexist, tmp_buf, length); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_bt_info_notify(btcoexist, tmp_buf, @@ -1763,8 +1733,6 @@ void exhalbtc_rf_status_notify(struct btc_coexist *btcoexist, u8 type) if (IS_HARDWARE_TYPE_8821(btcoexist->adapter)) { } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_rf_status_notify(btcoexist, type); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { } } @@ -1804,10 +1772,7 @@ void exhalbtc_halt_notify(struct btc_coexist *btcoexist) else if (btcoexist->board_info.btdm_ant_num == 1) ex_btc8821a1ant_halt_notify(btcoexist); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_halt_notify(btcoexist); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_halt_notify(btcoexist); + ex_btc8723b2ant_halt_notify(btcoexist); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_halt_notify(btcoexist); @@ -1880,10 +1845,7 @@ void exhalbtc_periodical(struct btc_coexist *btcoexist) if (!halbtc_under_ips(btcoexist)) ex_btc8821a1ant_periodical(btcoexist); } else if (IS_HARDWARE_TYPE_8723B(btcoexist->adapter)) { - if (btcoexist->board_info.btdm_ant_num == 2) - ex_btc8723b2ant_periodical(btcoexist); - else if (btcoexist->board_info.btdm_ant_num == 1) - ex_btc8723b1ant_periodical(btcoexist); + ex_btc8723b2ant_periodical(btcoexist); } else if (IS_HARDWARE_TYPE_8192E(btcoexist->adapter)) { if (btcoexist->board_info.btdm_ant_num == 2) ex_btc8192e2ant_periodical(btcoexist);