aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/patches/390-nl80211_fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/hostapd/patches/390-nl80211_fixes.patch')
-rw-r--r--package/hostapd/patches/390-nl80211_fixes.patch59
1 files changed, 37 insertions, 22 deletions
diff --git a/package/hostapd/patches/390-nl80211_fixes.patch b/package/hostapd/patches/390-nl80211_fixes.patch
index fdac284b64..20c603252c 100644
--- a/package/hostapd/patches/390-nl80211_fixes.patch
+++ b/package/hostapd/patches/390-nl80211_fixes.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -1119,7 +1119,6 @@ nla_put_failure:
+@@ -1135,7 +1135,6 @@ nla_put_failure:
}
@@ -8,7 +8,7 @@
struct wiphy_info_data {
int max_scan_ssids;
int ap_supported;
-@@ -1231,7 +1230,6 @@ static int wpa_driver_nl80211_capa(struc
+@@ -1247,7 +1246,6 @@ static int wpa_driver_nl80211_capa(struc
return 0;
}
@@ -16,7 +16,7 @@
static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv,
-@@ -1371,6 +1369,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1411,6 +1409,7 @@ static void * wpa_driver_nl80211_init(vo
drv->monitor_ifidx = -1;
drv->monitor_sock = -1;
drv->ioctl_sock = -1;
@@ -24,7 +24,7 @@
if (wpa_driver_nl80211_init_nl(drv, ctx)) {
os_free(drv);
-@@ -1468,24 +1467,23 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -1530,32 +1529,32 @@ wpa_driver_nl80211_finish_drv_init(struc
drv->ifindex = if_nametoindex(bss->ifname);
drv->first_bss.ifindex = drv->ifindex;
@@ -33,23 +33,38 @@
- wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
- "use managed mode");
- }
--
-- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
-- wpa_printf(MSG_ERROR, "Could not set interface '%s' UP",
-- bss->ifname);
-- return -1;
-- }
+ if (drv->nlmode == NL80211_IFTYPE_STATION) {
-+ if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0)
-+ wpa_printf(MSG_DEBUG, "nl80211: Could not configure "
-+ "driver to use managed mode");
-+
-+ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
-+ wpa_printf(MSG_ERROR, "Could not set interface '%s' UP",
-+ bss->ifname);
-+ return -1;
++ if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
++ wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
++ "use managed mode");
+ }
+- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
+- if (rfkill_is_blocked(drv->rfkill)) {
+- wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
+- "interface '%s' due to rfkill",
+- bss->ifname);
+- drv->if_disabled = 1;
+- send_rfkill_event = 1;
+- } else {
+- wpa_printf(MSG_ERROR, "nl80211: Could not set "
+- "interface '%s' UP", bss->ifname);
+- return -1;
++ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
++ if (rfkill_is_blocked(drv->rfkill)) {
++ wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
++ "interface '%s' due to rfkill",
++ bss->ifname);
++ drv->if_disabled = 1;
++ send_rfkill_event = 1;
++ } else {
++ wpa_printf(MSG_ERROR, "nl80211: Could not set "
++ "interface '%s' UP", bss->ifname);
++ return -1;
++ }
+ }
+- }
+
- if (wpa_driver_nl80211_capa(drv))
- return -1;
+ if (wpa_driver_nl80211_capa(drv))
@@ -64,7 +79,7 @@
if (nl80211_register_action_frames(drv) < 0) {
wpa_printf(MSG_DEBUG, "nl80211: Failed to register Action "
-@@ -2143,13 +2141,9 @@ static int wpa_driver_nl80211_set_key(co
+@@ -2219,13 +2218,9 @@ static int wpa_driver_nl80211_set_key(co
*/
if (ret || !set_tx || alg == WPA_ALG_NONE)
return ret;
@@ -79,7 +94,7 @@
msg = nlmsg_alloc();
if (!msg)
-@@ -2990,7 +2984,8 @@ static void nl80211_remove_iface(struct
+@@ -3066,7 +3061,8 @@ static void nl80211_remove_iface(struct
#ifdef HOSTAPD
/* stop listening for EAPOL on this interface */
@@ -89,7 +104,7 @@
#endif /* HOSTAPD */
msg = nlmsg_alloc();
-@@ -3063,7 +3058,8 @@ static int nl80211_create_iface_once(str
+@@ -3139,7 +3135,8 @@ static int nl80211_create_iface_once(str
#ifdef HOSTAPD
/* start listening for EAPOL on this interface */
@@ -99,7 +114,7 @@
#endif /* HOSTAPD */
if (addr && iftype != NL80211_IFTYPE_MONITOR &&
-@@ -4766,6 +4762,7 @@ static void *i802_init(struct hostapd_da
+@@ -4842,6 +4839,7 @@ static void *i802_init(struct hostapd_da
return NULL;
drv = bss->drv;