From: Jouni Malinen Date: Thu, 27 Nov 2014 14:39:14 +0000 (+0200) Subject: nl80211: Change iftype to station on leaving mesh X-Git-Tag: hostap_2_4~1018 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f33c82d23ef83394694d3704a5a4a5f9b8b69b81;p=thirdparty%2Fhostap.git nl80211: Change iftype to station on leaving mesh This is needed to make following operations behave as expected since mesh iftypes may prevent various operations (e.g., registering Probe Request frame RX). Use same design as leave_ibss does to handle this consistently. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index f886ffefe..2b4abf3bb 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -8966,6 +8966,11 @@ static int wpa_driver_nl80211_leave_mesh(void *priv) nla_put_failure: nlmsg_free(msg); + if (wpa_driver_nl80211_set_mode(drv->first_bss, + NL80211_IFTYPE_STATION)) { + wpa_printf(MSG_INFO, + "nl80211: Failed to set interface into station mode"); + } return ret; }