1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any 6*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above 7*5113495bSYour Name * copyright notice and this permission notice appear in all copies. 8*5113495bSYour Name * 9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*5113495bSYour Name */ 17*5113495bSYour Name 18*5113495bSYour Name /** 19*5113495bSYour Name * DOC: Define PSOC MLME structure 20*5113495bSYour Name */ 21*5113495bSYour Name #ifndef _WLAN_PSOC_MLME_H_ 22*5113495bSYour Name #define _WLAN_PSOC_MLME_H_ 23*5113495bSYour Name 24*5113495bSYour Name #include <wlan_ext_mlme_obj_types.h> 25*5113495bSYour Name #include <wlan_vdev_mgr_tgt_if_rx_defs.h> 26*5113495bSYour Name #include <qdf_timer.h> 27*5113495bSYour Name #include <wlan_cm_bss_score_param.h> 28*5113495bSYour Name #ifdef FEATURE_VDEV_OPS_WAKELOCK 29*5113495bSYour Name #include <target_if_psoc_wake_lock.h> 30*5113495bSYour Name #endif 31*5113495bSYour Name 32*5113495bSYour Name /* Max RNR size given max vaps are 16 */ 33*5113495bSYour Name #define MAX_RNR_SIZE (16 * 16 /* 11be compatible tbtt_info length */ \ 34*5113495bSYour Name + 4 /* Neighbor AP info field length */ \ 35*5113495bSYour Name + 2 /* RNR header bytes */) 36*5113495bSYour Name 37*5113495bSYour Name /** 38*5113495bSYour Name * struct wlan_6ghz_rnr_global_cache - 6 GHz RNR cache buffer per soc 39*5113495bSYour Name * @rnr_buf: RNR cache buffer 40*5113495bSYour Name * @rnr_cnt: Count of APs in cache 41*5113495bSYour Name * @rnr_size: Size of RNR cache (RNR IE) 42*5113495bSYour Name */ 43*5113495bSYour Name struct wlan_6ghz_rnr_global_cache { 44*5113495bSYour Name char rnr_buf[MAX_RNR_SIZE]; 45*5113495bSYour Name int rnr_cnt; 46*5113495bSYour Name uint16_t rnr_size; 47*5113495bSYour Name }; 48*5113495bSYour Name 49*5113495bSYour Name /** 50*5113495bSYour Name * struct psoc_phy_config - psoc phy caps 51*5113495bSYour Name * @vdev_nss_24g: Number of NSS the device support in 2.4Ghz 52*5113495bSYour Name * @vdev_nss_5g: Number of NSS the device support in 5Ghz 53*5113495bSYour Name * @ht_cap: If dev is configured as HT capable 54*5113495bSYour Name * @vht_cap:If dev is configured as VHT capable 55*5113495bSYour Name * @he_cap: If dev is configured as HE capable 56*5113495bSYour Name * @eht_cap: If dev is configured as EHT capable 57*5113495bSYour Name * @vht_24G_cap:If dev is configured as VHT capable for 2.4Ghz 58*5113495bSYour Name * @beamformee_cap:If dev is configured as BF capable 59*5113495bSYour Name * @bw_above_20_5ghz: BW greater than 20Mhz supported for 5Ghz 60*5113495bSYour Name * @bw_above_20_24ghz: BW greater than 20Mhz supported for 2.4Ghz 61*5113495bSYour Name * @max_chan_switch_ie: If max channel switch IE is supported 62*5113495bSYour Name */ 63*5113495bSYour Name struct psoc_phy_config { 64*5113495bSYour Name uint8_t vdev_nss_24g; 65*5113495bSYour Name uint8_t vdev_nss_5g; 66*5113495bSYour Name uint32_t ht_cap:1, 67*5113495bSYour Name vht_cap:1, 68*5113495bSYour Name he_cap:1, 69*5113495bSYour Name eht_cap:1, 70*5113495bSYour Name vht_24G_cap:1, 71*5113495bSYour Name beamformee_cap:1, 72*5113495bSYour Name bw_above_20_5ghz:1, 73*5113495bSYour Name bw_above_20_24ghz:1, 74*5113495bSYour Name max_chan_switch_ie:1; 75*5113495bSYour Name }; 76*5113495bSYour Name 77*5113495bSYour Name /** 78*5113495bSYour Name * struct psoc_mlo_config - psoc mlo config 79*5113495bSYour Name * @reconfig_reassoc_en: If reassoc on ML reconfig AP addition is enabled 80*5113495bSYour Name */ 81*5113495bSYour Name struct psoc_mlo_config { 82*5113495bSYour Name uint8_t reconfig_reassoc_en; 83*5113495bSYour Name }; 84*5113495bSYour Name 85*5113495bSYour Name /** 86*5113495bSYour Name * struct psoc_config - psoc level configs 87*5113495bSYour Name * @score_config: BSS scoring related config 88*5113495bSYour Name * @phy_config: Psoc Phy config 89*5113495bSYour Name * @mlo_config: Psoc mlo config 90*5113495bSYour Name */ 91*5113495bSYour Name struct psoc_config { 92*5113495bSYour Name struct scoring_cfg score_config; 93*5113495bSYour Name struct psoc_phy_config phy_config; 94*5113495bSYour Name struct psoc_mlo_config mlo_config; 95*5113495bSYour Name }; 96*5113495bSYour Name 97*5113495bSYour Name #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 98*5113495bSYour Name /** 99*5113495bSYour Name * enum wlan_peer_tbl_trans_entry_flags - Peer table transition flags 100*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_CREATE: Peer table modify due to create 101*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_DESTROY: Peer table modify due to destroy 102*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_CONNECT: Peer table modify during connect 103*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_DISCONNECT: Peer table modify during disconnect 104*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_ROAM: Peer table modify during roaming 105*5113495bSYour Name * @WLAN_PEER_TBL_TRANS_LINK_SWITCH: Peer table modify during link switch 106*5113495bSYour Name */ 107*5113495bSYour Name enum wlan_peer_tbl_trans_entry_flags { 108*5113495bSYour Name WLAN_PEER_TBL_TRANS_CREATE = BIT(0), 109*5113495bSYour Name WLAN_PEER_TBL_TRANS_DESTROY = BIT(1), 110*5113495bSYour Name WLAN_PEER_TBL_TRANS_CONNECT = BIT(2), 111*5113495bSYour Name WLAN_PEER_TBL_TRANS_DISCONNECT = BIT(3), 112*5113495bSYour Name WLAN_PEER_TBL_TRANS_ROAM = BIT(4), 113*5113495bSYour Name WLAN_PEER_TBL_TRANS_LINK_SWITCH = BIT(5), 114*5113495bSYour Name }; 115*5113495bSYour Name 116*5113495bSYour Name /** 117*5113495bSYour Name * struct wlan_peer_tbl_trans_entry - Peer transition history node 118*5113495bSYour Name * @node: Node of the entry 119*5113495bSYour Name * @ts: Timestamp of peer table modify 120*5113495bSYour Name * @vdev_id: Peer's vdev's ID 121*5113495bSYour Name * @opmode: Peer's VDEV opmode 122*5113495bSYour Name * @is_mlo: %true if peer's VDEV MLO else %false 123*5113495bSYour Name * @is_mlo_link: %true if peer's VDEV mlo link, else %false 124*5113495bSYour Name * @is_primary: %true if this peer is primary 125*5113495bSYour Name * @is_first_link: %true if this peer is the first link, else %false 126*5113495bSYour Name * @auth_status: Status of auth from FW roam sync 127*5113495bSYour Name * @num_roam_links: Count of roamed link from FW roam sync 128*5113495bSYour Name * @peer_addr: MAC address of peer 129*5113495bSYour Name * @peer_mld_addr: MLD address of peer 130*5113495bSYour Name * @peer_flags: Peer flags from enum wlan_peer_tbl_trans_entry_flags 131*5113495bSYour Name */ 132*5113495bSYour Name struct wlan_peer_tbl_trans_entry { 133*5113495bSYour Name qdf_list_node_t node; 134*5113495bSYour Name qdf_time_t ts; 135*5113495bSYour Name uint8_t vdev_id; 136*5113495bSYour Name enum QDF_OPMODE opmode; 137*5113495bSYour Name uint8_t is_mlo:1, 138*5113495bSYour Name is_mlo_link:1, 139*5113495bSYour Name is_primary:1, 140*5113495bSYour Name is_first_link:1, 141*5113495bSYour Name auth_status:2, 142*5113495bSYour Name num_roam_links:2; 143*5113495bSYour Name struct qdf_mac_addr peer_addr; 144*5113495bSYour Name struct qdf_mac_addr peer_mld_addr; 145*5113495bSYour Name unsigned long peer_flags; 146*5113495bSYour Name }; 147*5113495bSYour Name #endif 148*5113495bSYour Name 149*5113495bSYour Name /** 150*5113495bSYour Name * struct psoc_mlme_obj - PSoC MLME component object 151*5113495bSYour Name * @psoc: PSoC object 152*5113495bSYour Name * @ext_psoc_ptr: PSoC legacy pointer 153*5113495bSYour Name * @psoc_vdev_rt: PSoC Vdev response timer 154*5113495bSYour Name * @psoc_mlme_wakelock: Wakelock to prevent system going to suspend 155*5113495bSYour Name * @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format 156*5113495bSYour Name * @rnr_6ghz_cache_legacy: Legacy (13TBTT) cache of 6Ghz vap in RNR ie format 157*5113495bSYour Name * @psoc_cfg: Psoc level configs 158*5113495bSYour Name * @peer_history_list: Peer table transition history 159*5113495bSYour Name */ 160*5113495bSYour Name struct psoc_mlme_obj { 161*5113495bSYour Name struct wlan_objmgr_psoc *psoc; 162*5113495bSYour Name mlme_psoc_ext_t *ext_psoc_ptr; 163*5113495bSYour Name struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS]; 164*5113495bSYour Name #ifdef FEATURE_VDEV_OPS_WAKELOCK 165*5113495bSYour Name struct psoc_mlme_wakelock psoc_mlme_wakelock; 166*5113495bSYour Name #endif 167*5113495bSYour Name struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache[WLAN_UMAC_MAX_PDEVS]; 168*5113495bSYour Name struct wlan_6ghz_rnr_global_cache rnr_6ghz_cache_legacy[WLAN_UMAC_MAX_PDEVS]; 169*5113495bSYour Name struct psoc_config psoc_cfg; 170*5113495bSYour Name #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 171*5113495bSYour Name qdf_list_t peer_history_list; 172*5113495bSYour Name #endif 173*5113495bSYour Name }; 174*5113495bSYour Name 175*5113495bSYour Name #endif 176