On 2020-05-04 18:50:04 [+0800], yhchuang@xxxxxxxxxxx wrote: > diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.h b/drivers/net/wireless/realtek/rtw88/rtw8723d.h > index 6321dea83519..035049a29e7c 100644 > --- a/drivers/net/wireless/realtek/rtw88/rtw8723d.h > +++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.h > @@ -44,6 +44,28 @@ struct rtw8723d_efuse { > struct rtw8723de_efuse e; > }; > > +/* phy status page0 */ > +#define GET_PHY_STAT_P0_PWDB(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) > + > +/* phy status page1 */ > +#define GET_PHY_STAT_P1_PWDB_A(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) > +#define GET_PHY_STAT_P1_PWDB_B(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(23, 16)) > +#define GET_PHY_STAT_P1_RF_MODE(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x03), GENMASK(29, 28)) > +#define GET_PHY_STAT_P1_L_RXSC(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(11, 8)) > +#define GET_PHY_STAT_P1_HT_RXSC(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(15, 12)) > +#define GET_PHY_STAT_P1_RXEVM_A(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(7, 0)) > +#define GET_PHY_STAT_P1_CFO_TAIL_A(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x05), GENMASK(7, 0)) > +#define GET_PHY_STAT_P1_RXSNR_A(phy_stat) \ > + le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(7, 0)) > + Out of curiosity: Does it make sense to merge these defines into a common file? Unless I missed something, b and c have the same ones here. > #define REG_OFDM0_XAAGC1 0x0c50 > #define REG_OFDM0_XBAGC1 0x0c58 > > -- > 2.17.1 Sebastian