wlan_psoc_mlme.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. * @max_chan_switch_ie: If max channel switch IE is supported
  54. */
  55. struct psoc_phy_config {
  56. uint8_t vdev_nss_24g;
  57. uint8_t vdev_nss_5g;
  58. uint32_t ht_cap:1,
  59. vht_cap:1,
  60. he_cap:1,
  61. eht_cap:1,
  62. vht_24G_cap:1,
  63. beamformee_cap:1,
  64. bw_above_20_5ghz:1,
  65. bw_above_20_24ghz:1,
  66. max_chan_switch_ie:1;
  67. };
  68. /**
  69. * struct psoc_config - psoc level configs
  70. * @score_config: BSS scoring related config
  71. * @phy_config: Psoc Phy config
  72. */
  73. struct psoc_config {
  74. struct scoring_cfg score_config;
  75. struct psoc_phy_config phy_config;
  76. };
  77. /**
  78. * struct psoc_mlme_obj - PSoC MLME component object
  79. * @psoc: PSoC object
  80. * @ext_psoc_ptr: PSoC legacy pointer
  81. * @psoc_vdev_rt: PSoC Vdev response timer
  82. * @psoc_mlme_wakelock: Wakelock to prevent system going to suspend
  83. * @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format
  84. * @psoc_cfg: Psoc level configs
  85. */
  86. struct psoc_mlme_obj {
  87. struct wlan_objmgr_psoc *psoc;
  88. mlme_psoc_ext_t *ext_psoc_ptr;
  89. struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS];
  90. #ifdef FEATURE_VDEV_OPS_WAKELOCK
  91. struct psoc_mlme_wakelock psoc_mlme_wakelock;
  92. #endif
  93. struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache;
  94. struct psoc_config psoc_cfg;
  95. };
  96. #endif