1: bc10d443d0bb ! 1: 7ff28ab06087 wifi: rtw88: move the 88xxa CCK power detect setter to phy.c @@ Commit message  Move it to phy.c as rtw_phy_cck_pd_set(), where the rest of the CCK power detect code and the level enum already live. rtw8812a and rtw8821a call - the core version, so rtw88xxa.c no longer provides it. + the core version, so rtw88xxa.c no longer provides it. No logical + changes have been made at all.  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith  + Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/phy.c ##  @@ drivers/net/wireless/realtek/rtw88/phy.c: static void rtw_phy_cck_pd(struct rtw_dev *rtwdev) 2: 9cba89318161 ! 2: badb33bd1c1b wifi: rtw88: 8723b: add the RTL8723B register definitions @@ Commit message registers.  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith  + Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/reg.h ##  @@ 3: 0296a0788e46 ! 3: fa965e8dd1c7 wifi: rtw88: 8723b: add the RTL8723B BB, RF and AGC tables @@ Commit message Co-developed-by: Michael Straube  Signed-off-by: Michael Straube  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith  + Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/rtw8723b_table.c (new) ##  @@ -: ------------ > 4: 8db5687fd5e9 wifi: rtw88: move the shared 8723x definitions to rtw8723x.h 4: 6d5c164f4640 ! 5: 12a1fbc76d34 wifi: rtw88: 8723b: add the RTL8723B chip driver @@ Commit message Co-developed-by: Michael Straube  Signed-off-by: Michael Straube  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith   ## drivers/net/wireless/realtek/rtw88/rtw8723b.c (new) ##  @@ @@ drivers/net/wireless/realtek/rtw88/rtw8723b.c (new)  +#include "fw.h"  +#include "mac.h"  +#include "phy.h" -+/* -+ * Shares the receive PHY status layout, the SDIO aggregation burst fields -+ * and a few baseband registers with the RTL8703B; reuse that header. -+ */ -+#include "rtw8703b.h"  +#include "rtw8723b.h"  +#include "rtw8723b_table.h"  +#include "sdio.h" @@ drivers/net/wireless/realtek/rtw88/rtw8723b.c (new)  +/* The eight per-rate CCK transmit power registers are consecutive. */  +#define RTW_CCK_SWING_REG_NUM 8  + -+/* -+ * Row 20 (-6.0 dB) intentionally does not match the v5.2.17 vendor driver, -+ * which has 0x1c, 0x1a, 0x18, 0x12, 0x0e, 0x08 there. Every other row agrees. -+ * The values below are what rtl8723be, the mainline driver for this same -+ * chip, uses at the same index, and they are also what the vendor's own -+ * cck_swing_table_ch1_ch13_92e and the staging rtl8723bs driver use. They -+ * also track the 0.5 dB step of the surrounding rows: against row 32 as 0 dB, -+ * 0x1b is within 0.06 of the ideal -6.0 dB value while 0x1c is 0.94 away, -+ * the largest error anywhere in the table. Treat the vendor row as the -+ * anomaly and do not "fix" this towards it. -+ */  +static const u8 rtw8723b_cck_swing_table_ch1_ch13[][8] = {  + {0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01}, /* 0, -16.0dB */  + {0x09, 0x09, 0x08, 0x06, 0x05, 0x03, 0x01, 0x01}, /* 1, -15.5dB */ @@ drivers/net/wireless/realtek/rtw88/rtw8723b.c (new)  + return rx_power;  +}  + -+static void rtw8723b_query_phy_status_cck(struct rtw_dev *rtwdev, u8 *phy_raw, ++static void rtw8723b_query_phy_status_cck(struct rtw_dev *rtwdev, void *phy_raw,  + struct rtw_rx_pkt_stat *pkt_stat)  +{ -+ struct phy_status_8703b *phy_status = (struct phy_status_8703b *)phy_raw; -+ u8 lna_idx = (phy_status->cck_agc_rpt_ofdm_cfosho_a & 0xE0) >> 5; -+ u8 vga_idx = (phy_status->cck_agc_rpt_ofdm_cfosho_a & 0x1F); ++ struct phy_status_8723x *phy_status = phy_raw; ++ u8 lna_idx = u8_get_bits(phy_status->cck_agc_rpt_ofdm_cfosho_a, 0xE0); ++ u8 vga_idx = u8_get_bits(phy_status->cck_agc_rpt_ofdm_cfosho_a, 0x1F);  + s8 rx_power = rtw8723b_cck_rx_power(lna_idx, vga_idx);  + s8 min_rx_power = -120;  + @@ drivers/net/wireless/realtek/rtw88/rtw8723b.c (new)  + rtwdev->dm_info.rssi[RF_PATH_A] = pkt_stat->rssi;  +}  + -+static void rtw8723b_query_phy_status_ofdm(struct rtw_dev *rtwdev, u8 *phy_raw, ++static void rtw8723b_query_phy_status_ofdm(struct rtw_dev *rtwdev, void *phy_raw,  + struct rtw_rx_pkt_stat *pkt_stat)  +{ -+ struct phy_status_8703b *phy_status = (struct phy_status_8703b *)phy_raw; ++ struct phy_status_8723x *phy_status = phy_raw;  + struct rtw_dm_info *dm_info = &rtwdev->dm_info;  + s8 val_s8;  + 5: 9c5f1aa19205 ! 6: 34beb8c08160 wifi: rtw88: 8723bs: add the RTL8723BS SDIO bind @@ Commit message Co-developed-by: Michael Straube  Signed-off-by: Michael Straube  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith  + Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/rtw8723bs.c (new) ##  @@ 6: 2e7d07374940 ! 7: f7367c0ab18a wifi: rtw88: 8723bs: enable building the RTL8723BS driver @@ Commit message module and the RTL8723BS SDIO front end.  Signed-off-by: Luka Gejak  + Reviewed-by: Bitterblue Smith  + Acked-by: Ping-Ke Shih   ## drivers/net/wireless/realtek/rtw88/Kconfig ##  @@ drivers/net/wireless/realtek/rtw88/Kconfig: config RTW88_8703B