Merge branch 'vendor/OPENSSL'
[dragonfly.git] / contrib / hostapd / src / ap / hs20.c
1 /*
2  * Hotspot 2.0 AP ANQP processing
3  * Copyright (c) 2009, Atheros Communications, Inc.
4  * Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
5  *
6  * This software may be distributed under the terms of the BSD license.
7  * See README for more details.
8  */
9
10 #include "includes.h"
11
12 #include "common.h"
13 #include "common/ieee802_11_defs.h"
14 #include "hostapd.h"
15 #include "ap_config.h"
16 #include "hs20.h"
17
18
19 u8 * hostapd_eid_hs20_indication(struct hostapd_data *hapd, u8 *eid)
20 {
21         if (!hapd->conf->hs20)
22                 return eid;
23         *eid++ = WLAN_EID_VENDOR_SPECIFIC;
24         *eid++ = 5;
25         WPA_PUT_BE24(eid, OUI_WFA);
26         eid += 3;
27         *eid++ = HS20_INDICATION_OUI_TYPE;
28         /* Hotspot Configuration: DGAF Enabled */
29         *eid++ = hapd->conf->disable_dgaf ? 0x01 : 0x00;
30         return eid;
31 }