mac80211: fix rtw89 compile error (#13542)

This commit is contained in:
Miles Poupart 2025-06-06 16:52:10 +08:00 committed by GitHub
parent 3d1de3a405
commit 51d898d4d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,17 @@
--- a/drivers/net/wireless/realtek/rtw89/pci.c
+++ b/drivers/net/wireless/realtek/rtw89/pci.c
/drivers/net/wireless/realtek/rtw89/pci.c
@@ -3295,8 +3295,11 @@
{
unsigned long flags = 0;
int ret;
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0))
flags |= PCI_IRQ_LEGACY | PCI_IRQ_MSI;
+#else
+ flags |= PCI_IRQ_INTX | PCI_IRQ_MSI;
+#endif
ret = pci_alloc_irq_vectors(pdev, 1, 1, flags);
if (ret < 0) {
rtw89_err(rtwdev, "failed to alloc irq vectors, ret %d\n", ret);