rtl8812au-ct: bump to fix kernel 6.1 compile
[openwrt/staging/neocturne.git] / package / kernel / rtl8812au-ct / patches / 099-cut-linkid-linux-version-code-conditionals.patch
1 From 30fc9d96fa2ce16209306237e677d3d3cbb12685 Mon Sep 17 00:00:00 2001
2 From: John Thomson <git@johnthomson.fastmail.com.au>
3 Date: Sun, 28 May 2023 13:26:46 +1000
4 Subject: [PATCH] Revert "fix kernel 6.1 80211 link_id"
5
6 This reverts commit a027da58e8d8e95827f97222ca321cd0b2d377dd.
7 ---
8 os_dep/linux/ioctl_cfg80211.c | 29 +++++------------------------
9 1 file changed, 5 insertions(+), 24 deletions(-)
10
11 --- a/os_dep/linux/ioctl_cfg80211.c
12 +++ b/os_dep/linux/ioctl_cfg80211.c
13 @@ -797,14 +797,9 @@ check_bss:
14 #endif
15
16 DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
17 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
18 - roam_info.links[0].channel = notify_channel;
19 - roam_info.links[0].bssid = cur_network->network.MacAddress;
20 -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
22 roam_info.channel = notify_channel;
23 roam_info.bssid = cur_network->network.MacAddress;
24 -#endif
25 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
26 roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
27 roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
28 roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
29 @@ -1393,9 +1388,7 @@ exit:
30 }
31
32 static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
33 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
34 - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
35 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
36 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
37 u8 key_index, bool pairwise, const u8 *mac_addr,
38 #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
39 u8 key_index, const u8 *mac_addr,
40 @@ -1535,9 +1528,7 @@ addkey_end:
41 }
42
43 static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
44 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
45 - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
46 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
47 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
48 u8 key_index, bool pairwise, const u8 *mac_addr,
49 #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
50 u8 key_index, const u8 *mac_addr,
51 @@ -1570,9 +1561,7 @@ static int cfg80211_rtw_get_key(struct w
52 }
53
54 static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
55 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
56 - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr)
57 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
58 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
59 u8 key_index, bool pairwise, const u8 *mac_addr)
60 #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
61 u8 key_index, const u8 *mac_addr)
62 @@ -1592,11 +1581,7 @@ static int cfg80211_rtw_del_key(struct w
63 }
64
65 static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
66 - struct net_device *ndev,
67 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
68 - int link_id,
69 -#endif
70 - u8 key_index
71 + struct net_device *ndev, u8 key_index
72 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
73 , bool unicast, bool multicast
74 #endif
75 @@ -4033,11 +4018,7 @@ static int cfg80211_rtw_change_beacon(st
76 return ret;
77 }
78
79 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
80 -static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
81 -#else
82 static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
83 -#endif
84 {
85 DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
86 return 0;