aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/main.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-09-03 21:58:37 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-16 15:09:11 (GMT)
commit88cb27c7a5164f8ffe465e4f1a4ae5f5f7bea91c (patch)
treefd527f761d7d0d484be1b4b27e15c8d2350dd39c /hostapd/main.c
parentf03996565adad176e1ee4ba9955862edbe98a349 (diff)
downloadhostap-88cb27c7a5164f8ffe465e4f1a4ae5f5f7bea91c.zip
hostap-88cb27c7a5164f8ffe465e4f1a4ae5f5f7bea91c.tar.gz
hostap-88cb27c7a5164f8ffe465e4f1a4ae5f5f7bea91c.tar.bz2
hostapd: Add wowlan_triggers config param
New kernels in wiphy_suspend() will call cfg80211_leave_all() that will eventually end up in cfg80211_stop_ap() unless wowlan_triggers were set. For now, use the parameters from the station mode as-is. It may be desirable to extend (or constraint) this in the future for specific AP mode needs. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'hostapd/main.c')
-rw-r--r--hostapd/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hostapd/main.c b/hostapd/main.c
index 5a47711..daa6b0f 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -212,6 +212,8 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
if (hapd->driver->get_capa &&
hapd->driver->get_capa(hapd->drv_priv, &capa) == 0) {
+ struct wowlan_triggers *triggs;
+
iface->drv_flags = capa.flags;
iface->smps_modes = capa.smps_modes;
iface->probe_resp_offloads = capa.probe_resp_offloads;
@@ -219,6 +221,13 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
iface->extended_capa_mask = capa.extended_capa_mask;
iface->extended_capa_len = capa.extended_capa_len;
iface->drv_max_acl_mac_addrs = capa.max_acl_mac_addrs;
+
+ triggs = wpa_get_wowlan_triggers(conf->wowlan_triggers, &capa);
+ if (triggs && hapd->driver->set_wowlan) {
+ if (hapd->driver->set_wowlan(hapd->drv_priv, triggs))
+ wpa_printf(MSG_ERROR, "set_wowlan failed");
+ }
+ os_free(triggs);
}
return 0;