wlan_osif_priv.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright (c) 2016-2017,2020 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _WLAN_OSIF_PRIV_H_
  19. #define _WLAN_OSIF_PRIV_H_
  20. #include "qdf_net_if.h"
  21. #include <qdf_event.h>
  22. #include "wlan_cm_public_struct.h"
  23. #include <qca_vendor.h>
  24. struct osif_scan_pdev;
  25. struct osif_tdls_vdev;
  26. /**
  27. * struct pdev_osif_priv - OS private structure
  28. * @wiphy: wiphy handle
  29. * @legacy_osif_priv: legacy osif private handle
  30. * @scan_priv: Scan related data used by cfg80211 scan
  31. * @nif: pdev net device
  32. */
  33. struct pdev_osif_priv {
  34. struct wiphy *wiphy;
  35. void *legacy_osif_priv;
  36. struct osif_scan_pdev *osif_scan;
  37. struct qdf_net_if *nif;
  38. };
  39. #ifdef FEATURE_CM_ENABLE
  40. /**
  41. * struct osif_cm_info - osif connection manager info
  42. * @last_source: Last command request source
  43. * @last_id: Last command from connection manager
  44. * @cmd_id_lock: lock to update and read last command source
  45. * @last_disconnect_reason: last disconnect reason to be indicated in get
  46. * station
  47. * @disconnect_complete: disconnect completion wait event
  48. * @ext_priv: legacy data pointer.
  49. */
  50. struct osif_cm_info {
  51. enum wlan_cm_source last_source;
  52. wlan_cm_id last_id;
  53. struct qdf_spinlock cmd_id_lock;
  54. enum qca_disconnect_reason_codes last_disconnect_reason;
  55. qdf_event_t disconnect_complete;
  56. void *ext_priv;
  57. };
  58. #endif
  59. /**
  60. * struct vdev_osif_priv - OS private structure of vdev
  61. * @wdev: wireless device handle
  62. * @legacy_osif_priv: legacy osif private handle
  63. * @osif_tdls: osif tdls info
  64. * @cm_info: osif connection manager info
  65. */
  66. struct vdev_osif_priv {
  67. struct wireless_dev *wdev;
  68. void *legacy_osif_priv;
  69. struct osif_tdls_vdev *osif_tdls;
  70. #ifdef FEATURE_CM_ENABLE
  71. struct osif_cm_info cm_info;
  72. #endif
  73. };
  74. #endif