wlan_pdev_mlme.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /**
  18. * DOC: Define PDEV MLME structure and APIs
  19. */
  20. #ifndef _WLAN_PDEV_MLME_H_
  21. #define _WLAN_PDEV_MLME_H_
  22. #include <qdf_timer.h>
  23. #include <include/wlan_vdev_mlme.h>
  24. #include <wlan_ext_mlme_obj_types.h>
  25. /**
  26. * struct pdev_restart_attr - Pdev restart attributes
  27. * @vdev: vdev on which the pdev restart cmd was enqueued
  28. * @restart_bmap: Bitmap for vdev requesting multivdev restart
  29. */
  30. struct pdev_restart_attr {
  31. struct wlan_objmgr_vdev *vdev;
  32. qdf_bitmap(restart_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
  33. };
  34. /**
  35. * struct pdev_mlme_obj - PDEV MLME component object
  36. * @pdev: PDEV object
  37. * @ext_pdev_ptr: PDEV MLME legacy pointer
  38. * @mlme_register_ops: Call back to register MLME legacy APIs
  39. * @vdev_restart_lock: Lock for VDEVs restart
  40. * @restart_req_timer: Timer handle for VDEVs restart
  41. * @restart_pend_vdev_bmap: Bitmap for VDEV RESTART command pending
  42. * @restart_send_vdev_bmap: Bitmap for VDEV RESTART command sending
  43. * @start_send_vdev_arr: Bitmap for VDEV START command sending
  44. * @pdev_restart: Pdev restart attributes structure
  45. * @multivdev_restart_wait_cnt: multi vdev restart wait counter
  46. */
  47. struct pdev_mlme_obj {
  48. struct wlan_objmgr_pdev *pdev;
  49. mlme_pdev_ext_t *ext_pdev_ptr;
  50. QDF_STATUS (*mlme_register_ops)(struct vdev_mlme_obj *vdev_mlme);
  51. qdf_spinlock_t vdev_restart_lock;
  52. qdf_timer_t restart_req_timer;
  53. qdf_bitmap(restart_pend_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
  54. qdf_bitmap(restart_send_vdev_bmap, WLAN_UMAC_PSOC_MAX_VDEVS);
  55. qdf_bitmap(start_send_vdev_arr, WLAN_UMAC_PSOC_MAX_VDEVS);
  56. struct pdev_restart_attr pdev_restart;
  57. qdf_atomic_t multivdev_restart_wait_cnt;
  58. };
  59. #ifdef MOBILE_DFS_SUPPORT
  60. static inline
  61. bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev)
  62. {
  63. return false;
  64. }
  65. #else
  66. bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev);
  67. #endif /* MOBILE_DFS_SUPPORT */
  68. #endif