wpa_supplicant: Fix port state management without IEEE8021X_EAPOL
authorFelix Fietkau <nbd@openwrt.org>
Tue, 9 Nov 2010 14:31:33 +0000 (16:31 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 9 Nov 2010 14:31:33 +0000 (16:31 +0200)
If IEE8021X_EAPOL is not enabled in the config, wpa_drv_set_supp_port
must be called from the supplicant, otherwise port will not be
activated after association.

wpa_supplicant/wpa_supplicant.c

index e4f72c1..ff1cfd3 100644 (file)
@@ -550,6 +550,9 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
                wpa_s->new_connection = 0;
                wpa_s->reassociated_connection = 1;
                wpa_drv_set_operstate(wpa_s, 1);
+#ifndef IEEE8021X_EAPOL
+               wpa_drv_set_supp_port(wpa_s, 1);
+#endif /* IEEE8021X_EAPOL */
                wpa_s->after_wps = 0;
 #ifdef CONFIG_P2P
                wpas_p2p_completed(wpa_s);
@@ -558,6 +561,9 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
                   state == WPA_ASSOCIATED) {
                wpa_s->new_connection = 1;
                wpa_drv_set_operstate(wpa_s, 0);
+#ifndef IEEE8021X_EAPOL
+               wpa_drv_set_supp_port(wpa_s, 0);
+#endif /* IEEE8021X_EAPOL */
        }
        wpa_s->wpa_state = state;