wlan_osif_priv.h 2.3 KB

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