mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
c123e4f053
9b2b203 fix usb_recv_tasklet -Wcast-function-type
a027da5 fix kernel 6.1 80211 link_id
7a9c802 fix build for kernel 6.1 prandom
3a3eb24 fix build for kernel 5.17 PDE_DATA
fe2afbd fix build for kernel 5.17 const netdev->dev_addr
7275bae fix build for 5.17 kernel complete_and_exit
c9c2aa7 Update usb_intf.c
revert the upstream 6.1 link_id (depend on kernel version) changes and
force 6.1 link_id
The downstream patch casting const off the direct dev_addr writes
triggers the runtime check from
Linux d07b26f5bbea ("dev_addr: add a modification check")
Fixes: #13261
Fixes: a07566ead8
("rtl8812au-ct: fix even more compilation error with kernel 6.1")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
87 lines
4.1 KiB
Diff
87 lines
4.1 KiB
Diff
From 30fc9d96fa2ce16209306237e677d3d3cbb12685 Mon Sep 17 00:00:00 2001
|
|
From: John Thomson <git@johnthomson.fastmail.com.au>
|
|
Date: Sun, 28 May 2023 13:26:46 +1000
|
|
Subject: [PATCH] Revert "fix kernel 6.1 80211 link_id"
|
|
|
|
This reverts commit a027da58e8d8e95827f97222ca321cd0b2d377dd.
|
|
---
|
|
os_dep/linux/ioctl_cfg80211.c | 29 +++++------------------------
|
|
1 file changed, 5 insertions(+), 24 deletions(-)
|
|
|
|
--- a/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -797,14 +797,9 @@ check_bss:
|
|
#endif
|
|
|
|
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
|
- roam_info.links[0].channel = notify_channel;
|
|
- roam_info.links[0].bssid = cur_network->network.MacAddress;
|
|
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
roam_info.channel = notify_channel;
|
|
roam_info.bssid = cur_network->network.MacAddress;
|
|
-#endif
|
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
|
|
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
|
|
roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
|
|
@@ -1393,9 +1388,7 @@ exit:
|
|
}
|
|
|
|
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
|
- int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
|
|
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
|
+#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))
|
|
u8 key_index, const u8 *mac_addr,
|
|
@@ -1535,9 +1528,7 @@ addkey_end:
|
|
}
|
|
|
|
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
|
- int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
|
|
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
|
+#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))
|
|
u8 key_index, const u8 *mac_addr,
|
|
@@ -1570,9 +1561,7 @@ 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, 1, 0))
|
|
- int link_id, u8 key_index, bool pairwise, const u8 *mac_addr)
|
|
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
|
+#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))
|
|
u8 key_index, const u8 *mac_addr)
|
|
@@ -1592,11 +1581,7 @@ static int cfg80211_rtw_del_key(struct w
|
|
}
|
|
|
|
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
|
- struct net_device *ndev,
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
|
- int link_id,
|
|
-#endif
|
|
- u8 key_index
|
|
+ struct net_device *ndev, u8 key_index
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
|
|
, bool unicast, bool multicast
|
|
#endif
|
|
@@ -4033,11 +4018,7 @@ static int cfg80211_rtw_change_beacon(st
|
|
return ret;
|
|
}
|
|
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
|
-static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
|
|
-#else
|
|
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
|
-#endif
|
|
{
|
|
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
|
return 0;
|