wlan_psoc_mlme.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2022 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 PSOC MLME structure
  19. */
  20. #ifndef _WLAN_PSOC_MLME_H_
  21. #define _WLAN_PSOC_MLME_H_
  22. #include <wlan_ext_mlme_obj_types.h>
  23. #include <wlan_vdev_mgr_tgt_if_rx_defs.h>
  24. #include <qdf_timer.h>
  25. #include <wlan_cm_bss_score_param.h>
  26. #ifdef FEATURE_VDEV_OPS_WAKELOCK
  27. #include <target_if_psoc_wake_lock.h>
  28. #endif
  29. /* Max RNR size given max vaps are 16 */
  30. #define MAX_RNR_SIZE (16 * 16 /* 11be compatible tbtt_info length */ \
  31. + 4 /* Neighbor AP info field length */ \
  32. + 2 /* RNR header bytes */)
  33. /**
  34. * struct wlan_rnr_global_cache - RNR cache buffer per soc
  35. * @rnr_buf: RNR cache buffer
  36. * @rnr_cnt: Count of APs in cache
  37. * @rnr_size: Size of RNR cache (RNR IE)
  38. */
  39. struct wlan_6ghz_rnr_global_cache {
  40. char rnr_buf[MAX_RNR_SIZE];
  41. int rnr_cnt;
  42. uint16_t rnr_size;
  43. };
  44. /**
  45. * struct psoc_phy_config - psoc phy caps
  46. * @vdev_nss_24g: Number of NSS the device support in 2.4Ghz
  47. * @vdev_nss_5g: Number of NSS the device support in 5Ghz
  48. * @ht_cap: If dev is configured as HT capable
  49. * @vht_cap:If dev is configured as VHT capable
  50. * @he_cap: If dev is configured as HE capable
  51. * @eht_cap: If dev is configured as EHT capable
  52. * @vht_24G_cap:If dev is configured as VHT capable for 2.4Ghz
  53. * @beamformee_cap:If dev is configured as BF capable
  54. * @bw_above_20_5ghz: BW greater than 20Mhz supported for 5Ghz
  55. * @bw_above_20_24ghz: BW greater than 20Mhz supported for 2.4Ghz
  56. * @max_chan_switch_ie: If max channel switch IE is supported
  57. */
  58. struct psoc_phy_config {
  59. uint8_t vdev_nss_24g;
  60. uint8_t vdev_nss_5g;
  61. uint32_t ht_cap:1,
  62. vht_cap:1,
  63. he_cap:1,
  64. eht_cap:1,
  65. vht_24G_cap:1,
  66. beamformee_cap:1,
  67. bw_above_20_5ghz:1,
  68. bw_above_20_24ghz:1,
  69. max_chan_switch_ie:1;
  70. };
  71. /**
  72. * struct psoc_config - psoc level configs
  73. * @score_config: BSS scoring related config
  74. * @phy_config: Psoc Phy config
  75. */
  76. struct psoc_config {
  77. struct scoring_cfg score_config;
  78. struct psoc_phy_config phy_config;
  79. };
  80. /**
  81. * struct psoc_mlme_obj - PSoC MLME component object
  82. * @psoc: PSoC object
  83. * @ext_psoc_ptr: PSoC legacy pointer
  84. * @psoc_vdev_rt: PSoC Vdev response timer
  85. * @psoc_mlme_wakelock: Wakelock to prevent system going to suspend
  86. * @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format
  87. * @psoc_cfg: Psoc level configs
  88. */
  89. struct psoc_mlme_obj {
  90. struct wlan_objmgr_psoc *psoc;
  91. mlme_psoc_ext_t *ext_psoc_ptr;
  92. struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS];
  93. #ifdef FEATURE_VDEV_OPS_WAKELOCK
  94. struct psoc_mlme_wakelock psoc_mlme_wakelock;
  95. #endif
  96. struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache[WLAN_UMAC_MAX_PDEVS];
  97. struct psoc_config psoc_cfg;
  98. };
  99. #endif