Skip to contentSkip to conversation

rtw89: product id 0xa85a support on Linux?

DISCUSSION Applied Doug Brewer 4 participants 5 messages Jul 4, 2021 – Jul 8, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

The HP Laptop 15s-eq2028ur have a Realtek 802.11ax device. lspci -n shows

01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:
a85a]

I tried pkshih's rtw89 patchsets [1] and added PID to rtw89_pci_id_table. Scanning works but cannot connect to access points.
dmesg shows like (hiding MAC address):

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0, type 1 rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0, type 3 rtw89_pci 0000:01:00.0: chip rfe_type is 1
wlan0: authenticate with xx:xx:xx:xx:xx:xx
wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: authenticated
wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1)
wlan0: associated
rtw89_pci 0000:01:00.0: c2h reg timeout
rtw89_pci 0000:01:00.0: FW does not process h2c registers rtw89_pci 0000:01:00.0: timed out to flush queues

rtw89 will be the driver to support this wifi model? Thanks.

[1] https://www.spinics.net/lists/linux-wireless/msg212019.html

BR,
Doug.

#1 lore raw
Quoted 31 lines

-----Original Message-----
From: Doug Brewer [mailto:[email protected]]
Sent: Sunday, July 04, 2021 10:35 PM
To: [email protected]
Subject: rtw89: product id 0xa85a support on Linux?

Hello,

The HP Laptop 15s-eq2028ur have a Realtek 802.11ax device. lspci -n shows

01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:
a85a]

I tried pkshih's rtw89 patchsets [1] and added PID to rtw89_pci_id_table. Scanning works but cannot connect to access points.
dmesg shows like (hiding MAC address):

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0, type 1 rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0, type 3 rtw89_pci 0000:01:00.0: chip rfe_type is 1
wlan0: authenticate with xx:xx:xx:xx:xx:xx
wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: authenticated
wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1)
wlan0: associated
rtw89_pci 0000:01:00.0: c2h reg timeout
rtw89_pci 0000:01:00.0: FW does not process h2c registers rtw89_pci 0000:01:00.0: timed out to flush queues

Quoted 2 lines

rtw89 will be the driver to support this wifi model? Thanks.

The ID 0xa85a is a variant of 8852AE, and rtw89 will support it later. I'll provide you a patch when I have a draft implementation.

--
Ping-Ke

A message that is not in the archive (sent off-list or not yet received): CAG0V13RrjFP=+X32G+3ogo2LJbwcrZyoDeZ7LLBbVfR1JEWUyg@mail.gmail.com

#3 lore raw
Quoted 37 lines · Doug Brewer
Quoted 36 lines · Pkshih
Quoted 9 lines

-----Original Message-----
From: Doug Brewer [mailto:[email protected]]
Sent: Sunday, July 04, 2021 10:35 PM
To: [email protected]
Subject: rtw89: product id 0xa85a support on Linux?

Hello,

The HP Laptop 15s-eq2028ur have a Realtek 802.11ax device. lspci

-n shows

Quoted 2 lines

01:00.0 Network controller [0280]: Realtek Semiconductor Co.,

Ltd. Device [10ec:

Quoted 3 lines

a85a]

I tried pkshih's rtw89 patchsets [1] and added PID to

rtw89_pci_id_table.

Quoted 4 lines

Scanning works but cannot connect to access points. dmesg shows like (hiding MAC address):

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0,

type 1

Quoted 1 line

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0,

type 3

Quoted 6 lines

rtw89_pci 0000:01:00.0: chip rfe_type is 1
wlan0: authenticate with xx:xx:xx:xx:xx:xx
wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: authenticated
wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0

aid=1)

Quoted 5 lines

wlan0: associated
rtw89_pci 0000:01:00.0: c2h reg timeout rtw89_pci 0000:01:00.0: FW does not process h2c registers rtw89_pci 0000:01:00.0: timed out to flush queues

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

rtw89 will be the driver to support this wifi model? Thanks.

The ID 0xa85a is a variant of 8852AE, and rtw89 will support it later.
I'll provide you a patch when I have a draft implementation.

Thanks! I'm happy to test your patch.

Before trying new patch, please upgrade your firmware to v0.13.24.0 that you can download it via my github:

https://github.com/pkshih/linux-firmware/blob/a5b79c4790da3eb3690e23554225ef8db464f2c6/rtw89/rtw8852a_fw.bin

