Add an extra definition for cfg80211_connect_bss() usage

This commit is contained in:
seppzer0 2023-07-19 00:12:47 +02:00
parent a842611d74
commit eff5b5a0c4
2 changed files with 3 additions and 1 deletions

View File

@ -851,6 +851,8 @@ EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC -DCONFIG_RADIO_WORK
#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
# A special rule for cfg80211_connect_bss() to receive all 10 arguments in an Android build
EXTRA_CFLAGS += -DCONFIG_CFG80211_CONNECT_BSS_ANDROID
endif
ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)

View File

@ -1193,7 +1193,7 @@ 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)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) || defined(CONFIG_CFG80211_CONNECT_BSS_ANDROID))
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