wpa_supplicant: Fix CONFIG_IBSS_RSN=y build without CONFIG_AP=y
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 21 Mar 2016 19:09:03 +0000 (21:09 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 21 Mar 2016 19:12:20 +0000 (21:12 +0200)
Commit 1889af2e0f89f9a98171761683eb1c244584daf8 ('VLAN: Separate station
grouping and uplink configuration') added an ap_sta_set_vlan() function
that gets called from pmksa_cache_auth.c. This broke CONFIG_IBSS_RSN=y
build if src/ap/sta_info.c did not get included in the build, i.e., if
CONFIG_AP=y was not set.

Fix this by making the ap_sta_set_vlan() call conditional on
CONFIG_NO_VLAN being undefined and define this for CONFIG_IBSS_RSN=y
builds. This is fine for wpa_supplicant since CONFIG_AP=y case was
already defining this. For hostapd, this function call is not needed for
CONFIG_NO_VLAN case either.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/pmksa_cache_auth.c
wpa_supplicant/Android.mk
wpa_supplicant/Makefile

index b419348..d610e7e 100644 (file)
@@ -181,8 +181,6 @@ void pmksa_cache_to_eapol_data(struct hostapd_data *hapd,
                               struct rsn_pmksa_cache_entry *entry,
                               struct eapol_state_machine *eapol)
 {
-       struct sta_info *sta;
-
        if (entry == NULL || eapol == NULL)
                return;
 
@@ -213,8 +211,9 @@ void pmksa_cache_to_eapol_data(struct hostapd_data *hapd,
        }
 
        eapol->eap_type_authsrv = entry->eap_type_authsrv;
-       sta = (struct sta_info *) eapol->sta;
-       ap_sta_set_vlan(hapd, sta, entry->vlan_desc);
+#ifndef CONFIG_NO_VLAN
+       ap_sta_set_vlan(hapd, eapol->sta, entry->vlan_desc);
+#endif /* CONFIG_NO_VLAN */
 
        eapol->acct_multi_session_id = entry->acct_multi_session_id;
 }
index 4f0319e..cd64e4a 100644 (file)
@@ -269,6 +269,7 @@ endif
 ifdef CONFIG_IBSS_RSN
 NEED_RSN_AUTHENTICATOR=y
 L_CFLAGS += -DCONFIG_IBSS_RSN
+L_CFLAGS += -DCONFIG_NO_VLAN
 OBJS += ibss_rsn.c
 endif
 
index 93083f7..5f5a30a 100644 (file)
@@ -312,6 +312,7 @@ endif
 ifdef CONFIG_IBSS_RSN
 NEED_RSN_AUTHENTICATOR=y
 CFLAGS += -DCONFIG_IBSS_RSN
+CFLAGS += -DCONFIG_NO_VLAN
 OBJS += ibss_rsn.o
 endif