Cumulative patch from commit c16a7590cfe76d5895ac70ef711e5b0b384f7aa6

c16a759 wpa_supplicant: Add a configuration file for the P2P_DEVICE parameters
185677b Disable interface if ACS fails
8f05577 Configure beacon interval for IBSS command
95faa36 HS 2.0R2: Check for OSEN when determining whether to authorize STA
113318a Set the station to authorized on assoc event for open authentication

Change-Id: Id8111b6475bf93a0600a431708cb16120d380e24
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/ap/acs.c b/src/ap/acs.c
index 60b7580..3e0155c 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -284,6 +284,7 @@
 {
 	wpa_printf(MSG_ERROR, "ACS: Failed to start");
 	acs_cleanup(iface);
+	hostapd_disable_iface(iface);
 }
 
 
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 6ba6f98..bfa3c49 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2026,7 +2026,8 @@
 	/* Start accounting here, if IEEE 802.1X and WPA are not used.
 	 * IEEE 802.1X/WPA code will start accounting after the station has
 	 * been authorized. */
-	if (!hapd->conf->ieee802_1x && !hapd->conf->wpa) {
+	if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) {
+		ap_sta_set_authorized(hapd, sta, 1);
 		os_get_reltime(&sta->connected_time);
 		accounting_sta_start(hapd, sta);
 	}
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 6b6c0ef..a92de56 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -448,6 +448,11 @@
 	int bg_scan_period;
 
 	/**
+	 * beacon_int - Beacon interval for IBSS or 0 to use driver default
+	 */
+	int beacon_int;
+
+	/**
 	 * wpa_ie - WPA information element for (Re)Association Request
 	 * WPA information element to be included in (Re)Association
 	 * Request (including information element id and length). Use
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 87c9661..9b9e66c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8377,6 +8377,12 @@
 	wpa_printf(MSG_DEBUG, "  * freq=%d", params->freq);
 	NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
 
+	if (params->beacon_int > 0) {
+		wpa_printf(MSG_DEBUG, "  * beacon_int=%d", params->beacon_int);
+		NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL,
+			    params->beacon_int);
+	}
+
 	ret = nl80211_set_conn_keys(params, msg);
 	if (ret)
 		goto nla_put_failure;