1#
2# Copyright (C) 2024 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# ###############################################################
18# This file adds wpa_supplicant_8 variables into soong config namespace (`wpa_supplicant_8`)
19# ###############################################################
20
21ifdef BOARD_HOSTAPD_DRIVER
22$(call soong_config_set_bool,wpa_supplicant_8,wpa_build_hostapd,true)
23ifneq ($(BOARD_HOSTAPD_DRIVER),NL80211)
24    $(error BOARD_HOSTAPD_DRIVER set to $(BOARD_HOSTAPD_DRIVER) but current soong expected it should be NL80211 only!)
25endif
26endif
27
28ifdef BOARD_WPA_SUPPLICANT_DRIVER
29ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),NL80211)
30    $(error BOARD_WPA_SUPPLICANT_DRIVER set to $(BOARD_WPA_SUPPLICANT_DRIVER) but current soong expected it should be NL80211 only!)
31endif
32endif
33
34# This is for CONFIG_DRIVER_NL80211_BRCM, CONFIG_DRIVER_NL80211_SYNA, CONFIG_DRIVER_NL80211_QCA
35# And it is only used for a cflags setting in driver.
36$(call soong_config_set,wpa_supplicant_8,board_wlan_device,$(BOARD_WLAN_DEVICE))
37
38# Belong to CONFIG_IEEE80211AX definition
39ifeq ($(WIFI_FEATURE_HOSTAPD_11AX),true)
40$(call soong_config_set_bool,wpa_supplicant_8,hostapd_11ax,true)
41endif
42
43# Belong to CONFIG_IEEE80211BE definition
44ifeq ($(WIFI_FEATURE_HOSTAPD_11BE),true)
45$(call soong_config_set_bool,wpa_supplicant_8,hostapd_11be,true)
46endif
47
48# PLATFORM_VERSION
49$(call soong_config_set,wpa_supplicant_8,platform_version,$(PLATFORM_VERSION))
50
51# BOARD_HOSTAPD_PRIVATE_LIB
52ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
53$(call soong_config_set_bool,wpa_supplicant_8,hostapd_use_stub_lib,true)
54else
55$(call soong_config_set,wpa_supplicant_8,board_hostapd_private_lib,$(BOARD_HOSTAPD_PRIVATE_LIB))
56endif
57
58ifeq ($(BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL),true)
59$(call soong_config_set_bool,wpa_supplicant_8,board_hostapd_config_80211w_mfp_optional,true)
60endif
61
62ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB_EVENT),)
63$(call soong_config_set_bool,wpa_supplicant_8,board_hostapd_private_lib_event,true)
64endif
65
66# BOARD_WPA_SUPPLICANT_PRIVATE_LIB
67ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
68$(call soong_config_set_bool,wpa_supplicant_8,wpa_supplicant_use_stub_lib,true)
69else
70$(call soong_config_set,wpa_supplicant_8,board_wpa_supplicant_private_lib,$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB))
71endif
72
73ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT),)
74$(call soong_config_set_bool,wpa_supplicant_8,board_wpa_supplicant_private_lib_event,true)
75endif
76
77ifeq ($(WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS), enabled)
78$(call soong_config_set_bool,wpa_supplicant_8,wifi_priv_cmd_update_mbo_cell_status,true)
79endif
80
81ifeq ($(WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY), true)
82$(call soong_config_set_bool,wpa_supplicant_8,wifi_hidl_unified_supplicant_service_rc_entry,true)
83endif
84
85# New added in internal main
86ifeq ($(WIFI_BRCM_OPEN_SOURCE_MULTI_AKM), enabled)
87$(call soong_config_set_bool,wpa_supplicant_8,wifi_brcm_open_source_multi_akm,true)
88endif
89