diff -Nru rtl8812au-4.3.8.12175.20140902+dfsg/debian/changelog rtl8812au-4.3.8.12175.20140902+dfsg/debian/changelog --- rtl8812au-4.3.8.12175.20140902+dfsg/debian/changelog 2023-01-12 11:17:03.000000000 +0000 +++ rtl8812au-4.3.8.12175.20140902+dfsg/debian/changelog 2023-07-04 10:29:34.000000000 +0000 @@ -1,3 +1,9 @@ +rtl8812au (4.3.8.12175.20140902+dfsg-0ubuntu17~22.04.2) jammy; urgency=medium + + * Support Linux 6.2 (LP: #2023661). + + -- Andrea Righi Tue, 04 Jul 2023 10:29:34 +0000 + rtl8812au (4.3.8.12175.20140902+dfsg-0ubuntu17~22.04.1) jammy; urgency=medium * Kinetic import, no change (LP: #2002640). diff -Nru rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/6.2-kernel-compatibility.patch rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/6.2-kernel-compatibility.patch --- rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/6.2-kernel-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/6.2-kernel-compatibility.patch 2023-07-04 10:29:34.000000000 +0000 @@ -0,0 +1,198 @@ +Index: rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/linux/ioctl_cfg80211.c +=================================================================== +--- rtl8812au-4.3.8.12175.20140902+dfsg.orig/os_dep/linux/ioctl_cfg80211.c ++++ rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/linux/ioctl_cfg80211.c +@@ -808,9 +808,9 @@ check_bss: + DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter)); + + if (rtw_to_roam(padapter) > 0) { +- #if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 0) +- struct cfg80211_roam_info ri; +- #endif ++ #if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 0) ++ struct cfg80211_roam_info ri; ++ #endif + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE) + struct wiphy *wiphy = pwdev->wiphy; + struct ieee80211_channel *notify_channel; +@@ -825,15 +825,20 @@ check_bss: + notify_channel = ieee80211_get_channel(wiphy, freq); + #endif + +- #if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 0) +- ri.channel = notify_channel; +- ri.bssid = cur_network->network.MacAddress; +- ri.req_ie = pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2; +- ri.req_ie_len = pmlmepriv->assoc_req_len-sizeof(struct rtw_ieee80211_hdr_3addr)-2; +- ri.resp_ie = pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6; +- ri.resp_ie_len = pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6; +- cfg80211_roamed(padapter->pnetdev, &ri, GFP_ATOMIC); +- #else ++ #if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 0) ++ #if LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0) ++ ri.links[0].channel = notify_channel; ++ ri.links[0].bssid = cur_network->network.MacAddress; ++ #else ++ ri.channel = notify_channel; ++ ri.bssid = cur_network->network.MacAddress; ++ #endif ++ ri.req_ie = pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2; ++ ri.req_ie_len = pmlmepriv->assoc_req_len-sizeof(struct rtw_ieee80211_hdr_3addr)-2; ++ ri.resp_ie = pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6; ++ ri.resp_ie_len = pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6; ++ cfg80211_roamed(padapter->pnetdev, &ri, GFP_ATOMIC); ++ #else + DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter)); + cfg80211_roamed(padapter->pnetdev + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE) +@@ -845,7 +850,7 @@ check_bss: + , pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6 + , pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6 + , GFP_ATOMIC); +- #endif ++ #endif + } + else + { +@@ -1500,6 +1505,9 @@ exit: + } + + static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)) ++ int link_id, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + u8 key_index, bool pairwise, const u8 *mac_addr, + #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +@@ -1637,6 +1645,9 @@ addkey_end: + } + + static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)) ++ int link_id, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + u8 key_index, bool pairwise, const u8 *mac_addr, + #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +@@ -1670,6 +1681,9 @@ static int cfg80211_rtw_get_key(struct w + } + + static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)) ++ int link_id, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + u8 key_index, bool pairwise, const u8 *mac_addr) + #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +@@ -1691,7 +1705,11 @@ static int cfg80211_rtw_del_key(struct w + } + + static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, +- struct net_device *ndev, u8 key_index ++ struct net_device *ndev, ++ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)) ++ int link_id, ++ #endif ++ u8 key_index + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE) + , bool unicast, bool multicast + #endif +@@ -1846,10 +1864,10 @@ enum nl80211_iftype { + */ + static int cfg80211_rtw_change_iface(struct wiphy *wiphy, + struct net_device *ndev, +- enum nl80211_iftype type, +- #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) +- u32 *flags, +- #endif ++ enum nl80211_iftype type, ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) ++ u32 *flags, ++ #endif + struct vif_params *params) + { + enum nl80211_iftype old_type; +@@ -3873,12 +3891,12 @@ static int rtw_cfg80211_add_monitor_if(_ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) + mon_ndev->name_assign_type = name_assign_type; + #endif +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,9)) +- mon_ndev->needs_free_netdev = true; +- mon_ndev->priv_destructor = rtw_ndev_destructor; +-#else ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,9)) ++ mon_ndev->needs_free_netdev = true; ++ mon_ndev->priv_destructor = rtw_ndev_destructor; ++#else + mon_ndev->destructor = rtw_ndev_destructor; +-#endif ++#endif + + #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) + mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops; +@@ -3945,10 +3963,10 @@ static int + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) + unsigned char name_assign_type, + #endif +- enum nl80211_iftype type, +- #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)) +- u32 *flags, +- #endif ++ enum nl80211_iftype type, ++ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)) ++ u32 *flags, ++ #endif + struct vif_params *params) + { + int ret = 0; +@@ -4365,7 +4383,7 @@ static int cfg80211_rtw_change_station(s + + struct sta_info *rtw_sta_info_get_by_idx(const int idx, struct sta_priv *pstapriv) + +-{ ++{ + _list *phead, *plist; + struct sta_info *psta = NULL; + int i = 0; +@@ -6140,11 +6158,11 @@ static void rtw_cfg80211_preinit_wiphy(_ + #endif + + #if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)) +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) +- wiphy->max_sched_scan_reqs = 1; +-#else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ wiphy->max_sched_scan_reqs = 1; ++#else + wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN; +-#endif ++#endif + #ifdef CONFIG_PNO_SUPPORT + wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT; + #endif +@@ -6228,8 +6246,8 @@ static struct cfg80211_ops rtw_cfg80211_ + .cancel_remain_on_channel = cfg80211_rtw_cancel_remain_on_channel, + #endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) +- .mgmt_tx = cfg80211_rtw_mgmt_tx, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) ++ .mgmt_tx = cfg80211_rtw_mgmt_tx, + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + .mgmt_tx = cfg80211_rtw_mgmt_tx, + .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, +Index: rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/osdep_service.c +=================================================================== +--- rtl8812au-4.3.8.12175.20140902+dfsg.orig/os_dep/osdep_service.c ++++ rtl8812au-4.3.8.12175.20140902+dfsg/os_dep/osdep_service.c +@@ -2306,7 +2306,9 @@ u64 rtw_division64(u64 x, u64 y) + inline u32 rtw_random32(void) + { + #ifdef PLATFORM_LINUX +- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) ++ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0)) ++ return get_random_u32(); ++ #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) + return prandom_u32(); + #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)) + u32 random_int; diff -Nru rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/series rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/series --- rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/series 2022-09-22 13:22:06.000000000 +0000 +++ rtl8812au-4.3.8.12175.20140902+dfsg/debian/patches/series 2023-07-04 10:29:34.000000000 +0000 @@ -27,3 +27,4 @@ 0020-drop-ipx-and-apple-talk-support.patch 5.18-kernel-compatibility.patch 5.19-kernel-compatibility.patch +6.2-kernel-compatibility.patch