--- /dev/null
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -2262,7 +2262,8 @@ wpa_driver_nl80211_finish_drv_init(struc
+
+ if (drv->hostapd || bss->static_ap)
+ nlmode = NL80211_IFTYPE_AP;
+- else if (bss->if_dynamic)
++ else if (bss->if_dynamic ||
++ nl80211_get_ifmode(bss) == NL80211_IFTYPE_MESH_POINT)
+ nlmode = nl80211_get_ifmode(bss);
+ else
+ nlmode = NL80211_IFTYPE_STATION;
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -2323,13 +2323,18 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2324,13 +2324,18 @@ wpa_driver_nl80211_finish_drv_init(struc
}
return send_and_recv_msgs(drv, msg, NULL, NULL);
}
-@@ -2380,7 +2385,7 @@ static void wpa_driver_nl80211_deinit(st
+@@ -2381,7 +2386,7 @@ static void wpa_driver_nl80211_deinit(st
nl80211_remove_monitor_interface(drv);
if (is_ap_interface(drv->nlmode))
if (drv->eapol_sock >= 0) {
eloop_unregister_read_sock(drv->eapol_sock);
-@@ -4232,8 +4237,7 @@ static void nl80211_teardown_ap(struct i
+@@ -4233,8 +4238,7 @@ static void nl80211_teardown_ap(struct i
nl80211_remove_monitor_interface(drv);
else
nl80211_mgmt_unsubscribe(bss, "AP teardown");
}
-@@ -6164,8 +6168,6 @@ static int wpa_driver_nl80211_if_remove(
+@@ -6165,8 +6169,6 @@ static int wpa_driver_nl80211_if_remove(
} else {
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
nl80211_teardown_ap(bss);
nl80211_destroy_bss(bss);
if (!bss->added_if)
i802_set_iface_flags(bss, 0);
-@@ -6527,8 +6529,7 @@ static int wpa_driver_nl80211_deinit_ap(
+@@ -6528,8 +6530,7 @@ static int wpa_driver_nl80211_deinit_ap(
struct wpa_driver_nl80211_data *drv = bss->drv;
if (!is_ap_interface(drv->nlmode))
return -1;
/*
* If the P2P GO interface was dynamically added, then it is
-@@ -6547,8 +6548,7 @@ static int wpa_driver_nl80211_stop_ap(vo
+@@ -6548,8 +6549,7 @@ static int wpa_driver_nl80211_stop_ap(vo
struct wpa_driver_nl80211_data *drv = bss->drv;
if (!is_ap_interface(drv->nlmode))
return -1;
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -4491,7 +4491,7 @@ static int wpa_driver_nl80211_ibss(struc
+@@ -4492,7 +4492,7 @@ static int wpa_driver_nl80211_ibss(struc
struct wpa_driver_associate_params *params)
{
struct nl_msg *msg;
int count = 0;
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
-@@ -4518,6 +4518,37 @@ retry:
+@@ -4519,6 +4519,37 @@ retry:
nl80211_put_beacon_int(msg, params->beacon_int))
goto fail;