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