Then, check kernel log to confirm the version like dmesg you mentioned.

The path of the attachment patch isn't full path, so please apply it with specified path drivers/net/wireless/realtek/rtw89/

--
Ping-Ke

coex.c +3 -2
index 868aa9d..c224712 100644
@@ -4449,6 +4449,7 @@ void rtw89_btc_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
 static void _show_cx_info(struct rtw89_dev *rtwdev, struct seq_file *m)
 {
 	const struct rtw89_chip_info *chip = rtwdev->chip;
+	struct rtw89_hal *hal = &rtwdev->hal;
 	struct rtw89_btc *btc = &rtwdev->btc;
 	struct rtw89_btc_dm *dm = &btc->dm;
 	struct rtw89_btc_bt_info *bt = &btc->cx.bt;
@@ -4515,8 +4516,8 @@ static void _show_cx_info(struct rtw89_dev *rtwdev, struct seq_file *m)
 		   "1Ant_Pos:S1, " : "1Ant_Pos:S0, ")));
 
 	seq_printf(m, "3rd_coex:%d, dbcc:%d, tx_num:%d, rx_num:%d\n",
-		   btc->cx.other.type, rtwdev->dbcc_en, chip->tx_nss,
-		   chip->rx_nss);
+		   btc->cx.other.type, rtwdev->dbcc_en, hal->tx_nss,
+		   hal->rx_nss);
 }
 
 static void _show_wl_role_info(struct rtw89_dev *rtwdev, struct seq_file *m)
core.c +34 -22

100 lines not on this page · raw message

core.h +2 -0
index d535b92..42ebd58 100644
@@ -2338,6 +2338,8 @@ struct rtw89_hal {
 	u32 sw_amsdu_max_size;
 	u32 antenna_tx;
 	u32 antenna_rx;
+	u8 tx_nss;
+	u8 rx_nss;
 };
 
 #define RTW89_MAX_MAC_ID_NUM 128
fw.c +1 -1
index 7be5ce2..d0480f1 100644
@@ -753,7 +753,7 @@ static void __get_sta_he_pkt_padding(struct rtw89_dev *rtwdev,
 {
 	bool ppe_th;
 	u8 ppe16, ppe8;
-	u8 nss = min(sta->rx_nss, rtwdev->chip->tx_nss) - 1;
+	u8 nss = min(sta->rx_nss, rtwdev->hal.tx_nss) - 1;
 	u8 ppe_thres_hdr = sta->he_cap.ppe_thres[0];
 	u8 ru_bitmap;
 	u8 n, idx, sh;
fw.h +16 -0
index 9f7c452..e00bb5e 100644
@@ -63,6 +63,22 @@ enum rtw89_mac_c2h_type {
 	RTW89_FWCMD_C2HREG_FUNC_NULL = 0xFF
 };
 
+struct rtw89_c2h_phy_cap {
+	u32 func:7;
+	u32 ack:1;
+	u32 len:4;
+	u32 seq:4;
+	u32 rx_nss:8;
+	u32 bw:8;
+
+	u32 tx_nss:8;
+	u32 prot:8;
+	u32 nic:8;
+	u32 wl_func:8;
+
+	u32 hw_type:8;
+} __packed;
+
 enum rtw89_fw_c2h_category {
 	RTW89_C2H_CAT_TEST,
 	RTW89_C2H_CAT_MAC,
mac.c +45 -0

51 lines not on this page · raw message

mac.h +1 -0
index efff7cb..b052878 100644
@@ -812,6 +812,7 @@ u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev);
 int rtw89_mac_set_err_status(struct rtw89_dev *rtwdev, u32 err);
 void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
 			  u32 len, u8 class, u8 func);
+int rtw89_mac_setup_phycap(struct rtw89_dev *rtwdev);
 int rtw89_mac_stop_sch_tx(struct rtw89_dev *rtwdev, u8 mac_idx,
 			  u16 *tx_en, enum rtw89_sch_tx_sel sel);
 int rtw89_mac_resume_sch_tx(struct rtw89_dev *rtwdev, u8 mac_idx, u16 tx_en);
pci.c +1 -0
index 155f463..b5aaf0f 100644
@@ -3012,6 +3012,7 @@ static void rtw89_pci_remove(struct pci_dev *pdev)
 
 static const struct pci_device_id rtw89_pci_id_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8852), .driver_data = RTL8852A },
