X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/454a4d2fee1cef9b1ea0b774fd871aac2f3624d3..893061736800f46183291aea37815e995a1fb830:/package/hostapd/patches/710-bring_down_interface.patch?ds=inline diff --git a/package/hostapd/patches/710-bring_down_interface.patch b/package/hostapd/patches/710-bring_down_interface.patch index 20e226471..4f3bc5529 100644 --- a/package/hostapd/patches/710-bring_down_interface.patch +++ b/package/hostapd/patches/710-bring_down_interface.patch @@ -1,21 +1,19 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4919,9 +4919,6 @@ static int wpa_driver_nl80211_set_mode(v - /* Try to set the mode again while the interface is - * down */ +@@ -5867,8 +5867,6 @@ static int wpa_driver_nl80211_set_mode(s ret = nl80211_set_mode(drv, drv->ifindex, nlmode); -- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, -- 1)) -- ret = -1; - if (!ret) + if (ret == -EACCES) break; - } else -@@ -4934,6 +4931,8 @@ static int wpa_driver_nl80211_set_mode(v - wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while " +- res = linux_set_iface_flags(drv->global->ioctl_sock, +- bss->ifname, 1); + if (res && !ret) + ret = -1; + else if (ret != -EBUSY) +@@ -5884,6 +5882,7 @@ static int wpa_driver_nl80211_set_mode(s "interface is down"); drv->nlmode = nlmode; -+ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) -+ ret = -1; + drv->ignore_if_down_event = 1; ++ linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1); } done: