]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Clear ignore_if_down_event if interface is up
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 27 Nov 2014 12:59:28 +0000 (14:59 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 27 Nov 2014 12:59:28 +0000 (14:59 +0200)
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 <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211.c

index 0427bcad77e4f097c5f829b81c6d2c59091ebfbd..f886ffefe35b0b2f2b78ae2352c290b7c9a88397 100644 (file)
@@ -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");