+	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xa85a), .driver_data = RTL8852A },
 	{},
 };
 MODULE_DEVICE_TABLE(pci, rtw89_pci_id_table);
phy.c +2 -2
index de2b000..ac75193 100644
@@ -245,7 +245,7 @@ static void rtw89_phy_ra_sta_update(struct rtw89_dev *rtwdev,
 	}
 
 	if (mode >= RTW89_RA_MODE_HT) {
-		for (i = 0; i < rtwdev->chip->tx_nss; i++)
+		for (i = 0; i < rtwdev->hal.tx_nss; i++)
 			high_rate_mask |= high_rate_masks[i];
 		ra_mask &= high_rate_mask;
 		if (mode & RTW89_RA_MODE_OFDM)
@@ -292,7 +292,7 @@ static void rtw89_phy_ra_sta_update(struct rtw89_dev *rtwdev,
 	ra->macid = rtwsta->mac_id;
 	ra->stbc_cap = stbc_en;
 	ra->ldpc_cap = ldpc_en;
-	ra->ss_num = min(sta->rx_nss, rtwdev->chip->tx_nss) - 1;
+	ra->ss_num = min(sta->rx_nss, rtwdev->hal.tx_nss) - 1;
 	ra->en_sgi = sgi;
 	ra->ra_mask = ra_mask;
 
Applied
#4 lore raw
Quoted 11 lines · Pkshih

Before trying new patch, please upgrade your firmware to v0.13.24.0 that you can download it via my github:

https://github.com/pkshih/linux-firmware/blob/a5b79c4790da3eb3690e23554225ef8db464f2c6/rtw89/rtw8852a_fw.bin

Then, check kernel log to confirm the version like dmesg you mentioned.

The path of the attachment patch isn't full path, so please apply it with specified path drivers/net/wireless/realtek/rtw89/

I have applied the patch and new firmware to https://github.com/lwfinger/rtw89.git.

Larry

#5 lore raw
In reply to Pkshih
Quoted 56 lines · Pkshih
Quoted 37 lines · Doug Brewer
Quoted 36 lines · Pkshih
Quoted 9 lines

-----Original Message-----
From: Doug Brewer [mailto:[email protected]]
Sent: Sunday, July 04, 2021 10:35 PM
To: [email protected]
Subject: rtw89: product id 0xa85a support on Linux?

Hello,

The HP Laptop 15s-eq2028ur have a Realtek 802.11ax device. lspci

-n shows

Quoted 2 lines

01:00.0 Network controller [0280]: Realtek Semiconductor Co.,

Ltd. Device [10ec:

Quoted 3 lines

a85a]

I tried pkshih's rtw89 patchsets [1] and added PID to

rtw89_pci_id_table.

Quoted 4 lines

Scanning works but cannot connect to access points. dmesg shows like (hiding MAC address):

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0,

type 1

Quoted 1 line

rtw89_pci 0000:01:00.0: Firmware version 0.13.8.0, cmd version 0,

type 3

Quoted 6 lines

rtw89_pci 0000:01:00.0: chip rfe_type is 1
wlan0: authenticate with xx:xx:xx:xx:xx:xx
wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: authenticated
wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0

aid=1)

Quoted 5 lines

wlan0: associated
rtw89_pci 0000:01:00.0: c2h reg timeout rtw89_pci 0000:01:00.0: FW does not process h2c registers rtw89_pci 0000:01:00.0: timed out to flush queues

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

rtw89 will be the driver to support this wifi model? Thanks.

The ID 0xa85a is a variant of 8852AE, and rtw89 will support it later.
I'll provide you a patch when I have a draft implementation.

Thanks! I'm happy to test your patch.

Before trying new patch, please upgrade your firmware to v0.13.24.0 that you can download it via my github:

https://github.com/pkshih/linux-firmware/blob/a5b79c4790da3eb3690e23554225ef8db464f2c6/rtw89/rtw8852a_fw.bin

Then, check kernel log to confirm the version like dmesg you mentioned.

Quoted 6 lines

The path of the attachment patch isn't full path, so please apply it with specified path drivers/net/wireless/realtek/rtw89/

--
Ping-Ke

I tested this out and I can confirm it works. Thanks Ping-Ke!