From 7424f50fa8630b082aff7cded158b78e7fb867cb Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 26 Nov 2015 17:26:28 +0000 Subject: [PATCH] [wpa] bring up interface in ap_mode=2 This is required for WPA-NONE operation. PR: bin/203086 Submitted by: avos@ --- contrib/wpa/src/drivers/driver_bsd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 9d3b5e6f5275..408d14156edc 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -1102,6 +1102,13 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) return -1; + /* + * NB: interface must be marked UP for association + * or scanning (ap_scan=2) + */ + if (bsd_ctrl_iface(drv, 1) < 0) + return -1; + os_memset(&mlme, 0, sizeof(mlme)); mlme.im_op = IEEE80211_MLME_ASSOC; if (params->ssid != NULL)