1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-12-29 01:08:47 +00:00

Merge pull request #1092 from paralin/fix-kernel-4.9

ioctl_cfg80211: fix build against kernels < 4.10.x
This commit is contained in:
Christian Bremvåg 2023-07-08 16:31:34 +02:00 committed by GitHub
commit a842611d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1193,12 +1193,22 @@ check_bss:
struct cfg80211_bss *bss;
bss = cfg80211_get_bss(pwdev->wiphy, NULL, cur_network->network.MacAddress, NULL, 0,
IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
cfg80211_connect_bss(wdev_to_ndev(pwdev), cur_network->network.MacAddress, bss
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
, WLAN_STATUS_SUCCESS, GFP_ATOMIC, NL80211_TIMEOUT_UNSPECIFIED);
#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
// Linux < 4.10.x does not accept the last argument (timeout).
cfg80211_connect_bss(wdev_to_ndev(pwdev), cur_network->network.MacAddress, bss
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
, WLAN_STATUS_SUCCESS, GFP_ATOMIC);
#endif
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);