From 73739badd7369a8200541db1d146a1917cd1f4a9 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 14 Dec 2022 23:50:07 +0100 Subject: [PATCH] Fix rk322x edge kernel 6.1 compilation (#4572) * rk322x: fix renamed constant * rk322x: fix rtl8723cs wireless driver --- .../5000-drm-rockchip-hardware-cursor.patch | 2 +- .../rk322x-6.1/wifi-4002-add-realtek-8723cs.patch | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/patch/kernel/archive/rk322x-6.1/5000-drm-rockchip-hardware-cursor.patch b/patch/kernel/archive/rk322x-6.1/5000-drm-rockchip-hardware-cursor.patch index 2830c1ee42..4f6e27870f 100644 --- a/patch/kernel/archive/rk322x-6.1/5000-drm-rockchip-hardware-cursor.patch +++ b/patch/kernel/archive/rk322x-6.1/5000-drm-rockchip-hardware-cursor.patch @@ -191,7 +191,7 @@ index 83a926c0a..b0832320e 100644 + return -EINVAL; + + ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state, -+ DRM_PLANE_HELPER_NO_SCALING, DRM_PLANE_HELPER_NO_SCALING, ++ DRM_PLANE_NO_SCALING, DRM_PLANE_NO_SCALING, + true, true); + + if (ret) diff --git a/patch/kernel/archive/rk322x-6.1/wifi-4002-add-realtek-8723cs.patch b/patch/kernel/archive/rk322x-6.1/wifi-4002-add-realtek-8723cs.patch index 3dbf2f0aa0..2e2d6b8a66 100644 --- a/patch/kernel/archive/rk322x-6.1/wifi-4002-add-realtek-8723cs.patch +++ b/patch/kernel/archive/rk322x-6.1/wifi-4002-add-realtek-8723cs.patch @@ -391125,7 +391125,7 @@ index 00000000000..ca999734af9 + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) + if (started) { -+ cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); ++ cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); + goto exit; + } +#endif @@ -392557,7 +392557,7 @@ index 00000000000..ca999734af9 +} + +static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev -+ , u8 key_index ++ , int link_id, u8 key_index +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) + , bool pairwise +#endif @@ -392719,7 +392719,7 @@ index 00000000000..ca999734af9 +} + +static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev -+ , u8 keyid ++ , int link_id, u8 keyid +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) + , bool pairwise +#endif @@ -392906,7 +392906,7 @@ index 00000000000..ca999734af9 + return ret; +} + -+static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, ++static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, int link_id, +#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)) */ @@ -392927,7 +392927,7 @@ index 00000000000..ca999734af9 +} + +static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, -+ struct net_device *ndev, u8 key_index ++ struct net_device *ndev, int link_id, u8 key_index + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE) + , bool unicast, bool multicast + #endif @@ -392975,7 +392975,7 @@ index 00000000000..ca999734af9 + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) +int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, -+ struct net_device *ndev, u8 key_index) ++ struct net_device *ndev, int link_id, u8 key_index) +{ +#define SET_DEF_KEY_PARAM_FMT " key_index=%d" +#define SET_DEF_KEY_PARAM_ARG , key_index @@ -445125,7 +445125,7 @@ index 00000000000..dd3fb044993 +{ +#ifdef PLATFORM_LINUX +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) -+ return prandom_u32(); ++ return get_random_u32(); +#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)) + u32 random_int; + get_random_bytes(&random_int , 4);