lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 May 2021 04:04:41 +0200
From:   Reto Schneider <code@...o-schneider.ch>
To:     Jes.Sorensen@...il.com, linux-wireless@...r.kernel.org,
        pkshih@...ltek.com
Cc:     yhchuang@...ltek.com, Larry.Finger@...inger.net,
        tehuang@...ltek.com, reto.schneider@...qvarnagroup.com,
        ccchiu77@...il.com, kvalo@...eaurora.org, davem@...emloft.net,
        kuba@...nel.org, Chris Chiu <chiu@...lessos.org>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH 6/7] rtl8xxxu: Fix the reported rx signal strength

From: Chris Chiu <chiu@...lessos.org>

In rtl8xxxx_rx_query_desc for each chip in rtlwifi family, the
rx_status->signal is always the status->recvsignalpower + 10.

We also observe the same thing in air capture that the RSSI is
always ~10dBm higher than reported from driver.

Add this 10dBm to avoid confusion.

(cherry picked from commit e1a4f83da577474dfa23e85483a83eb7fb707edc)
Signed-off-by: Reto Schneider <reto.schneider@...qvarnagroup.com>
---

 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 0c997c360028..088e007e8bd0 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -5319,6 +5319,11 @@ static void rtl8xxxu_rx_parse_phystats(struct rtl8xxxu_priv *priv,
 		rx_status->signal =
 			(phy_stats->cck_sig_qual_ofdm_pwdb_all >> 1) - 110;
 	}
+
+	// refers to rtlxxxx_rx_query_desc of rtlwifi/rtlxxxx/trx.c
+	// needs to verify on RTL8723BU
+	if (priv->rtl_chip != RTL8723B && priv->rtl_chip != RTL8192E)
+		rx_status->signal += 10;
 }
 
 static void rtl8xxxu_free_rx_resources(struct rtl8xxxu_priv *priv)
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