diff --git a/lib/functions/compilation/patch/drivers_network.sh b/lib/functions/compilation/patch/drivers_network.sh index 6f4244fcf..5b4765365 100644 --- a/lib/functions/compilation/patch/drivers_network.sh +++ b/lib/functions/compilation/patch/drivers_network.sh @@ -100,6 +100,7 @@ driver_rtl8189ES() { # fix compilation for kernels >= 5.4.251 process_patch_file "${SRC}/patch/misc/wireless-rtl8189es-Fix-building-on-5.4.251-kernel.patch" "applying" + process_patch_file "${SRC}/patch/misc/wireless-rtl8189es-fix-compilation-with-6.7-kernel.patch" "applying" fi } @@ -147,6 +148,7 @@ driver_rtl8189FS() { # fix compilation for kernels >= 5.4.251 process_patch_file "${SRC}/patch/misc/wireless-rtl8189fs-Fix-building-on-5.4.251-kernel.patch" "applying" + process_patch_file "${SRC}/patch/misc/wireless-rtl8189fs-fix-compilation-with-6.7-kernel.patch" "applying" fi } @@ -190,6 +192,7 @@ driver_rtl8192EU() { # fix compilation for kernels >= 5.4.251 process_patch_file "${SRC}/patch/misc/wireless-rtl8192eu-Fix-building-on-5.4.251-kernel.patch" "applying" + process_patch_file "${SRC}/patch/misc/wireless-rtl8192eu-fix-compilation-with-6.7-kernel.patch" "applying" fi } @@ -238,7 +241,7 @@ driver_rtl8811_rtl8812_rtl8814_rtl8821() { # fix compilation for kernels >= 6.3 process_patch_file "${SRC}/patch/misc/wireless-rtl8812au-6.3.patch" "applying" - + process_patch_file "${SRC}/patch/misc/wireless-rtl8812au-fix-compilation-with-6.7-kernel.patch" "applying" fi } @@ -273,6 +276,7 @@ driver_xradio_xr819() { sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/xradio\/Kconfig"' \ "$kerneldir/drivers/net/wireless/Kconfig" + process_patch_file "${SRC}/patch/misc/wireless-xradio-Fix-compilation-with-6.7-kernel.patch" "applying" fi } @@ -676,6 +680,8 @@ driver_uwe5622() { process_patch_file "${SRC}/patch/misc/wireless-uwe5622/uwe5622-adjust-for-rockchip-post-6.1.patch" fi fi + + process_patch_file "${SRC}/patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch" "applying" fi } diff --git a/patch/misc/wireless-rtl8189es-fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-rtl8189es-fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..e6fa7b47c --- /dev/null +++ b/patch/misc/wireless-rtl8189es-fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,55 @@ +From fb8beafbe34eb04fce91bac39831e971956f8424 Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 06:55:50 +0000 +Subject: [PATCH 4/4] wireless: rtl8189es: fix compilation with 6.7 kernel + +--- + .../rtl8189es/os_dep/linux/ioctl_cfg80211.c | 25 +++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c +index 4fa1e4030ad8..3219ff43371e 100644 +--- a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c ++++ b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c +@@ -5157,6 +5157,29 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, ++ struct cfg80211_ap_update *info) ++{ ++ int ret = 0; ++ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); ++ ++ RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); ++ ++ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len); ++ ++ // In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set ++ if (ret == 0) { ++ if (info->beacon.proberesp_ies && info->beacon.proberesp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.proberesp_ies, info->beacon.proberesp_ies_len, 0x2 /*PROBE_RESP*/); ++ ++ if (info->beacon.assocresp_ies && info->beacon.assocresp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.assocresp_ies, info->beacon.assocresp_ies_len, 0x4 /*ASSOC_RESP*/); ++ } ++ ++ return ret; ++} ++#else + static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_beacon_data *info) + { +@@ -5178,6 +5201,8 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd + + return ret; + } ++#endif ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) + static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) + #else +-- +2.34.1 + diff --git a/patch/misc/wireless-rtl8189fs-fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-rtl8189fs-fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..bc0b4af39 --- /dev/null +++ b/patch/misc/wireless-rtl8189fs-fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,55 @@ +From 2f2daa387fbaaef5290895ebe3e064aef40b667a Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 06:56:11 +0000 +Subject: [PATCH 3/4] wireless: rtl8189fs: fix compilation with 6.7 kernel + +--- + .../rtl8189fs/os_dep/linux/ioctl_cfg80211.c | 25 +++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/net/wireless/rtl8189fs/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8189fs/os_dep/linux/ioctl_cfg80211.c +index 42bc69b2cafa..8ea27f1e5fb6 100644 +--- a/drivers/net/wireless/rtl8189fs/os_dep/linux/ioctl_cfg80211.c ++++ b/drivers/net/wireless/rtl8189fs/os_dep/linux/ioctl_cfg80211.c +@@ -4988,6 +4988,29 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, ++ struct cfg80211_ap_update *info) ++{ ++ int ret = 0; ++ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); ++ ++ RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); ++ ++ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len); ++ ++ // In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set ++ if (ret == 0) { ++ if (info->beacon.proberesp_ies && info->beacon.proberesp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.proberesp_ies, info->beacon.proberesp_ies_len, 0x2 /*PROBE_RESP*/); ++ ++ if (info->beacon.assocresp_ies && info->beacon.assocresp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.assocresp_ies, info->beacon.assocresp_ies_len, 0x4 /*ASSOC_RESP*/); ++ } ++ ++ return ret; ++} ++#else + static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_beacon_data *info) + { +@@ -5009,6 +5032,8 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd + + return ret; + } ++#endif ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) + static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) + #else +-- +2.34.1 + diff --git a/patch/misc/wireless-rtl8192eu-fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-rtl8192eu-fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..fdd652e70 --- /dev/null +++ b/patch/misc/wireless-rtl8192eu-fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,54 @@ +From da0e6648412f099e695e644c7b6e9df90bdf356a Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 06:56:38 +0000 +Subject: [PATCH 2/4] wireless: rtl8192eu: fix compilation with 6.7 kernel + +--- + .../rtl8192eu/os_dep/linux/ioctl_cfg80211.c | 24 +++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c +index c3e496aaf9c9..8ca3a79a9718 100644 +--- a/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c ++++ b/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c +@@ -5098,6 +5098,29 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, ++ struct cfg80211_ap_update *info) ++{ ++ int ret = 0; ++ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); ++ ++ RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); ++ ++ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len); ++ ++ // In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set ++ if (ret == 0) { ++ if (info->beacon.proberesp_ies && info->beacon.proberesp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.proberesp_ies, info->beacon.proberesp_ies_len, 0x2 /*PROBE_RESP*/); ++ ++ if (info->beacon.assocresp_ies && info->beacon.assocresp_ies_len > 0) ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *) info->beacon.assocresp_ies, info->beacon.assocresp_ies_len, 0x4 /*ASSOC_RESP*/); ++ } ++ ++ return ret; ++} ++#else + static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_beacon_data *info) + { +@@ -5119,6 +5142,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd + + return ret; + } ++#endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) + static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) +-- +2.34.1 + diff --git a/patch/misc/wireless-rtl8812au-fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-rtl8812au-fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..483a6d3f4 --- /dev/null +++ b/patch/misc/wireless-rtl8812au-fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,57 @@ +From 73b8cf01586ba2aca319402390d260a7e2ef712d Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 06:57:09 +0000 +Subject: [PATCH 1/4] wireless: rtl8812au: fix compilation with 6.7 kernel + +--- + .../rtl8812au/os_dep/linux/ioctl_cfg80211.c | 27 +++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c +index 3475cfb0b4f5..4eaeff171e48 100644 +--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c ++++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c +@@ -5227,6 +5227,32 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, ++ struct cfg80211_ap_update *info) ++{ ++ int ret = 0; ++ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); ++ ++ RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); ++ ++ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len); ++ ++ // In cases like WPS, the proberesp and assocresp IEs vary from the beacon, and need to be explicitly set ++ if(ret == 0) { ++ if(info->beacon.proberesp_ies && info->beacon.proberesp_ies_len > 0) { ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)info->beacon.proberesp_ies, ++ info->beacon.proberesp_ies_len, 0x2/*PROBE_RESP*/); ++ } ++ if(info->beacon.assocresp_ies && info->beacon.assocresp_ies_len > 0) { ++ rtw_cfg80211_set_mgnt_wpsp2pie(ndev, (char *)info->beacon.assocresp_ies, ++ info->beacon.assocresp_ies_len, 0x4/*ASSOC_RESP*/); ++ } ++ } ++ ++ return ret; ++} ++#else + static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_beacon_data *info) + { +@@ -5251,6 +5277,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd + + return ret; + } ++#endif + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) + static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) +-- +2.34.1 + diff --git a/patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..7f7020ac2 --- /dev/null +++ b/patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,33 @@ +From 4cf270a8ac06021e0f6cf30790d089584cb24b67 Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 10:05:30 +0000 +Subject: [PATCH] wireless: uwe5622: Fix compilation with 6.7 kernel + +--- + drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c +index b2f9a877edce..34b2e5e4274d 100644 +--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c ++++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c +@@ -964,9 +964,16 @@ static int sprdwl_cfg80211_start_ap(struct wiphy *wiphy, + + static int sprdwl_cfg80211_change_beacon(struct wiphy *wiphy, + struct net_device *ndev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++ struct cfg80211_ap_update *info) ++#else + struct cfg80211_beacon_data *beacon) ++#endif + { + struct sprdwl_vif *vif = netdev_priv(ndev); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++ struct cfg80211_beacon_data *beacon = &(info->beacon); ++#endif + + wl_ndev_log(L_DBG, ndev, "%s\n", __func__); + #ifdef DFS_MASTER +-- +2.34.1 + diff --git a/patch/misc/wireless-xradio-Fix-compilation-with-6.7-kernel.patch b/patch/misc/wireless-xradio-Fix-compilation-with-6.7-kernel.patch new file mode 100644 index 000000000..9e48358a8 --- /dev/null +++ b/patch/misc/wireless-xradio-Fix-compilation-with-6.7-kernel.patch @@ -0,0 +1,25 @@ +From 4c2433e077e67560d8af5bd4495e925fd8e8458c Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Sat, 23 Dec 2023 00:38:42 +0530 +Subject: [PATCH] Fix compilation failure on 6.7 kernel + +--- + drivers/net/wireless/xradio/tx.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/wireless/xradio/tx.c b/drivers/net/wireless/xradio/tx.c +index 481de2d..fd31541 100644 +--- a/drivers/net/wireless/xradio/tx.c ++++ b/drivers/net/wireless/xradio/tx.c +@@ -1268,7 +1268,11 @@ void xradio_skb_dtor(struct xradio_common *hw_priv, + txpriv->raw_link_id, txpriv->tid); + tx_policy_put(hw_priv, txpriv->rate_id); + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++ ieee80211_tx_status_skb(hw_priv->hw, skb); ++#else + ieee80211_tx_status(hw_priv->hw, skb); ++#endif + } + + #if defined(CONFIG_XRADIO_USE_EXTENSIONS)