armbian-build/patch/misc/wireless-rtl88x2bu-5.19.2.patch
2022-08-20 08:49:59 +02:00

61 lines
2.5 KiB
Diff

From ecfbe3f9cabf7df469b4531a1e71bc92db00f00b Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Sat, 20 Aug 2022 08:37:07 +0200
Subject: [PATCH] lol
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
---
.../wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.c | 11 +++++++----
.../wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.h | 5 +++++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.c
index 53195632d098..178f420582b8 100755
--- a/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_cfg80211.c
@@ -449,7 +449,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
@@ -952,7 +952,7 @@ static int _cfg80211_check_bss(struct _ADAPTER *a)
wdev = a->rtw_wdev;
network = &a->mlmeextpriv.mlmext_info.network;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)
if ((!wdev->u.ap.ssid_len) || (wdev->u.ap.ssid_len != network->Ssid.SsidLength)
|| (_rtw_memcmp(wdev->u.ap.ssid, network->Ssid.Ssid,
#else
@@ -5348,7 +5348,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
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)
@@ -10476,10 +10476,13 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
+ if (wdev->links[0].client.current_bss) {
+ #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
if (wdev->connected) {
#else
- if (wdev->current_bss) {
+ if (wdev->current_bss) {
#endif
+
RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
}
--
Created with Armbian build tools https://github.com/armbian/build