From 2ad2a813b803593832fa10b2c3d6d6065aec17ad Mon Sep 17 00:00:00 2001 From: Bitterblue Smith Date: Tue, 1 Nov 2022 22:33:09 +0200 Subject: wifi: rtl8xxxu: Fix the CCK RSSI calculation The CCK RSSI calculation is incorrect for the RTL8723BU, RTL8192EU, and RTL8188FU. Add new functions for these chips with code copied from their vendor drivers. Use the old code only for the RTL8723AU and RTL8192CU. I didn't notice any difference in the reported signal strength with my RTL8188FU, but I didn't look very hard either. Signed-off-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/926c838f-4997-698b-4da9-44582e2af99a@gmail.com --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h') diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h index 190bc0e8dc33..04bf77959fba 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h @@ -960,6 +960,9 @@ #define CCK_PD_TYPE1_LV3_TH 0xdd #define CCK_PD_TYPE1_LV4_TH 0xed +#define REG_AGC_RPT 0xa80 +#define AGC_RPT_CCK BIT(7) + #define REG_CONFIG_ANT_A 0x0b68 #define REG_CONFIG_ANT_B 0x0b6c -- cgit v1.2.3