driver_none.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * hostapd / Driver interface for RADIUS server only (no driver)
  3. * Copyright (c) 2008, Atheros Communications
  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. #include "includes.h"
  15. #include "hostapd.h"
  16. #include "driver.h"
  17. struct none_driver_data {
  18. struct hostapd_data *hapd;
  19. };
  20. static void * none_driver_init(struct hostapd_data *hapd)
  21. {
  22. struct none_driver_data *drv;
  23. drv = os_zalloc(sizeof(struct none_driver_data));
  24. if (drv == NULL) {
  25. wpa_printf(MSG_ERROR, "Could not allocate memory for none "
  26. "driver data");
  27. return NULL;
  28. }
  29. drv->hapd = hapd;
  30. return drv;
  31. }
  32. static void none_driver_deinit(void *priv)
  33. {
  34. struct none_driver_data *drv = priv;
  35. os_free(drv);
  36. }
  37. static int none_driver_send_ether(void *priv, const u8 *dst, const u8 *src,
  38. u16 proto, const u8 *data, size_t data_len)
  39. {
  40. return 0;
  41. }
  42. const struct hapd_driver_ops wpa_driver_none_ops = {
  43. .name = "none",
  44. .init = none_driver_init,
  45. .deinit = none_driver_deinit,
  46. .send_ether = none_driver_send_ether,
  47. };