mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
hostapd: fix regression breaking brcmfmac
The latest update of hostapd broke brcmfmac due to upstream regression. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
2c38b6e076
commit
e70e3c544a
@ -0,0 +1,39 @@
|
||||
From 23dc11dfbd8e78a2450120e9afc83c1d32a8e683 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 12 Sep 2016 19:02:34 +0200
|
||||
Subject: [PATCH] Revert "nl80211: Remove duplicated check in
|
||||
nl80211_setup_ap()"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 647862eb60c324015ea31293cc052558b5185ca4.
|
||||
|
||||
The second check of device_ap_sme looks like duplicated, but it isn't
|
||||
actually. The trick is nl80211_create_monitor_interface may change that
|
||||
variable value and the second evaluation may give a different result.
|
||||
|
||||
This definitely isn't a very clear code, but that change caused a
|
||||
regression for drivers that:
|
||||
1) Don't report NL80211_ATTR_DEVICE_AP_SME
|
||||
2) Don't support monitor mode
|
||||
3) Don't support subscribing for PROBE_REQ and/or ACTION frames
|
||||
like brcmfmac. With such drivers hostapd doesn't start anymore.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4434,7 +4434,8 @@ static int nl80211_setup_ap(struct i802_
|
||||
"nl80211: Failed to subscribe for mgmt frames from SME driver - trying to run without it");
|
||||
|
||||
if (!drv->device_ap_sme && drv->use_monitor &&
|
||||
- nl80211_create_monitor_interface(drv))
|
||||
+ nl80211_create_monitor_interface(drv) &&
|
||||
+ !drv->device_ap_sme)
|
||||
return -1;
|
||||
|
||||
if (drv->device_ap_sme &&
|
@ -31,7 +31,7 @@
|
||||
|
||||
if (drv->eapol_sock >= 0) {
|
||||
eloop_unregister_read_sock(drv->eapol_sock);
|
||||
@@ -4462,8 +4467,7 @@ static void nl80211_teardown_ap(struct i
|
||||
@@ -4463,8 +4468,7 @@ static void nl80211_teardown_ap(struct i
|
||||
nl80211_remove_monitor_interface(drv);
|
||||
else
|
||||
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
||||
@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -6472,8 +6476,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
@@ -6473,8 +6477,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
||||
nl80211_teardown_ap(bss);
|
||||
@ -50,7 +50,7 @@
|
||||
nl80211_destroy_bss(bss);
|
||||
if (!bss->added_if)
|
||||
i802_set_iface_flags(bss, 0);
|
||||
@@ -6835,8 +6837,7 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
@@ -6836,8 +6838,7 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
/*
|
||||
* If the P2P GO interface was dynamically added, then it is
|
||||
@@ -6855,8 +6856,7 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
@@ -6856,8 +6857,7 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
|
@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4721,7 +4721,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
@@ -4722,7 +4722,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
struct wpa_driver_associate_params *params)
|
||||
{
|
||||
struct nl_msg *msg;
|
||||
@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
int count = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
|
||||
@@ -4748,6 +4748,37 @@ retry:
|
||||
@@ -4749,6 +4749,37 @@ retry:
|
||||
nl80211_put_beacon_int(msg, params->beacon_int))
|
||||
goto fail;
|
||||
|
||||
|
@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
|
||||
* bssid_hint - BSSID of a proposed AP
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4779,6 +4779,22 @@ retry:
|
||||
@@ -4780,6 +4780,22 @@ retry:
|
||||
nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user