From 327b01d3d78d74a1417b4ebdd2340a9fdbc932d1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 31 Dec 2013 00:07:23 +0200 Subject: [PATCH] nl80211: Add driver param for forcing monitor and connect APIs use_monitor=1 and force_connect_cmd=1 driver parameters can now be used to force older monitor interface design and the connect API (SME in driver) to increase hwsim testing coverage. Signed-hostap: Jouni Malinen --- src/drivers/driver_nl80211.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 30b04976a..5b82f60da 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -10139,6 +10139,18 @@ static int nl80211_set_param(void *priv, const char *param) } #endif /* CONFIG_P2P */ + if (os_strstr(param, "use_monitor=1")) { + struct i802_bss *bss = priv; + struct wpa_driver_nl80211_data *drv = bss->drv; + drv->use_monitor = 1; + } + + if (os_strstr(param, "force_connect_cmd=1")) { + struct i802_bss *bss = priv; + struct wpa_driver_nl80211_data *drv = bss->drv; + drv->capa.flags &= ~WPA_DRIVER_FLAGS_SME; + } + return 0; }