build/patch/misc/wireless-rtl8812au-5.19.2.patch

80 lines
3.2 KiB
Diff

From b4358f8b995eb5161eddd4d6becb48317a4fc9a1 Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Fri, 19 Aug 2022 15:10:02 +0200
Subject: [PATCH] update to 5.19.2
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
---
.../rtl8812au/os_dep/linux/ioctl_cfg80211.c | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
index ca7b7dccefaf..ea2ac44c7284 100644
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
@@ -472,7 +472,11 @@ 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(5,19, 2))
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
+#endif
#else
int freq = rtw_ch2freq(ch);
@@ -1145,7 +1149,11 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
+ roam_info.links[0].bssid = cur_network->network.MacAddress;
+#else
roam_info.bssid = cur_network->network.MacAddress;
+#endif
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;
@@ -5219,7 +5227,11 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret;
}
+#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)
+#endif
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@@ -6092,7 +6104,11 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy
return 0;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
+static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){
+#else
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){
+#endif
_adapter *padapter= wiphy_to_adapter(wiphy);
int channel;
int control_freq;
@@ -10395,7 +10411,13 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
#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) {
+ #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