adopted from upstream: cfg80211: unify cfg80211_roamed()

This commit is contained in:
kimocoder 2019-08-16 17:27:14 +02:00
parent 273361355d
commit 31354957a2

View File

@ -1137,6 +1137,9 @@ check_bss:
struct ieee80211_channel *notify_channel;
u32 freq;
u16 channel = cur_network->network.Configuration.DSConfig;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
struct cfg80211_roam_info roam_info;
#endif
freq = rtw_ch2freq(channel);
notify_channel = ieee80211_get_channel(wiphy, freq);
@ -1153,9 +1156,9 @@ check_bss:
cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
#else
cfg80211_roamed(padapter->pnetdev
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
, notify_channel
#endif
#endif
, cur_network->network.MacAddress
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
@ -1166,10 +1169,10 @@ check_bss:
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
#ifdef CONFIG_RTW_80211R
#ifdef CONFIG_RTW_80211R
if (rtw_ft_roam(padapter))
rtw_ft_set_status(padapter, RTW_FT_ASSOCIATED_STA);
#endif
#endif
} else {
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
@ -1182,7 +1185,7 @@ check_bss:
, 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);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
#endif
}