From 7a94120ea9dbea192e7dfb16a971509f673b167b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 27 Nov 2014 14:59:28 +0200 Subject: [PATCH] nl80211: Clear ignore_if_down_event if interface is up It was possible for the ignore_if_down_event flag to remain set in some cases where interface mode change required the interface to be set down temporarily. If that happened, the following rfkill interface down could have been ignored and device could have been left trying to scan or connect (which would all fail due to the interface beign down). Clean this up by clearing the ignore_if_down_event flag on the interface down event regardless of whether the interface is up at the time this event is processed. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0427bcad7..f886ffefe 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -927,6 +927,7 @@ static void wpa_driver_nl80211_event_rtm_newlink(void *ctx, drv->first_bss->ifname) > 0) { wpa_printf(MSG_DEBUG, "nl80211: Ignore interface down " "event since interface %s is up", namebuf); + drv->ignore_if_down_event = 0; return; } wpa_printf(MSG_DEBUG, "nl80211: Interface down");