wlan_psoc_mlme.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC: Define PSOC MLME structure
  18. */
  19. #ifndef _WLAN_PSOC_MLME_H_
  20. #define _WLAN_PSOC_MLME_H_
  21. #include <wlan_ext_mlme_obj_types.h>
  22. #include <wlan_vdev_mgr_tgt_if_rx_defs.h>
  23. #include <qdf_timer.h>
  24. #include <wlan_cm_bss_score_param.h>
  25. #ifdef FEATURE_VDEV_OPS_WAKELOCK
  26. #include <target_if_psoc_wake_lock.h>
  27. #endif
  28. /* Max RNR size given max vaps are 16 */
  29. #define MAX_RNR_SIZE 256
  30. /**
  31. * struct wlan_rnr_global_cache - RNR cache buffer per soc
  32. * @rnr_buf: RNR cache buffer
  33. * @rnr_cnt: Count of APs in cache
  34. * @rnr_size: Size of RNR cache (RNR IE)
  35. */
  36. struct wlan_6ghz_rnr_global_cache {
  37. char rnr_buf[MAX_RNR_SIZE];
  38. int rnr_cnt;
  39. uint16_t rnr_size;
  40. };
  41. /**
  42. * struct psoc_phy_config - psoc phy caps
  43. * @vdev_nss_24g: Number of NSS the device support in 2.4Ghz
  44. * @vdev_nss_5g: Number of NSS the device support in 5Ghz
  45. * @ht_cap: If dev is configured as HT capable
  46. * @vht_cap:If dev is configured as VHT capable
  47. * @he_cap: If dev is configured as HE capable
  48. * @eht_cap: If dev is configured as EHT capable
  49. * @vht_24G_cap:If dev is configured as VHT capable for 2.4Ghz
  50. * @beamformee_cap:If dev is configured as BF capable
  51. * @bw_above_20_5ghz: BW greater than 20Mhz supprted for 5Ghz
  52. * @bw_above_20_24ghz: BW greater than 20Mhz supprted for 2.4Ghz
  53. */
  54. struct psoc_phy_config {
  55. uint8_t vdev_nss_24g;
  56. uint8_t vdev_nss_5g;
  57. uint32_t ht_cap:1,
  58. vht_cap:1,
  59. he_cap:1,
  60. eht_cap:1,
  61. vht_24G_cap:1,
  62. beamformee_cap:1,
  63. bw_above_20_5ghz:1,
  64. bw_above_20_24ghz:1;
  65. };
  66. /**
  67. * struct psoc_config - psoc level configs
  68. * @score_config: BSS scoring related config
  69. * @phy_config: Psoc Phy config
  70. */
  71. struct psoc_config {
  72. struct scoring_cfg score_config;
  73. struct psoc_phy_config phy_config;
  74. };
  75. /**
  76. * struct psoc_mlme_obj - PSoC MLME component object
  77. * @psoc: PSoC object
  78. * @ext_psoc_ptr: PSoC legacy pointer
  79. * @psoc_vdev_rt: PSoC Vdev response timer
  80. * @psoc_mlme_wakelock: Wakelock to prevent system going to suspend
  81. * @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format
  82. * @psoc_cfg: Psoc level configs
  83. */
  84. struct psoc_mlme_obj {
  85. struct wlan_objmgr_psoc *psoc;
  86. mlme_psoc_ext_t *ext_psoc_ptr;
  87. struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS];
  88. #ifdef FEATURE_VDEV_OPS_WAKELOCK
  89. struct psoc_mlme_wakelock psoc_mlme_wakelock;
  90. #endif
  91. struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache;
  92. struct psoc_config psoc_cfg;
  93. };
  94. #endif