From f1eca7fca9691f564094a0b05ab02acbb789d0aa Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 19 Aug 2022 15:43:14 +0200 Subject: [PATCH] patch Signed-off-by: Igor Pecovnik --- .../rtl8723ds/os_dep/linux/ioctl_cfg80211.c | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c index 86bb2a2f7fe5..54c3143067c1 100644 --- a/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c +++ b/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c @@ -342,7 +342,7 @@ static u64 rtw_get_systime_us(void) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) ktime_t ts; ts = ktime_get_boottime(); - return do_div(ts, 1000); + return do_div(ts, 1000); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) struct timespec ts; get_monotonic_boottime(&ts); @@ -745,7 +745,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; @@ -4189,7 +4193,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 { RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); return 0; @@ -5547,7 +5555,7 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, u8 no_cck, const if (check_fwstate(&padapter->mlmepriv, _FW_LINKED)) ext_listen_period = 500;/*500ms*/ -#ifdef CONFIG_P2P +#ifdef CONFIG_P2P else ext_listen_period = pwdinfo->ext_listen_period; @@ -7049,13 +7057,25 @@ void rtw_wdev_unregister(struct wireless_dev *wdev) rtw_cfg80211_indicate_scan_done(adapter, _TRUE); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) + #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 u8 locally_generated = 1; RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter)); cfg80211_disconnected(adapter->pnetdev, 0, NULL, 0, locally_generated, GFP_ATOMIC); } #elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 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)); cfg80211_disconnected(adapter->pnetdev, 0, NULL, 0, GFP_ATOMIC); } -- Created with Armbian build tools https://github.com/armbian/build