fix rtl8723du compilation on kernel 6.3

This commit is contained in:
Paolo Sabatino 2023-04-26 21:51:57 +00:00 committed by Paolo
parent 3e28c86a05
commit be0ecb1f16
2 changed files with 45 additions and 0 deletions

View File

@ -508,6 +508,10 @@ driver_rtl8723DU() {
# fix compilation for kernels >= 5.4
process_patch_file "${SRC}/patch/misc/wireless-rtl8723du-Fix-VFS-import.patch" "applying"
# fix compilation for kernels >= 6.3
process_patch_file "${SRC}/patch/misc/wireless-rtl8723du-6.3.patch" "applying"
fi
}

View File

@ -0,0 +1,41 @@
diff --git a/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
index ae4aca0162ce..e57e3ca45d33 100644
--- a/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
+++ b/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
@@ -187,10 +187,13 @@ u8 rtw_cfg80211_ch_switch_notify(struct adapter *adapter, u8 ch, u8 bw, u8 offse
}
ctype = rtw_chbw_to_nl80211_channel_type(ch, bw, offset, ht);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
- cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype);
-#else
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
+ cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0, 0);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0);
+#else
+ cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype);
#endif
#endif
diff --git a/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
index e57e3ca45d33..01303d253971 100644
--- a/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
+++ b/drivers/net/wireless/rtl8723du/os_dep/ioctl_cfg80211.c
@@ -171,10 +171,12 @@ u8 rtw_cfg80211_ch_switch_notify(struct adapter *adapter, u8 ch, u8 bw, u8 offse
if (ret != _SUCCESS)
goto exit;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
- cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+#else
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
#endif
#else