hostapd: fix hostapd RSN preauthentication PMKSA caching
[openwrt.git] / package / network / services / hostapd / patches / 510-bring_down_interface.patch
1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -8145,12 +8145,7 @@ static int wpa_driver_nl80211_set_mode(s
4                         /* Try to set the mode again while the interface is
5                          * down */
6                         ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
7 -                       if (ret == -EACCES)
8 -                               break;
9 -                       res = i802_set_iface_flags(bss, 1);
10 -                       if (res && !ret)
11 -                               ret = -1;
12 -                       else if (ret != -EBUSY)
13 +                       if (ret != -EBUSY)
14                                 break;
15                 } else
16                         wpa_printf(MSG_DEBUG, "nl80211: Failed to set "
17 @@ -8163,6 +8158,8 @@ static int wpa_driver_nl80211_set_mode(s
18                            "interface is down");
19                 drv->nlmode = nlmode;
20                 drv->ignore_if_down_event = 1;
21 +               if (i802_set_iface_flags(bss, 1))
22 +                       ret = -1;
23         }
24  
25  done: