aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDedy Lansky <qca_dlansky@qca.qualcomm.com>2017-02-05 10:52:09 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-05 18:48:23 (GMT)
commit89fa633afbc6eda97a6e196c70f5ae1443b33c2f (patch)
tree7c7e5e35c7f97fb258468c5f50830f65f3643150
parenteb04c3bf8ab404cafc1160e073f66754996dedce (diff)
downloadhostap-89fa633afbc6eda97a6e196c70f5ae1443b33c2f.zip
hostap-89fa633afbc6eda97a6e196c70f5ae1443b33c2f.tar.gz
hostap-89fa633afbc6eda97a6e196c70f5ae1443b33c2f.tar.bz2
nl80211: Fix error while enabling AP mode with driver-SME
Following commit a70cd0db876b2ffad7e3d608e3f9a2fcf2e7a879 ('Don't register for Beacon frames for IEEE 802.11ad AP'), nl80211_get_wiphy_data_ap() is unconditionally called when starting AP. This function tries to register for Beacon frames RX which fails for some driver which don't support such registration and do not need it in case the driver implements AP mode SME functionality. Fix this by conditionally calling nl80211_get_wiphy_data_ap() like prior to commit a70cd0db876b2ffad7e3d608e3f9a2fcf2e7a879. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
-rw-r--r--src/drivers/driver_nl80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1fb113f..27e22c6 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3786,7 +3786,8 @@ static int wpa_driver_nl80211_set_ap(void *priv,
beacon_set);
if (beacon_set)
cmd = NL80211_CMD_SET_BEACON;
- else if (!nl80211_get_wiphy_data_ap(bss))
+ else if (!drv->device_ap_sme && !drv->use_monitor &&
+ !nl80211_get_wiphy_data_ap(bss))
return -ENOBUFS;
wpa_hexdump(MSG_DEBUG, "nl80211: Beacon head",