wlan_psoc_mlme.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright (c) 2019-2020 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. /* Max RNR size given max vaps are 16 */
  26. #define MAX_RNR_SIZE 256
  27. /**
  28. * struct wlan_rnr_global_cache - RNR cache buffer per soc
  29. * @rnr_buf: RNR cache buffer
  30. * @rnr_cnt: Count of APs in cache
  31. * @rnr_size: Size of RNR cache (RNR IE)
  32. */
  33. struct wlan_6ghz_rnr_global_cache {
  34. char rnr_buf[MAX_RNR_SIZE];
  35. int rnr_cnt;
  36. uint16_t rnr_size;
  37. };
  38. /**
  39. * struct psoc_phy_config - psoc phy caps
  40. * @vdev_nss_24g: Number of NSS the device support in 2.4Ghz
  41. * @vdev_nss_5g: Number of NSS the device support in 5Ghz
  42. * @ht_cap: If dev is configured as HT capable
  43. * @vht_cap:If dev is configured as VHT capable
  44. * @he_cap: If dev is configured as HE capable
  45. * @vht_24G_cap:If dev is configured as VHT capable for 2.4Ghz
  46. * @beamformee_cap:If dev is configured as BF capable
  47. * @bw_above_20_5ghz: BW greater than 20Mhz supprted for 5Ghz
  48. * @bw_above_20_24ghz: BW greater than 20Mhz supprted for 2.4Ghz
  49. */
  50. struct psoc_phy_config {
  51. uint8_t vdev_nss_24g;
  52. uint8_t vdev_nss_5g;
  53. uint32_t ht_cap:1,
  54. vht_cap:1,
  55. he_cap:1,
  56. vht_24G_cap:1,
  57. beamformee_cap:1,
  58. bw_above_20_5ghz:1,
  59. bw_above_20_24ghz:1;
  60. };
  61. /**
  62. * struct psoc_config - psoc level configs
  63. * @score_config: BSS scoring related config
  64. * @phy_config: Psoc Phy config
  65. */
  66. struct psoc_config {
  67. struct scoring_cfg score_config;
  68. struct psoc_phy_config phy_config;
  69. };
  70. /**
  71. * struct psoc_mlme_obj - PSoC MLME component object
  72. * @psoc: PSoC object
  73. * @ext_psoc_ptr: PSoC legacy pointer
  74. * @psoc_vdev_rt: PSoC Vdev response timer
  75. * @psoc_mlme_wakelock: Wakelock to prevent system going to suspend
  76. * @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format
  77. * @psoc_cfg: Psoc level configs
  78. */
  79. struct psoc_mlme_obj {
  80. struct wlan_objmgr_psoc *psoc;
  81. mlme_psoc_ext_t *ext_psoc_ptr;
  82. struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS];
  83. #ifdef FEATURE_VDEV_RSP_WAKELOCK
  84. struct psoc_mlme_wakelock psoc_mlme_wakelock;
  85. #endif
  86. struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache;
  87. struct psoc_config psoc_cfg;
  88. };
  89. #endif