Search Linux Wireless

RE: rtl8822cs, mainline 6.16-rc7: kernel reports ' unsupported rf path'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Piotr Oniszczuk <piotr.oniszczuk@xxxxxxxxx> wrote:
> > Wiadomość napisana przez Ping-Ke Shih <pkshih@xxxxxxxxxxx> w dniu 23 lip 2025, o godz. 09:50:
> >
> > The dmsg find
> > non-working state:
> >   rtw88: rtw_chip_parameter_setup:1872 hal->rf_phy_num=1 hal->rf_path_num=1
> > working state:
> >   rtw88: rtw_chip_parameter_setup:1872 hal->rf_phy_num=2 hal->rf_path_num=2
> >
> > They were induced from register
> >  #define REG_SYS_CFG1 0x00F0
> >
> > Please apply below change and share the working/non-working sates.
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> > index fa0ed39cb199..95decf90a43d 100644
> > --- a/drivers/net/wireless/realtek/rtw88/main.c
> > +++ b/drivers/net/wireless/realtek/rtw88/main.c
> > @@ -1861,6 +1864,8 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)
> >        hal->chip_version = rtw_read32(rtwdev, REG_SYS_CFG1);
> >        hal->cut_version = BIT_GET_CHIP_VER(hal->chip_version);
> >        hal->mp_chip = (hal->chip_version & BIT_RTL_ID) ? 0 : 1;
> > +       printk("rtw88: %s:%d hal->chip_version=0x%x\n",
> > +               __func__, __LINE__, hal->chip_version);
> >        if (hal->chip_version & BIT_RF_TYPE_ID) {
> >                hal->rf_type = RF_2T2R;
> >                hal->rf_path_num = 2;
> 
> 
> here it is:
> 
> non-working: https://termbin.com/7goz
> working: https://termbin.com/lpsq

Not sure why bit BIT_RF_TYPE_ID (27) is different: 

working state:
   rtw88: rtw_chip_parameter_setup:1859 hal->chip_version=0x493d30ea
non-working state:
   rtw88: rtw_chip_parameter_setup:1859 hal->chip_version=0x303030ea

I'd try to read more times to see if it can become correct...
Also, I force to use correct value at the last iteration to see if it
can work even incorrect value of register 0xF0.

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index fa0ed39cb199..137418d1108d 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1858,9 +1861,14 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)
                return -EINVAL;
        }

-       hal->chip_version = rtw_read32(rtwdev, REG_SYS_CFG1);
+       for (int i = 0; i < 20; i++) {
+       hal->chip_version = i == 19 ? 0x493d30ea : rtw_read32(rtwdev, REG_SYS_CFG1);
        hal->cut_version = BIT_GET_CHIP_VER(hal->chip_version);
        hal->mp_chip = (hal->chip_version & BIT_RTL_ID) ? 0 : 1;
+       printk("rtw88: %s:%d hal->chip_version=0x%x\n",
+               __func__, __LINE__, hal->chip_version);
+       mdelay(100);
+       }
        if (hal->chip_version & BIT_RF_TYPE_ID) {
                hal->rf_type = RF_2T2R;
                hal->rf_path_num = 2;






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux