Nithin Chakravarthi | 30 Oct 07:17 2014
Picon

Nl82011 driver intialization failed

Hi,

I am using hostapd 2-2 version in my all winner A20 cubieboard running on ubuntu 12.04. I have compile the source  code. i t has compiled with out error. but when i run this is the log

{" 
                     1414649556.126296: nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
1414649556.126813: rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
1414649556.126917: rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
1414649556.126997: rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
1414649556.128435: nl80211: Supported cipher 00-0f-ac:1
1414649556.128623: nl80211: Supported cipher 00-0f-ac:5
1414649556.128693: nl80211: Supported cipher 00-0f-ac:2
1414649556.128761: nl80211: Supported cipher 00-0f-ac:4
1414649556.129151: nl80211: Supported cipher 00-0f-ac:6
1414649556.129224: nl80211: Using driver-based off-channel TX
1414649556.129364: nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
1414649556.129483: nl80211: interface wlan1 in phy phy0
1414649556.129840: nl80211: Set mode ifindex 5 iftype 3 (AP)
1414649556.130097: nl80211: Setup AP(wlan1) - device_ap_sme=1 use_monitor=0
1414649556.130295: nl80211: Subscribe to mgmt frames with AP handle 0xf16410 (device SME)
1414649556.130384: nl80211: Register frame type=0xd0 nl_handle=0xf16410 match=
1414649556.130613: nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
1414649556.130700: nl80211: Register frame match - hexdump(len=0): [NULL]
1414649556.130890: nl80211: Could not configure driver mode
1414649556.130963: nl80211: Remove monitor interface: refcount=0
1414649556.131036: nl80211: Remove beacon (ifindex=5)
1414649556.131266: netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
1414649556.131475: nl80211: Set mode ifindex 5 iftype 2 (STATION)
1414649556.131699: nl80211: Teardown AP(wlan1) - device_ap_sme=1 use_monitor=0
1414649556.131794: nl80211 driver initialization failed.
1414649556.131894: hostapd_interface_deinit_free(0xf15298)
1414649556.132007: hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
1414649556.132076: hostapd_interface_deinit(0xf15298)
1414649556.132137: hostapd_bss_deinit: deinit bss wlan1
1414649556.132249: hostapd_cleanup(hapd=0xf15de8 (wlan1))
1414649556.132332: hostapd_free_hapd_data: Interface wlan1 wasn't started
1414649556.132395: hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
1414649556.132465: hostapd_interface_free(0xf15298)
1414649556.132523: hostapd_interface_free: free hapd 0xf15de8
1414649556.132587: hostapd_cleanup_iface(0xf15298)
1414649556.132646: hostapd_cleanup_iface_partial(0xf15298)
1414649556.132753: hostapd_cleanup_iface: free iface=0xf15298
"}
This is config file
"# WiFi Hotspot
interface=wlan1
driver=nl80211
#Access Point
ssid=myhotspot
hw_mode=g
# WiFi Channel:
channel=1
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
#macaddr_acl=0
#auth_algs=1
#ignore_broadcast_ssid=0
#wpa=3
#wpa_passphrase=qwerty0987
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP"

so please any one help me to make board as wifi hotspot



--




With Regards,
M.Nithin Chakravrthi
_______________________________________________
HostAP mailing list
HostAP <at> lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap
Lubomir Rintel | 29 Oct 17:57 2014
Picon
Picon

[PATCH] wpa_supplicant: Denitialize the driver if the last user went away

It might be that the underlying infrastrucutre went away and the state is no
longer valid. We ought to reinitialize it once a device appears again.

This is the case when the nl80211 devices disappear and cfg8011 is remoed
afterwards. The netlink handle is no longer valid (returns ENOENT) and a new
one needs to be open if it's loaded back.

Signed-off-by: Lubomir Rintel <lkundrak <at> v3.sk>
---
 wpa_supplicant/wpa_supplicant.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 5a4d8dc..072dce5 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
 <at>  <at>  -3925,6 +3925,24  <at>  <at>  static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
 	return 0;
 }

