nl80211: Try running without mgmt frame subscription (driver AP SME)
authorRafał Miłecki <zajec5@gmail.com>
Mon, 25 Apr 2016 15:10:47 +0000 (17:10 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 28 Apr 2016 17:47:12 +0000 (20:47 +0300)
commitf4830bed661f4adff51f50a0d37c64ceb748e780
tree1cd8461c5e961a42283866820c83a533d8c03667
parentdf5bde83daaf3c820b6ac1f8d383b16a64ebd2db
nl80211: Try running without mgmt frame subscription (driver AP SME)

One of supported code paths already allows this scenario. It is used if
driver doesn't report NL80211_ATTR_DEVICE_AP_SME and doesn't support
monitor interface. In such situation:
1) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
2) We don't try subscribing for WLAN_FC_STYPE_ACTION
3) We fallback to AP SME mode after failing to create monitor interface
4) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
Above scenario is used, e.g., with brcmfmac. As you can see - thanks to
events provided by cfg80211 - it's not really required to receive Probe
Request or action frames.

However, the previous implementation did not allow using hostapd with
drivers that:
1) Report NL80211_ATTR_DEVICE_AP_SME
2) Don't support subscribing for PROBE_REQ and/or ACTION frames
In case of using such a driver hostapd will cancel setup after failing
to subscribe for WLAN_FC_STYPE_ACTION. I noticed it after setting flag
WIPHY_FLAG_HAVE_AP_SME in brcmfmac driver for my experiments.

This patch allows working with such drivers with just a small warning
printed as debug message.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
src/drivers/driver_nl80211.c