-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtl8821ce-5.19.2.patch
40 lines (35 loc) · 1.43 KB
/
rtl8821ce-5.19.2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 244527b..556eb51 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -417,7 +417,11 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
if (ret != _SUCCESS)
goto exit;
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
+#else
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+#endif
#else
int freq = rtw_ch2freq(ch);
@@ -4947,7 +4951,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)
+#else
+static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
+#endif
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@@ -9859,7 +9867,11 @@ 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(5, 19, 2)
if (wdev->current_bss) {
+ #else
+ if (wdev->connected) {
+ #endif
RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
}