+/* Deinitialize the driver if we're the last user. */
+static void wpa_drv_cleanup(struct wpa_supplicant *wpa_s)
+{
+	struct wpa_global *global = wpa_s->global;
+	struct wpa_supplicant *iface;
+	int i;
+
+	for (iface = global->ifaces; iface; iface = iface->next)
+		if (iface != wpa_s && iface->driver == wpa_s->driver)
+			return;
+
+	for (i = 0; wpa_drivers[i]; i++)
+		if (global->drv_priv[i] == wpa_s->global_drv_priv)
+			wpa_s->global_drv_priv = global->drv_priv[i] = NULL;
+
+	if (wpa_s->driver->global_deinit)
+		wpa_s->driver->global_deinit (wpa_s->global_drv_priv);
+}

 static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
 					int notify, int terminate)
 <at>  <at>  -3967,6 +3985,8  <at>  <at>  static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
 	if (wpa_s->drv_priv)
 		wpa_drv_deinit(wpa_s);

+	wpa_drv_cleanup(wpa_s);
+
 	if (notify)
 		wpas_notify_iface_removed(wpa_s);

--

-- 
1.8.2.1
Martin Kletzander | 29 Oct 11:12 2014
Picon

[PATCH] wpa_gui: Use dialog window type

This helps window managers treat the window properly.  Mostly tiling WMs
are affected by this.  All other windows inherit this option from
QDialog already.

