hs20.c 737 B

12345678910111213141516171819202122232425262728293031
  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. #include "includes.h"
  10. #include "common.h"
  11. #include "common/ieee802_11_defs.h"
  12. #include "hostapd.h"
  13. #include "ap_config.h"
  14. #include "hs20.h"
  15. u8 * hostapd_eid_hs20_indication(struct hostapd_data *hapd, u8 *eid)
  16. {
  17. if (!hapd->conf->hs20)
  18. return eid;
  19. *eid++ = WLAN_EID_VENDOR_SPECIFIC;
  20. *eid++ = 5;
  21. WPA_PUT_BE24(eid, OUI_WFA);
  22. eid += 3;
  23. *eid++ = HS20_INDICATION_OUI_TYPE;
  24. /* Hotspot Configuration: DGAF Enabled */
  25. *eid++ = hapd->conf->disable_dgaf ? 0x01 : 0x00;
  26. return eid;
  27. }