1 From f4830bed661f4adff51f50a0d37c64ceb748e780 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Mon, 25 Apr 2016 17:10:47 +0200
4 Subject: [PATCH] nl80211: Try running without mgmt frame subscription (driver
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 One of supported code paths already allows this scenario. It is used if
11 driver doesn't report NL80211_ATTR_DEVICE_AP_SME and doesn't support
12 monitor interface. In such situation:
13 1) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
14 2) We don't try subscribing for WLAN_FC_STYPE_ACTION
15 3) We fallback to AP SME mode after failing to create monitor interface
16 4) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
17 Above scenario is used, e.g., with brcmfmac. As you can see - thanks to
18 events provided by cfg80211 - it's not really required to receive Probe
19 Request or action frames.
21 However, the previous implementation did not allow using hostapd with
23 1) Report NL80211_ATTR_DEVICE_AP_SME
24 2) Don't support subscribing for PROBE_REQ and/or ACTION frames
25 In case of using such a driver hostapd will cancel setup after failing
26 to subscribe for WLAN_FC_STYPE_ACTION. I noticed it after setting flag
27 WIPHY_FLAG_HAVE_AP_SME in brcmfmac driver for my experiments.
29 This patch allows working with such drivers with just a small warning
30 printed as debug message.
32 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
34 src/drivers/driver_nl80211.c | 3 ++-
35 1 file changed, 2 insertions(+), 1 deletion(-)
37 --- a/src/drivers/driver_nl80211.c
38 +++ b/src/drivers/driver_nl80211.c
39 @@ -4108,7 +4108,8 @@ static int nl80211_setup_ap(struct i802_
41 if (drv->device_ap_sme && !drv->use_monitor)
42 if (nl80211_mgmt_subscribe_ap_dev_sme(bss))
44 + wpa_printf(MSG_DEBUG,
45 + "nl80211: Failed to subscribe for mgmt frames from SME driver - trying to run without it");
47 if (!drv->device_ap_sme && drv->use_monitor &&
48 nl80211_create_monitor_interface(drv) &&