diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2014-09-03 21:58:37 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2014-11-16 15:09:11 (GMT) |
commit | 88cb27c7a5164f8ffe465e4f1a4ae5f5f7bea91c (patch) | |
tree | fd527f761d7d0d484be1b4b27e15c8d2350dd39c /hostapd | |
parent | f03996565adad176e1ee4ba9955862edbe98a349 (diff) | |
download | hostap-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')
-rw-r--r-- | hostapd/config_file.c | 3 | ||||
-rw-r--r-- | hostapd/main.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c index ea7a018..61d371b 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3172,6 +3172,9 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->local_pwr_constraint = val; } else if (os_strcmp(buf, "spectrum_mgmt_required") == 0) { conf->spectrum_mgmt_required = atoi(pos); + } else if (os_strcmp(buf, "wowlan_triggers") == 0) { + os_free(bss->wowlan_triggers); + bss->wowlan_triggers = os_strdup(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", 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; |