aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2009-09-29 16:14:34 -0700
committerDmitry Shmidt <dimitrysh@google.com>2009-09-29 16:14:34 -0700
commit4866d77cee4db6487f8df017059c74df93b2568a (patch)
tree62f91a00b8f777246b6ac6f0d425d92aef7830ce
parentd5170539a3a845498356692538ba0846cb1fc84e (diff)
downloadwpa_supplicant-4866d77cee4db6487f8df017059c74df93b2568a.tar.gz
Ensure to have interface UP before association.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--driver_wext.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/driver_wext.c b/driver_wext.c
index 1917ba5..ed5c639 100644
--- a/driver_wext.c
+++ b/driver_wext.c
@@ -1930,10 +1930,16 @@ wpa_driver_wext_associate(void *priv,
struct wpa_driver_wext_data *drv = priv;
int ret = 0;
int allow_unencrypted_eapol;
- int value;
+ int value, flags;
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
+ if (wpa_driver_wext_get_ifflags(drv, &flags) == 0) {
+ if (!(flags & IFF_UP)) {
+ wpa_driver_wext_set_ifflags(drv, flags | IFF_UP);
+ }
+ }
+
/*
* If the driver did not support SIOCSIWAUTH, fallback to
* SIOCSIWENCODE here.