Signed-off-by: Martin Kletzander <mkletzan <at> redhat.com>
---
 wpa_supplicant/wpa_gui-qt4/wpagui.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index 6bba8d2..91874d4 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
 <at>  <at>  -36,6 +36,7  <at>  <at>  WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *, Qt::WFlags)
 	: QMainWindow(parent), app(_app)
 {
 	setupUi(this);
+	this->setWindowFlags(Qt::Dialog);

 #ifdef CONFIG_NATIVE_WINDOWS
 	fileStopServiceAction = new QAction(this);
--

-- 
2.1.2
Slava Monich | 28 Oct 17:20 2014

[PATCH] dbus: Fix memory leak in wpas_dbus_getter_bss_wps

Signed-off-by: Slava Monich <slava.monich <at> jolla.com>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 9f6c4a3..aaaf4f0 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
 <at>  <at>  -3993,6 +3993,8  <at>  <at>  dbus_bool_t wpas_dbus_getter_bss_wps(DBusMessageIter *iter, DBusError *error,
 			type = "pbc";
 		else if (wps_is_selected_pin_registrar(wps_ie))
 			type = "pin";
+
+		wpabuf_free(wps_ie);
 	}
 #endif /* CONFIG_WPS */

--

-- 
1.8.3.2
Bartlomiej Grzeskowiak | 28 Oct 08:50 2014
Picon

Does wpa_supplicant background scanning reduce wlan throughput?

Hi,

First of all I would like to greet everyone.

Does frequent wpa_supplicant background scanning reduce wlan throughput?

BR
Bartek
_______________________________________________
HostAP mailing list
HostAP <at> lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap
Masashi Honma | 28 Oct 03:12 2014
Picon

[PATCH] mesh: Add mesh interface creation command for mesh gate

The mesh gate is used to bridge (or route) between mesh network and another
network. For example, mesh gate acts as router between mesh network and IEEE
802.11 BSS network.

This command makes a virtual mesh interface to be used for mesh gate.

This command expects to be used like this.

wpa_cli -i wlan0 MESH_INTERFACE_ADD ifname=mesh0
wpa_cli -i mesh0 add_network
wpa_cli -i mesh0 set_network 0 ssid '"commell_2X_mmm"'
wpa_cli -i mesh0 set_network 0 mode 5
wpa_cli -i mesh0 set_network 0 frequency 2412
wpa_cli -i mesh0 set_network 0 key_mgmt SAE
wpa_cli -i mesh0 set_network 0 psk '"01234567"'
wpa_cli -i mesh0 mesh_group_add 0
wpa_cli -i wlan0 mesh_group_remove mesh0

Signed-off-by: Masashi Honma <masashi.honma <at> gmail.com>
---
 src/drivers/driver.h              |  6 +++-
 src/drivers/driver_nl80211.c      | 22 +++++++------
 wpa_supplicant/ctrl_iface.c       | 66 ++++++++++++++++++++++++++++++++-------
 wpa_supplicant/mesh.c             | 52 ++++++++++++++++++++++++++++++
 wpa_supplicant/mesh.h             |  2 ++
 wpa_supplicant/wpa_cli.c          |  8 +++++
 wpa_supplicant/wpa_supplicant.c   | 22 +++++++++++++
 wpa_supplicant/wpa_supplicant_i.h |  2 ++
 8 files changed, 158 insertions(+), 22 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 03f0b68..29f4b60 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
 <at>  <at>  -1213,7 +1213,11  <at>  <at>  enum wpa_driver_if_type {
 	 * WPA_IF_P2P_DEVICE - P2P Device interface is used to indentify the
 	 * abstracted P2P Device function in the driver
 	 */
-	WPA_IF_P2P_DEVICE
+	WPA_IF_P2P_DEVICE,
+	/*
+	 * WPA_IF_MESH - Mesh interface
+	 */
+	WPA_IF_MESH
 };

 struct wpa_init_params {
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 62e6a67..0cba21b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
 <at>  <at>  -6484,12 +6484,14  <at>  <at>  static enum nl80211_iftype wpa_driver_nl80211_if_type(
 		return NL80211_IFTYPE_P2P_GO;
 	case WPA_IF_P2P_DEVICE:
 		return NL80211_IFTYPE_P2P_DEVICE;
+	case WPA_IF_MESH:
+		return NL80211_IFTYPE_MESH_POINT;
 	}
 	return -1;
 }

 
-#ifdef CONFIG_P2P
+#if defined(CONFIG_P2P) || defined(CONFIG_MESH)

 static int nl80211_addr_in_use(struct nl80211_global *global, const u8 *addr)
 {
 <at>  <at>  -6503,8 +6505,7  <at>  <at>  static int nl80211_addr_in_use(struct nl80211_global *global, const u8 *addr)
 }

 
-static int nl80211_p2p_interface_addr(struct wpa_driver_nl80211_data *drv,
-				      u8 *new_addr)
+static int nl80211_vif_addr(struct wpa_driver_nl80211_data *drv, u8 *new_addr)
 {
 	unsigned int idx;

 <at>  <at>  -6521,13 +6522,13  <at>  <at>  static int nl80211_p2p_interface_addr(struct wpa_driver_nl80211_data *drv,
 	if (idx == 64)
 		return -1;

-	wpa_printf(MSG_DEBUG, "nl80211: Assigned new P2P Interface Address "
+	wpa_printf(MSG_DEBUG, "nl80211: Assigned new virtual Interface Address "
 		   MACSTR, MAC2STR(new_addr));

 	return 0;
 }

-#endif /* CONFIG_P2P */
+#endif /* CONFIG_P2P || CONFIG_MESH */

 
 struct wdev_info {
 <at>  <at>  -6614,10 +6615,10  <at>  <at>  static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 		}
 	}

-#ifdef CONFIG_P2P
+#if defined(CONFIG_P2P) || defined(CONFIG_MESH)
 	if (!addr &&
 	    (type == WPA_IF_P2P_CLIENT || type == WPA_IF_P2P_GROUP ||
-	     type == WPA_IF_P2P_GO)) {
+	     type == WPA_IF_P2P_GO || type == WPA_IF_MESH)) {
 		/* Enforce unique P2P Interface Address */
 		u8 new_addr[ETH_ALEN];

 <at>  <at>  -6629,8 +6630,9  <at>  <at>  static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 		}
 		if (nl80211_addr_in_use(drv->global, new_addr)) {
 			wpa_printf(MSG_DEBUG, "nl80211: Allocate new address "
-				   "for P2P group interface");
-			if (nl80211_p2p_interface_addr(drv, new_addr) < 0) {
+				   "for %s interface", type == WPA_IF_MESH ?
+				   "mesh" : "P2P group");
+			if (nl80211_vif_addr(drv, new_addr) < 0) {
 				if (added)
 					nl80211_remove_iface(drv, ifidx);
 				return -1;
 <at>  <at>  -6644,7 +6646,7  <at>  <at>  static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 		}
 		os_memcpy(if_addr, new_addr, ETH_ALEN);
 	}
-#endif /* CONFIG_P2P */
+#endif /* CONFIG_P2P || CONFIG_MESH */

 	if (type == WPA_IF_AP_BSS) {
 		struct i802_bss *new_bss = os_zalloc(sizeof(*new_bss));
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 24e2e32..32d6464 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
 <at>  <at>  -2360,6 +2360,27  <at>  <at>  static int wpa_supplicant_ctrl_iface_scan_results(

 #ifdef CONFIG_MESH

+static int wpa_supplicant_ctrl_iface_mesh_interface_add(
+	struct wpa_supplicant *wpa_s, char *cmd, char *reply, size_t max_len)
+{
+	char *pos, ifname[IFNAMSIZ + 1];
+
+	ifname[0] = '\0';
+
+	pos = os_strstr(cmd, "ifname=");
+	if (pos) {
+		pos += 7;
+		os_strlcpy(ifname, pos, sizeof(ifname));
+	}
+
+	if (wpas_mesh_add_interface(wpa_s, ifname, sizeof(ifname)) < 0)
+		return -1;
+
+	os_strlcpy(reply, ifname, max_len);
+	return os_strlen(ifname);
+}
+
+
 static int wpa_supplicant_ctrl_iface_mesh_group_add(
 	struct wpa_supplicant *wpa_s, char *cmd)
 {
 <at>  <at>  -2371,12 +2392,12  <at>  <at>  static int wpa_supplicant_ctrl_iface_mesh_group_add(

 	ssid = wpa_config_get_network(wpa_s->conf, id);
 	if (ssid == NULL) {
-		wpa_printf(MSG_DEBUG,
+		wpa_printf(MSG_ERROR,
 			   "CTRL_IFACE: Could not find network id=%d", id);
 		return -1;
 	}
 	if (ssid->mode != WPAS_MODE_MESH) {
-		wpa_printf(MSG_DEBUG,
+		wpa_printf(MSG_ERROR,
 			   "CTRL_IFACE: Cannot use MESH_GROUP_ADD on a non mesh network");
 		return -1;
 	}
 <at>  <at>  -2394,23 +2415,37  <at>  <at>  static int wpa_supplicant_ctrl_iface_mesh_group_add(
 static int wpa_supplicant_ctrl_iface_mesh_group_remove(
 	struct wpa_supplicant *wpa_s, char *cmd)
 {
+	struct wpa_supplicant *orig;
+	struct wpa_global *global;
+	int found = 0;
+
 	if (!cmd) {
 		wpa_printf(MSG_ERROR,
 			   "CTRL_IFACE: MESH_GROUP_REMOVE ifname cannot be empty");
 		return -1;
 	}

-	/*
-	 * TODO: Support a multiple mesh and other iface type combinations
-	 */
-	if (os_strcmp(cmd, wpa_s->ifname) != 0) {
-		wpa_printf(MSG_DEBUG,
-			   "CTRL_IFACE: MESH_GROUP_REMOVE unknown interface name: %s",
-			   cmd);
+	wpa_printf(MSG_DEBUG, "CTRL_IFACE: MESH_GROUP_REMOVE ifname=%s", cmd);
+
+	global = wpa_s->global;
+	orig = wpa_s;
+
+	for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {
+		if (os_strcmp(wpa_s->ifname, cmd) == 0) {
+			found = 1;
+			break;
+		}
+	}
+	if (!found) {
+		wpa_printf(MSG_ERROR, "CTRL_IFACE: MESH_GROUP_REMOVE ifname=%s "
+			   "not found", cmd);
+		return -1;
+	}
+	if (wpa_s->mesh_if_created && wpa_s == orig) {
+		wpa_printf(MSG_ERROR, "CTRL_IFACE: MESH_GROUP_REMOVE can't "
+			   "remove itself");
 		return -1;
 	}
-
-	wpa_printf(MSG_DEBUG, "CTRL_IFACE: MESH_GROUP_REMOVE ifname=%s", cmd);

 	wpa_s->reassociate = 0;
 	wpa_s->disconnected = 1;
 <at>  <at>  -2423,6 +2458,9  <at>  <at>  static int wpa_supplicant_ctrl_iface_mesh_group_remove(
 	 */
 	wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);

+	if (wpa_s->mesh_if_created)
+		wpa_supplicant_remove_iface(global, wpa_s, 0);
+
 	return 0;
 }

 <at>  <at>  -6978,6 +7016,12  <at>  <at>  char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
 			reply_len = -1;
 #endif /* CONFIG_IBSS_RSN */
 #ifdef CONFIG_MESH
+	} else if (os_strncmp(buf, "MESH_INTERFACE_ADD ", 19) == 0) {
+		reply_len = wpa_supplicant_ctrl_iface_mesh_interface_add(
+			wpa_s, buf + 19, reply, reply_size);
+	} else if (os_strcmp(buf, "MESH_INTERFACE_ADD") == 0) {
+		reply_len = wpa_supplicant_ctrl_iface_mesh_interface_add(
+			wpa_s, "", reply, reply_size);
 	} else if (os_strncmp(buf, "MESH_GROUP_ADD ", 15) == 0) {
 		if (wpa_supplicant_ctrl_iface_mesh_group_add(wpa_s, buf + 15))
 			reply_len = -1;
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index f42cf87..e8491ff 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
 <at>  <at>  -467,3 +467,55  <at>  <at>  int wpas_mesh_scan_result_text(const u8 *ies, size_t ies_len, char *buf,
 {
 	return mesh_attr_text(ies, ies_len, buf, end);
 }
+
+
+static void wpas_mesh_get_ifname(struct wpa_supplicant *wpa_s, char *ifname,
+				 size_t len)
+{
+	char *ifname_ptr = wpa_s->ifname;
+
+	os_snprintf(ifname, len, "mesh-%s-%d", ifname_ptr, wpa_s->mesh_if_idx);
+	if (os_strlen(ifname) >= IFNAMSIZ &&
+	    os_strlen(wpa_s->ifname) < IFNAMSIZ) {
+		/* Try to avoid going over the IFNAMSIZ length limit */
+		os_snprintf(ifname, len, "mesh-%d", wpa_s->mesh_if_idx);
+	}
+	wpa_s->mesh_if_idx++;
+}
+
+
+int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname,
+			    size_t len)
+{
+	struct wpa_interface iface;
+	struct wpa_supplicant *mesh_wpa_s;
+	u8 addr[ETH_ALEN];
+
+	if (ifname[0] == '\0')
+		wpas_mesh_get_ifname(wpa_s, ifname, len);
+
+	if (wpa_drv_if_add(wpa_s, WPA_IF_MESH, ifname, NULL, NULL, NULL, addr,
+			   NULL) < 0) {
+		wpa_printf(MSG_ERROR, "mesh: Failed to create new mesh "
+			   "interface");
+		return -1;
+	}
+	wpa_printf(MSG_INFO, "mesh: Created virtual interface %s addr "
+		   MACSTR, ifname, MAC2STR(addr));
+
+	os_memset(&iface, 0, sizeof(iface));
+	iface.ifname = ifname;
+	iface.driver = wpa_s->driver->name;
+	iface.driver_param = wpa_s->conf->driver_param;
+	iface.ctrl_interface = wpa_s->conf->ctrl_interface;
+
+	mesh_wpa_s = wpa_supplicant_add_iface(wpa_s->global, &iface);
+	if (!mesh_wpa_s) {
+		wpa_printf(MSG_ERROR, "mesh: Failed to create new "
+			   "wpa_supplicant interface");
+		return -1;
+	}
+	mesh_wpa_s->mesh_if_created = 1;
+	mesh_wpa_s->parent = wpa_s;
+	return 0;
+}
diff --git a/wpa_supplicant/mesh.h b/wpa_supplicant/mesh.h
index 3c3ea1f..3cb7f1b 100644
--- a/wpa_supplicant/mesh.h
+++ b/wpa_supplicant/mesh.h
 <at>  <at>  -16,6 +16,8  <at>  <at>  void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s,
 				      struct hostapd_iface *ifmsh);
 int wpas_mesh_scan_result_text(const u8 *ies, size_t ies_len, char *buf,
 			       char *end);
+int wpas_mesh_add_interface(struct wpa_supplicant *wpa_s, char *ifname,
+			    size_t len);

 #ifdef CONFIG_MESH

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 5a3d1f6..1e1d029 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
 <at>  <at>  -1753,6 +1753,11  <at>  <at>  static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[])

 
 #ifdef CONFIG_MESH
+static int wpa_cli_cmd_mesh_interface_add(struct wpa_ctrl *ctrl, int argc,
+				      char *argv[])
+{
+	return wpa_cli_cmd(ctrl, "MESH_INTERFACE_ADD", 0, argc, argv);
+}

 static int wpa_cli_cmd_mesh_group_add(struct wpa_ctrl *ctrl, int argc,
 				      char *argv[])
 <at>  <at>  -2800,6 +2805,9  <at>  <at>  static struct wpa_cli_cmd wpa_cli_commands[] = {
 	  cli_cmd_flag_none,
 	  "<addr> = roam to the specified BSS" },
 #ifdef CONFIG_MESH
+	{ "mesh_interface_add", wpa_cli_cmd_mesh_interface_add, NULL,
+	  cli_cmd_flag_none,
+	  "[ifname] = Create a new mesh interface" },
 	{ "mesh_group_add", wpa_cli_cmd_mesh_group_add, NULL,
 	  cli_cmd_flag_none,
 	  "<network id> = join a mesh network (disable others)" },
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 8d7de28..ba7e527 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
 <at>  <at>  -4122,6 +4122,10  <at>  <at>  int wpa_supplicant_remove_iface(struct wpa_global *global,
 				int terminate)
 {
 	struct wpa_supplicant *prev;
+#ifdef CONFIG_MESH
+	int mesh_if_created = wpa_s->mesh_if_created;
+	char *ifname = NULL;
+#endif /* CONFIG_MESH */

 	/* Remove interface from the global list of interfaces */
 	prev = global->ifaces;
 <at>  <at>  -4137,12 +4141,30  <at>  <at>  int wpa_supplicant_remove_iface(struct wpa_global *global,

 	wpa_dbg(wpa_s, MSG_DEBUG, "Removing interface %s", wpa_s->ifname);

+#ifdef CONFIG_MESH
+	if (mesh_if_created) {
+		ifname = os_strdup(wpa_s->ifname);
+		if (ifname == NULL) {
+			wpa_dbg(wpa_s, MSG_ERROR, "mesh: Failed to malloc "
+				"ifname");
+			return -1;
+		}
+	}
+#endif /* CONFIG_MESH */
+
 	if (global->p2p_group_formation == wpa_s)
 		global->p2p_group_formation = NULL;
 	if (global->p2p_invite_group == wpa_s)
 		global->p2p_invite_group = NULL;
 	wpa_supplicant_deinit_iface(wpa_s, 1, terminate);

+#ifdef CONFIG_MESH
+	if (mesh_if_created) {
+		wpa_drv_if_remove(global->ifaces, WPA_IF_MESH, ifname);
+		os_free(ifname);
+	}
+#endif /* CONFIG_MESH */
+
 	return 0;
 }

diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 48fa4ec..5648222 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
 <at>  <at>  -668,6 +668,8  <at>  <at>  struct wpa_supplicant {
 	struct hostapd_iface *ifmsh;
 #ifdef CONFIG_MESH
 	struct mesh_rsn *mesh_rsn;
+	int mesh_if_idx;
+	int mesh_if_created;
 #endif /* CONFIG_MESH */

 	unsigned int off_channel_freq;
--

-- 
1.9.1
Avery Pennarun | 28 Oct 00:55 2014
Picon

Trouble with key rotation in noisy environments [resend]

[Resending since my message was rejected - not subscribed to the list.]

Hi all,

Can anyone else reproduce this?  I'm using ath9k and ath10k APs with
the latest hostapd from HEAD (though we've tried several other
versions without any difference).

Steps:
- Pick a channel in a noisy environment (eg. 2.4 GHz)
- Configure hostapd to rotate keys extremely frequently:
    wep_rekey_period=10
    wpa_group_rekey=10
    wpa_strict_rekey=1
    wpa_gmk_rekey=9
    wpa_ptk_rekey=10
- Connect a client device (tested with Macbook Air and two different
Linux clients)
- On the client, load a tool like http://gfblip.appspot.com/ to
generate and monitor continuous traffic.
- On the AP, watch the hostapd logs to see key rotations as they happen.

Expected:
- Key rotations occur every 10 seconds or so but do not affect the traffic.

Actual:
- Most key rotations go through fine and don't show latency spikes in
the "blip" application linked above.
- Every now and then, something goes wrong with the key rotation and
data stops flowing.  The AP thinks the key rotation has worked, but it
apparently has not.
- After about 10 more seconds (possibly because that is the next key
rotation), hostapd decides the station is broken and disassociates it.
- Immediately afterward, the station reconnects and resumes its
activity, and the cycle repeats.

I would appreciate any hints you all can provide.

Thanks!

Avery
Ilan Peer | 27 Oct 15:00 2014
Picon

[PATCH v2 0/5] Few additions and enhancements for hswim testing

This set addresses comments and add couple of fixes for vm testing

Ilan Peer (5):
  tests: make run-all.sh arguments non positional
  tests: Add option to build before running all tests
  tests: add usage() to run-all.sh
  tests: Update vm README
  tests: Make vm-run.sh arguments non positional

 tests/hwsim/run-all.sh   | 98 ++++++++++++++++++++++++++++++++++++++----------
 tests/hwsim/vm/README    |  2 +-
 tests/hwsim/vm/vm-run.sh | 44 +++++++++++++---------
 3 files changed, 106 insertions(+), 38 deletions(-)

--

-- 
1.8.3.2
Ilan Peer | 26 Oct 08:06 2014
Picon

[PATCH 0/8] Few additions and enhancements for hswim testing.

Ilan Peer (8):
  tests: Add an option to build with code coverage
  tests: Add an option to force copy config files
  tests: add usage() to build.sh
  tests: make run-all.sh arguments non positional
  tests: Add option to build before running all tests
  tests: Add support for reading modules list from a file
  tests: Add an option to run only a subset of modules
  tests: add usage() to run-all.sh

 tests/hwsim/build.sh     | 48 +++++++++++++++++++++++--
 tests/hwsim/run-all.sh   | 93 ++++++++++++++++++++++++++++++++++++++----------
 tests/hwsim/run-tests.py | 16 +++++++--
 3 files changed, 134 insertions(+), 23 deletions(-)

--

-- 
1.8.3.2
Jouni Malinen | 26 Oct 10:06 2014
Picon

Removal of driver_madwifi.c from hostapd

The madwifi project is not active any more (or have been for years).
Does someone still have any real use for the
src/drivers/driver_madwifi.c implementation in hostapd (driver=madwifi
in hostapd.conf) to interface with that driver? If I don't hear of a
convincing need for it, I'm planning on removing that driver interface
from hostap.git and as such, from future hostapd releases.

--

-- 
Jouni Malinen                                            PGP id EFC895FA
kirandivekar | 25 Oct 07:31 2014
Picon

Your friend kirandivekar <at> gmail.com cannot see your photo

Click here to discover kirandivekar <at> gmail.com's favorite websites!
Your friend kirandivekar <at> gmail.com cannot see your photo
Here is what your profile looks like today:
 
Add Your Photo
 
 
Keep Default
 
Make a great first impression by adding a profile pic that shows off your personality :)
Click here to unsubscribe from such emails from kirandivekar <at> gmail.com or all friends


P.O. BOX 70928, Sunnyvale, CA 94086
_______________________________________________
HostAP mailing list
HostAP <at> lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap

Gmane