From 0042e2a9d2ce5718c6eaffd0d4478107a1f30b84 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 14 Jul 2017 21:30:56 +0100 Subject: [PATCH] RTL8812AU: Add 4.12-rc1 kernel patch (fixes incomplete upstream patch) --- .../patches/RTL8812AU-03-kernel-4.12.0.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 packages/linux-drivers/RTL8812AU/patches/RTL8812AU-03-kernel-4.12.0.patch diff --git a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-03-kernel-4.12.0.patch b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-03-kernel-4.12.0.patch new file mode 100644 index 0000000000..e568e90c84 --- /dev/null +++ b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-03-kernel-4.12.0.patch @@ -0,0 +1,46 @@ +From e91f7f7053a68dbbf95818a5245deed7570f17be Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Fri, 14 Jul 2017 21:19:16 +0100 +Subject: [PATCH] Fix kernel v4.12 support + +--- + os_dep/linux/ioctl_cfg80211.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c +index 5c011ed..6933a78 100644 +--- a/os_dep/linux/ioctl_cfg80211.c ++++ b/os_dep/linux/ioctl_cfg80211.c +@@ -1747,10 +1747,17 @@ enum nl80211_iftype { + NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1 + }; + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++static int cfg80211_rtw_change_iface(struct wiphy *wiphy, ++ struct net_device *ndev, ++ enum nl80211_iftype type, ++ struct vif_params *params) ++#else + static int cfg80211_rtw_change_iface(struct wiphy *wiphy, + struct net_device *ndev, + enum nl80211_iftype type, u32 *flags, + struct vif_params *params) ++#endif + { + enum nl80211_iftype old_type; + NDIS_802_11_NETWORK_INFRASTRUCTURE networkType; +@@ -3719,7 +3726,11 @@ static int + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) + unsigned char name_assign_type, + #endif ++ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) ++ enum nl80211_iftype type, struct vif_params *params) ++ #else + enum nl80211_iftype type, u32 *flags, struct vif_params *params) ++ #endif + { + int ret = 0; + struct net_device *ndev = NULL; +-- +2.7.4 +