[1/2] rtw88: fix wrong rx power calculation
diff mbox series

Message ID 1568270355-29727-2-git-send-email-yhchuang@realtek.com
State Accepted
Commit e9afa2dc4090390e64fd1564c0f20d09f3cf0c92
Delegated to: Kalle Valo
Headers show
Series
  • rtw88: report RX signal strength for each antenna
Related show

Commit Message

Tony Chuang Sept. 12, 2019, 6:39 a.m. UTC
From: Tsang-Shian Lin <thlin@realtek.com>

Fix the wrong RF path for CCK rx power calculation.

Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Tsang-Shian Lin <thlin@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chris Chiu Sept. 12, 2019, 7:05 a.m. UTC | #1
On Thu, Sep 12, 2019 at 2:39 PM <yhchuang@realtek.com> wrote:
>
> From: Tsang-Shian Lin <thlin@realtek.com>
>
> Fix the wrong RF path for CCK rx power calculation.
>
> Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
> Signed-off-by: Tsang-Shian Lin <thlin@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
> ---
>  drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
Kalle Valo Sept. 13, 2019, 3:14 p.m. UTC | #2
<yhchuang@realtek.com> wrote:

> From: Tsang-Shian Lin <thlin@realtek.com>
> 
> Fix the wrong RF path for CCK rx power calculation.
> 
> Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
> Signed-off-by: Tsang-Shian Lin <thlin@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> Reviewed-by: Chris Chiu <chiu@endlessm.com>

2 patches applied to wireless-drivers-next.git, thanks.

e9afa2dc4090 rtw88: fix wrong rx power calculation
98ab76ef6b6d rtw88: report RX power for each antenna

Patch
diff mbox series

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index 207f64c..24b27bc 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -1620,9 +1620,9 @@  static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status,
 	else if (gain_a > u_bnd)
 		rx_power[RF_PATH_A] -= (gain_a - u_bnd) << 1;
 	if (gain_b < l_bnd)
-		rx_power[RF_PATH_A] += (l_bnd - gain_b) << 1;
+		rx_power[RF_PATH_B] += (l_bnd - gain_b) << 1;
 	else if (gain_b > u_bnd)
-		rx_power[RF_PATH_A] -= (gain_b - u_bnd) << 1;
+		rx_power[RF_PATH_B] -= (gain_b - u_bnd) << 1;
 
 	rx_power[RF_PATH_A] -= 110;
 	rx_power[RF_PATH_B] -= 110;