Merge driver ops set_wps_beacon_ie and set_wps_probe_resp_ie
[libeap.git] / hostapd / ap_drv_ops.c
1 /*
2  * hostapd - Driver operations
3  * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #include "includes.h"
16
17 #include "common.h"
18 #include "hostapd.h"
19 #include "driver_i.h"
20
21
22 static int hostapd_set_ap_wps_ie(struct hostapd_data *hapd,
23                                  const struct wpabuf *beacon,
24                                  const struct wpabuf *proberesp)
25 {
26         if (hapd->driver == NULL || hapd->driver->set_ap_wps_ie == NULL)
27                 return 0;
28         return hapd->driver->set_ap_wps_ie(hapd->conf->iface, hapd->drv_priv,
29                                            beacon, proberesp);
30 }
31
32
33 void hostapd_set_driver_ops(struct hostapd_driver_ops *ops)
34 {
35         ops->set_ap_wps_ie = hostapd_set_ap_wps_ie;
36 }