1 /* 2 * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: wlan_vdev_mgr_tgt_if_tx_defs.h 22 * 23 * This file provides definitions to data structures required for vdev Tx ops 24 */ 25 26 #ifndef __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ 27 #define __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ 28 29 #include <qdf_nbuf.h> 30 #ifdef WLAN_FEATURE_11BE_MLO 31 #include <wlan_mlo_mgr_public_structs.h> 32 #endif 33 #include <wlan_mlme_dbg.h> 34 35 /* slot time long */ 36 #define WLAN_MLME_VDEV_SLOT_TIME_LONG 0x1 37 /* slot time short */ 38 #define WLAN_MLME_VDEV_SLOT_TIME_SHORT 0x2 39 40 #define WLAN_MU_SNIF_MAX_AIDS 4 41 42 /** 43 * enum mlme_dev_setparam - type of set params pdev/vdev 44 * @MLME_PDEV_SETPARAM: pdev param 45 * @MLME_VDEV_SETPARAM: vdev param 46 */ 47 enum mlme_dev_setparam { 48 MLME_PDEV_SETPARAM = 0, 49 MLME_VDEV_SETPARAM, 50 }; 51 52 #ifdef WLAN_BCN_RATECODE_ENABLE 53 /** 54 * enum mlme_bcn_tx_rate_code - beacon tx rate code 55 * @MLME_BCN_TX_RATE_CODE_1_M: 56 * @MLME_BCN_TX_RATE_CODE_2_M: 57 * @MLME_BCN_TX_RATE_CODE_5_5_M: 58 * @MLME_BCN_TX_RATE_CODE_6_M: 59 * @MLME_BCN_TX_RATE_CODE_9_M: 60 * @MLME_BCN_TX_RATE_CODE_11M: 61 * @MLME_BCN_TX_RATE_CODE_12_M: 62 * @MLME_BCN_TX_RATE_CODE_18_M: 63 * @MLME_BCN_TX_RATE_CODE_24_M: 64 * @MLME_BCN_TX_RATE_CODE_36_M: 65 * @MLME_BCN_TX_RATE_CODE_48_M: 66 * @MLME_BCN_TX_RATE_CODE_54_M: 67 */ 68 enum mlme_bcn_tx_rate_code { 69 MLME_BCN_TX_RATE_CODE_1_M = 0x83, 70 MLME_BCN_TX_RATE_CODE_2_M = 0x82, 71 MLME_BCN_TX_RATE_CODE_5_5_M = 0x81, 72 MLME_BCN_TX_RATE_CODE_6_M = 0x03, 73 MLME_BCN_TX_RATE_CODE_9_M = 0x07, 74 MLME_BCN_TX_RATE_CODE_11M = 0x80, 75 MLME_BCN_TX_RATE_CODE_12_M = 0x02, 76 MLME_BCN_TX_RATE_CODE_18_M = 0x06, 77 MLME_BCN_TX_RATE_CODE_24_M = 0x01, 78 MLME_BCN_TX_RATE_CODE_36_M = 0x05, 79 MLME_BCN_TX_RATE_CODE_48_M = 0x00, 80 MLME_BCN_TX_RATE_CODE_54_M = 0x04, 81 }; 82 #else 83 enum mlme_bcn_tx_rate_code { 84 MLME_BCN_TX_RATE_CODE_1_M = 0x43, 85 MLME_BCN_TX_RATE_CODE_2_M = 0x42, 86 MLME_BCN_TX_RATE_CODE_5_5_M = 0x41, 87 MLME_BCN_TX_RATE_CODE_6_M = 0x03, 88 MLME_BCN_TX_RATE_CODE_9_M = 0x07, 89 MLME_BCN_TX_RATE_CODE_11M = 0x40, 90 MLME_BCN_TX_RATE_CODE_12_M = 0x02, 91 MLME_BCN_TX_RATE_CODE_18_M = 0x06, 92 MLME_BCN_TX_RATE_CODE_24_M = 0x01, 93 MLME_BCN_TX_RATE_CODE_36_M = 0x05, 94 MLME_BCN_TX_RATE_CODE_48_M = 0x00, 95 MLME_BCN_TX_RATE_CODE_54_M = 0x04, 96 }; 97 #endif 98 99 /** 100 * enum wlan_mlme_host_sta_ps_param_uapsd - STA UPASD params 101 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN: 102 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN: 103 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN: 104 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN: 105 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN: 106 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN: 107 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN: 108 * @WLAN_MLME_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN: 109 */ 110 enum wlan_mlme_host_sta_ps_param_uapsd { 111 WLAN_MLME_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), 112 WLAN_MLME_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), 113 WLAN_MLME_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), 114 WLAN_MLME_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), 115 WLAN_MLME_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), 116 WLAN_MLME_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), 117 WLAN_MLME_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), 118 WLAN_MLME_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), 119 }; 120 121 /** 122 * enum wlan_mlme_host_vdev_start_status - vdev start status code 123 * @WLAN_MLME_HOST_VDEV_START_OK: 124 * @WLAN_MLME_HOST_VDEV_START_CHAN_INVALID: 125 * @WLAN_MLME_HOST_VDEV_START_CHAN_BLOCKED: 126 * @WLAN_MLME_HOST_VDEV_START_CHAN_DFS_VIOLATION: 127 * @WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_REGDOMAIN: 128 * @WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_BAND: 129 * @WLAN_MLME_HOST_VDEV_START_TIMEOUT: 130 * @WLAN_MLME_HOST_VDEV_START_TX_VAP_CFG_INVALID: 131 * @WLAN_MLME_HOST_VDEV_START_MAX_REASON: Max enumeration 132 */ 133 enum wlan_mlme_host_vdev_start_status { 134 WLAN_MLME_HOST_VDEV_START_OK = 0, 135 WLAN_MLME_HOST_VDEV_START_CHAN_INVALID, 136 WLAN_MLME_HOST_VDEV_START_CHAN_BLOCKED, 137 WLAN_MLME_HOST_VDEV_START_CHAN_DFS_VIOLATION, 138 WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_REGDOMAIN, 139 WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_BAND, 140 WLAN_MLME_HOST_VDEV_START_TIMEOUT, 141 WLAN_MLME_HOST_VDEV_START_TX_VAP_CFG_INVALID, 142 /* Add new response status code from here */ 143 WLAN_MLME_HOST_VDEV_START_MAX_REASON, 144 }; 145 146 /** 147 * string_from_start_rsp_status() - Convert start response status to string 148 * @start_rsp: start response status 149 * 150 * Please note to add new string in the array at index equal to 151 * its enum value in wlan_mlme_host_vdev_start_status. 152 */ 153 static inline char *string_from_start_rsp_status( 154 enum wlan_mlme_host_vdev_start_status start_rsp) 155 { 156 static const char *strings[] = { "START_OK", 157 "CHAN_INVALID", 158 "CHAN_BLOCKED", 159 "CHAN_DFS_VIOLATION", 160 "CHAN_INVALID_REGDOMAIN", 161 "CHAN_INVALID_BAND", 162 "START_RESPONSE_TIMEOUT", 163 "TX_VAP_CONFIG_INVALID", 164 "START_RESPONSE_UNKNOWN"}; 165 166 if (start_rsp >= WLAN_MLME_HOST_VDEV_START_MAX_REASON) 167 start_rsp = WLAN_MLME_HOST_VDEV_START_MAX_REASON; 168 169 return (char *)strings[start_rsp]; 170 } 171 172 /** 173 * enum wlan_mlme_host_start_event_param - start/restart resp event 174 * @WLAN_MLME_HOST_VDEV_START_RESP_EVENT: Start response 175 * @WLAN_MLME_HOST_VDEV_RESTART_RESP_EVENT: Restart response 176 */ 177 enum wlan_mlme_host_start_event_param { 178 WLAN_MLME_HOST_VDEV_START_RESP_EVENT = 0, 179 WLAN_MLME_HOST_VDEV_RESTART_RESP_EVENT, 180 }; 181 182 /** 183 * enum wlan_mlme_custom_aggr_type: custom aggregate type 184 * @WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation 185 * @WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation 186 * @WLAN_MLME_CUSTOM_AGGR_TYPE_MAX: Max type 187 */ 188 enum wlan_mlme_custom_aggr_type { 189 WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU = 0, 190 WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU = 1, 191 WLAN_MLME_CUSTOM_AGGR_TYPE_MAX, 192 }; 193 194 /** 195 * struct sta_ps_params - sta ps cmd parameter 196 * @vdev_id: vdev id 197 * @param_id: sta ps parameter 198 * @value: sta ps parameter value 199 */ 200 struct sta_ps_params { 201 uint32_t vdev_id; 202 uint32_t param_id; 203 uint32_t value; 204 }; 205 206 /** 207 * struct rnr_bss_tbtt_info_param: Reported Vdev info 208 * @bss_mac: Mac address 209 * @beacon_intval: Beacon interval of reported AP 210 * @opclass: Channel Opclass 211 * @chan_idx: Channel number 212 * @next_qtime_tbtt_high: Tbtt higher 32bit 213 * @next_qtime_tbtt_low: Tbtt lower 32bit 214 */ 215 struct rnr_bss_tbtt_info_param { 216 uint8_t bss_mac[QDF_MAC_ADDR_SIZE]; 217 uint32_t beacon_intval; 218 uint32_t opclass; 219 uint32_t chan_idx; 220 uint32_t next_qtime_tbtt_high; 221 uint32_t next_qtime_tbtt_low; 222 }; 223 224 /** 225 * struct rnr_tbtt_multisoc_sync_param - Params to 226 * sync tbtt with non self SoCs timers 227 * @pdev_id: Host pdev_id 228 * @rnr_vap_count: Count of Vap to be included in WMI cmd 229 * @cmd_type: Set/Get tbtt sync info 230 * @rnr_bss_tbtt: Reported AP Vap info 231 */ 232 struct rnr_tbtt_multisoc_sync_param { 233 uint32_t pdev_id; 234 uint8_t rnr_vap_count; 235 uint8_t cmd_type; 236 struct rnr_bss_tbtt_info_param *rnr_bss_tbtt; 237 }; 238 239 /** 240 * struct tbttoffset_params - Tbttoffset event params 241 * @vdev_id: Virtual AP device identifier 242 * @tbttoffset : Tbttoffset for the virtual AP device 243 * @vdev_tbtt_qtime_lo: Tbtt qtime low value 244 * @vdev_tbtt_qtime_hi: Tbtt qtime high value 245 */ 246 struct tbttoffset_params { 247 uint32_t vdev_id; 248 uint32_t tbttoffset; 249 uint32_t vdev_tbtt_qtime_lo; 250 uint32_t vdev_tbtt_qtime_hi; 251 }; 252 253 /* Follow bitmap for sending the CSA switch count event */ 254 #define WLAN_CSA_EVENT_BMAP_VALID_MASK 0X80000000 255 /* Send only when the switch count becomes zero, added for backward 256 * compatibility same can also be achieved by setting bitmap to 0X80000001. 257 */ 258 #define WLAN_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 259 /* Send CSA switch count event for every update to switch count */ 260 #define WLAN_CSA_EVENT_BMAP_ALL 0XFFFFFFFF 261 262 #ifdef WLAN_FEATURE_11BE_MLO 263 /** 264 * struct ml_bcn_partner_info - Partner link beacon information 265 * @vdev_id: Vdev id 266 * @hw_link_id: Unique hw link id across SoCs 267 * @beacon_interval: Beacon interval 268 * @csa_switch_count_offset: CSA switch count offset in beacon frame 269 * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame 270 * @per_sta_profile_offset: Pointer to per-STA profile info 271 * @quiet_ie_offset: Quiet IE offset 272 * @is_other_ie_present: Set true if other IEs are present in per-STA profile. 273 * If the flag is set to false, FW will remove per-STA 274 * profile IE when Quiet count reaches to 0. 275 */ 276 struct ml_bcn_partner_info { 277 uint32_t vdev_id; 278 uint32_t hw_link_id; 279 uint32_t beacon_interval; 280 uint32_t csa_switch_count_offset; 281 uint32_t ext_csa_switch_count_offset; 282 uint32_t per_sta_profile_offset; 283 uint32_t quiet_ie_offset; 284 uint32_t is_other_ie_present; 285 }; 286 287 /** 288 * struct mlo_bcn_templ_partner_links - ML partner links 289 * @num_links: Number of links 290 * @partner_info: Partner link info 291 */ 292 struct mlo_bcn_templ_partner_links { 293 uint8_t num_links; 294 struct ml_bcn_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS]; 295 }; 296 297 /** 298 * struct mlo_bcn_tmpl_ml_info - Impacted link critical update information 299 * @hw_link_id: Unique hw link id across SoCs 300 * CU vdev map for the Critical update category-1 (Inclusion of CU IES) 301 * @cu_vdev_map_cat1_lo: bits 31:0 to represent vdev ids 0 to 31 302 * @cu_vdev_map_cat1_hi: bits 63:32 to represent vdev ids 32 to 63 303 * CU vdev map for the Critical update category-2 (modification of CU IES) 304 * @cu_vdev_map_cat2_lo: bits 31:0 to represent vdev ids 0 to 31 305 * @cu_vdev_map_cat2_hi: bits 63:32 to represent vdev ids 32 to 63 306 */ 307 struct mlo_bcn_tmpl_ml_info { 308 uint32_t hw_link_id; 309 uint32_t cu_vdev_map_cat1_lo; 310 uint32_t cu_vdev_map_cat1_hi; 311 uint32_t cu_vdev_map_cat2_lo; 312 uint32_t cu_vdev_map_cat2_hi; 313 }; 314 #endif 315 316 /** 317 * struct beacon_tmpl_params - beacon template cmd parameter 318 * @vdev_id: vdev id 319 * @tim_ie_offset: tim ie offset 320 * @mbssid_ie_offset: mbssid ie offset 321 * @tmpl_len: beacon template length 322 * @tmpl_len_aligned: beacon template alignment 323 * @csa_switch_count_offset: CSA switch count offset in beacon frame 324 * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame 325 * @esp_ie_offset: ESP IE offset in beacon frame 326 * @mu_edca_ie_offset: Mu EDCA IE offset in beacon frame 327 * @ema_params: The 4 octets in this field respectively indicate 328 * ema_beacon_profile_periodicity, ema_beacon_tmpl_idx, 329 * ema_first_tmpl and ema_last_tmpl in the order of low 330 * to high 331 * @csa_event_bitmap: Specify when to send the CSA switch count status from FW 332 * to host. Example: if CSA switch count event is needed to be sent when the 333 * switch count is 0, 1, 4, and 5, set the bitmap to (0X80000033) 334 * @enable_bigtk: enable bigtk or not 335 * @frm: beacon template parameter 336 * @mlo_partner: Partner link information 337 * @cu_ml_info: Impacted link critical update information 338 */ 339 struct beacon_tmpl_params { 340 uint8_t vdev_id; 341 uint32_t tim_ie_offset; 342 uint32_t mbssid_ie_offset; 343 uint32_t tmpl_len; 344 uint32_t tmpl_len_aligned; 345 uint32_t csa_switch_count_offset; 346 uint32_t ext_csa_switch_count_offset; 347 uint32_t esp_ie_offset; 348 uint32_t mu_edca_ie_offset; 349 uint32_t ema_params; 350 uint32_t csa_event_bitmap; 351 bool enable_bigtk; 352 uint8_t *frm; 353 #ifdef WLAN_FEATURE_11BE_MLO 354 struct mlo_bcn_templ_partner_links mlo_partner; 355 struct mlo_bcn_tmpl_ml_info cu_ml_info; 356 #endif 357 }; 358 359 /** 360 * struct beacon_params - beacon cmd parameter 361 * @vdev_id: vdev id 362 * @beacon_interval: Beacon interval 363 * @wbuf: beacon buffer 364 * @frame_ctrl: frame control field 365 * @bcn_txant: beacon antenna 366 * @is_dtim_count_zero: is it dtim beacon 367 * @is_bitctl_reqd: is Bit control required 368 * @is_high_latency: Is this high latency target 369 */ 370 struct beacon_params { 371 uint8_t vdev_id; 372 uint16_t beacon_interval; 373 qdf_nbuf_t wbuf; 374 uint16_t frame_ctrl; 375 uint32_t bcn_txant; 376 bool is_dtim_count_zero; 377 bool is_bitctl_reqd; 378 bool is_high_latency; 379 }; 380 381 /* struct fils_discovery_tmpl_params - FILS Discovery template cmd parameter 382 * @vdev_id: vdev ID 383 * @tmpl_len: FILS Discovery template length 384 * @tmpl_aligned: FILS Discovery template alignment 385 * @frm: FILS Discovery template parameter 386 */ 387 struct fils_discovery_tmpl_params { 388 uint8_t vdev_id; 389 uint32_t tmpl_len; 390 uint32_t tmpl_len_aligned; 391 uint8_t *frm; 392 }; 393 394 /** 395 * struct mlme_channel_param - Channel parameters with all 396 * info required by target. 397 * @chan_id: channel id 398 * @pwr: channel power 399 * @mhz: channel frequency 400 * @half_rate: is half rate 401 * @quarter_rate: is quarter rate 402 * @dfs_set: is dfs channel 403 * @dfs_set_cfreq2: is secondary freq dfs channel 404 * @is_chan_passive: is this passive channel 405 * @allow_ht: HT allowed in chan 406 * @allow_vht: VHT allowed on chan 407 * @set_agile: is agile mode 408 * @is_stadfs_en: STA DFS enabled 409 * @phy_mode: phymode (vht80 or ht40 or ...) 410 * @cfreq1: centre frequency on primary 411 * @cfreq2: centre frequency on secondary 412 * @maxpower: max power for channel 413 * @minpower: min power for channel 414 * @maxregpower: Max regulatory power 415 * @antennamax: Max antenna 416 * @reg_class_id: Regulatory class id. 417 * @puncture_bitmap: 11be static puncture bitmap 418 */ 419 struct mlme_channel_param { 420 uint8_t chan_id; 421 uint8_t pwr; 422 uint32_t mhz; 423 uint32_t half_rate:1, 424 quarter_rate:1, 425 dfs_set:1, 426 dfs_set_cfreq2:1, 427 is_chan_passive:1, 428 allow_ht:1, 429 allow_vht:1, 430 set_agile:1, 431 is_stadfs_en:1; 432 enum wlan_phymode phy_mode; 433 uint32_t cfreq1; 434 uint32_t cfreq2; 435 int8_t maxpower; 436 int8_t minpower; 437 int8_t maxregpower; 438 uint8_t antennamax; 439 uint8_t reg_class_id; 440 #ifdef WLAN_FEATURE_11BE 441 uint16_t puncture_bitmap; 442 #endif 443 }; 444 445 /** 446 * struct vdev_mlme_mvr_param - Multiple vdev restart params 447 * @phymode: phymode information 448 * @preferred_tx_streams: preferred tx streams for VAP 449 * @preferred_rx_streams: preferred rx streams for VAP 450 */ 451 struct vdev_mlme_mvr_param { 452 uint32_t phymode; 453 uint32_t preferred_tx_streams; 454 uint32_t preferred_rx_streams; 455 }; 456 457 /** 458 * struct multiple_vdev_restart_params - Multiple vdev restart cmd parameter 459 * @pdev_id: Pdev identifier 460 * @requestor_id: Unique id identifying the module 461 * @disable_hw_ack: Flag to indicate disabling HW ACK during CAC 462 * @cac_duration_ms: CAC duration on the given channel 463 * @num_vdevs: No. of vdevs that need to be restarted 464 * @ch_param: Pointer to channel_param 465 * @vdev_ids: Pointer to array of vdev_ids 466 * @mvr_param: Pointer to array of multi vdev restart param 467 * @max_vdevs: Maximum vdev count of this pdev 468 * @mvr_bmap_enabled: flag indicating mvr-bitmap support 469 */ 470 struct multiple_vdev_restart_params { 471 uint32_t pdev_id; 472 uint32_t requestor_id; 473 uint32_t disable_hw_ack; 474 uint32_t cac_duration_ms; 475 uint32_t num_vdevs; 476 struct mlme_channel_param ch_param; 477 uint32_t *vdev_ids; 478 struct vdev_mlme_mvr_param *mvr_param; 479 uint32_t max_vdevs; 480 uint8_t mvr_bmap_enabled; 481 }; 482 483 /** 484 * struct multiple_vdev_set_param - Multiple vdev set param command parameter 485 * @pdev_id: Pdev identifier 486 * @param_id: parameter id 487 * @param_value: parameter value 488 * @num_vdevs: number of vdevs 489 * @vdev_ids: Pointer to array of vdev_ids 490 */ 491 struct multiple_vdev_set_param { 492 uint32_t pdev_id; 493 uint32_t param_id; 494 uint32_t param_value; 495 uint32_t num_vdevs; 496 uint32_t vdev_ids[WLAN_UMAC_PDEV_MAX_VDEVS]; 497 }; 498 499 /** 500 * struct peer_flush_params - peer flush cmd parameter 501 * @peer_tid_bitmap: peer tid bitmap 502 * @vdev_id: vdev id 503 * @peer_mac: peer mac address 504 */ 505 struct peer_flush_params { 506 uint32_t peer_tid_bitmap; 507 uint8_t vdev_id; 508 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 509 }; 510 511 /** 512 * struct peer_delete_cmd_params - peer delete cmd parameter 513 * @vdev_id: vdev id 514 * @hw_link_id_bitmap: logical link id bitmap for peers 515 * not getting created 516 * @is_mlo_link_switch: Is peer delete due to link switch 517 */ 518 struct peer_delete_cmd_params { 519 uint8_t vdev_id; 520 uint32_t hw_link_id_bitmap; 521 bool is_mlo_link_switch; 522 }; 523 524 /* Default FILS DISCOVERY/probe response sent in period of 20TU */ 525 #define DEFAULT_FILS_DISCOVERY_PERIOD 20 526 #define DEFAULT_PROBE_RESP_PERIOD 20 527 528 /** 529 * struct config_fils_params - FILS config params 530 * @vdev_id: vdev id 531 * @fd_period: 0 - Disabled, non-zero - Period in ms (mili seconds) 532 * @send_prb_rsp_frame: send broadcast prb resp frame 533 */ 534 struct config_fils_params { 535 uint8_t vdev_id; 536 uint32_t fd_period; 537 uint32_t send_prb_rsp_frame: 1; 538 }; 539 540 /** 541 * struct config_ratemask_params - ratemask config parameters 542 * @vdev_id: vdev id 543 * @type: Type 544 * @lower32: Lower 32 bits in the 1st 64-bit value 545 * @higher32: Higher 32 bits in the 1st 64-bit value 546 * @lower32_2: Lower 32 bits in the 2nd 64-bit value 547 * @higher32_2: Higher 32 bits in the 2nd 64-bit value 548 */ 549 struct config_ratemask_params { 550 uint8_t vdev_id; 551 uint8_t type; 552 uint32_t lower32; 553 uint32_t higher32; 554 uint32_t lower32_2; 555 uint32_t higher32_2; 556 }; 557 558 /** 559 * struct set_custom_aggr_size_params - custom aggr size params 560 * @vdev_id : vdev id 561 * @tx_aggr_size : TX aggr size 562 * @rx_aggr_size : RX aggr size 563 * @ac: 564 * @aggr_type: 565 * @tx_aggr_size_disable: 566 * @rx_aggr_size_disable: 567 * @tx_ac_enable: 568 * @aggr_ba_enable: 569 * @reserved: spare bits 570 */ 571 struct set_custom_aggr_size_params { 572 uint32_t vdev_id; 573 uint32_t tx_aggr_size; 574 uint32_t rx_aggr_size; 575 uint32_t ac:2, 576 aggr_type:1, 577 tx_aggr_size_disable:1, 578 rx_aggr_size_disable:1, 579 tx_ac_enable:1, 580 aggr_ba_enable:1, 581 reserved:25; 582 }; 583 584 /** 585 * struct sifs_trigger_param - sifs_trigger cmd parameter 586 * @vdev_id: vdev id 587 * @param_value: parameter value 588 */ 589 struct sifs_trigger_param { 590 uint32_t vdev_id; 591 uint32_t param_value; 592 }; 593 594 /** 595 * struct set_neighbour_rx_params - Neighbour RX params 596 * @vdev_id: vdev id 597 * @idx: index of param 598 * @action: action 599 * @type: Type of param 600 */ 601 struct set_neighbour_rx_params { 602 uint8_t vdev_id; 603 uint32_t idx; 604 uint32_t action; 605 uint32_t type; 606 }; 607 608 /** 609 * struct set_tx_peer_filter - Set tx peer filter 610 * @vdev_id: vdev id 611 * @idx: index of param 612 * @action: action 613 */ 614 struct set_tx_peer_filter { 615 uint8_t vdev_id; 616 uint32_t idx; 617 uint32_t action; 618 }; 619 620 /** 621 * struct vdev_scan_nac_rssi_params - NAC_RSSI cmd parameter 622 * @vdev_id: vdev id 623 * @bssid_addr: BSSID address 624 * @client_addr: client address 625 * @chan_num: channel number 626 * @action:NAC_RSSI action, 627 */ 628 struct vdev_scan_nac_rssi_params { 629 uint32_t vdev_id; 630 uint8_t bssid_addr[QDF_MAC_ADDR_SIZE]; 631 uint8_t client_addr[QDF_MAC_ADDR_SIZE]; 632 uint32_t chan_num; 633 uint32_t action; /* WMI_FILTER_NAC_RSSI_ACTION */ 634 }; 635 636 #ifdef WLAN_FEATURE_11BE_MLO 637 /** 638 * struct mlo_vdev_start_flags - MLO start flags 639 * @mlo_enabled: indicate is MLO enabled 640 * @mlo_assoc_link: indicate is the link used to initialize 641 * the association of mlo connection 642 * @mlo_mcast_vdev: MLO cast vdev 643 * @emlsr_support: indicate non AP MLD STA supports eMLSR mode 644 * @mlo_link_add: Dynamic link addition 645 * @rsvd: reserved bits 646 */ 647 struct mlo_vdev_start_flags { 648 uint32_t mlo_enabled:1, 649 mlo_assoc_link:1, 650 mlo_mcast_vdev:1, 651 emlsr_support:1, 652 mlo_link_add:1, 653 rsvd:27; 654 }; 655 656 /** 657 * struct ml_vdev_start_partner_info - partner link info 658 * @vdev_id: vdev id 659 * @hw_mld_link_id: unique hw link id across SoCs 660 * @mac_addr: Partner mac address 661 */ 662 struct ml_vdev_start_partner_info { 663 uint32_t vdev_id; 664 uint32_t hw_mld_link_id; 665 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 666 }; 667 668 /** 669 * struct mlo_vdev_start_partner_links - ML partner links 670 * @num_links: Number of links 671 * @partner_info: Partner link info 672 */ 673 struct mlo_vdev_start_partner_links { 674 uint8_t num_links; 675 #ifdef WLAN_MLO_MULTI_CHIP 676 struct ml_vdev_start_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS + WLAN_UMAC_MLO_MAX_BRIDGE_VDEVS]; 677 #else 678 struct ml_vdev_start_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS]; 679 #endif 680 }; 681 #endif 682 /** 683 * struct vdev_start_params - vdev start cmd parameter 684 * @vdev_id: vdev id 685 * @beacon_interval: beacon interval 686 * @dtim_period: dtim period 687 * @is_restart: flag to check if it is vdev 688 * @disable_hw_ack: to update disable hw ack flag 689 * @hidden_ssid: hidden ssid 690 * @pmf_enabled: pmf enabled 691 * @ssid: ssid MAC 692 * @num_noa_descriptors: number of noa descriptors 693 * @preferred_tx_streams: preferred tx streams 694 * @preferred_rx_streams: preferred rx streams 695 * @cac_duration_ms: cac duration in milliseconds 696 * @regdomain: Regulatory domain 697 * @he_ops: HE ops 698 * @eht_ops: EHT ops 699 * @channel: Channel params required by target. 700 * @bcn_tx_rate_code: Beacon tx rate code. 701 * @ldpc_rx_enabled: Enable/Disable LDPC RX for this vdev 702 * @mbssid_flags: MBSSID flags to FW 703 * @vdevid_trans: Tx VDEV ID 704 * @mlo_flags: Flags for multi-link operation 705 * @mlo_partner: Partner links for multi-link operation 706 * @mbssid_multi_group_flag: Flag to identify multi group mbssid support 707 * @mbssid_multi_group_id: Group id of current vdev 708 */ 709 struct vdev_start_params { 710 uint8_t vdev_id; 711 uint32_t beacon_interval; 712 uint32_t dtim_period; 713 bool is_restart; 714 uint32_t disable_hw_ack; 715 bool hidden_ssid; 716 bool pmf_enabled; 717 struct wlan_ssid ssid; 718 uint32_t num_noa_descriptors; 719 uint32_t preferred_rx_streams; 720 uint32_t preferred_tx_streams; 721 uint32_t cac_duration_ms; 722 uint32_t regdomain; 723 uint32_t he_ops; 724 #ifdef WLAN_FEATURE_11BE 725 uint32_t eht_ops; 726 #endif 727 struct mlme_channel_param channel; 728 enum mlme_bcn_tx_rate_code bcn_tx_rate_code; 729 bool ldpc_rx_enabled; 730 uint32_t mbssid_flags; 731 uint8_t vdevid_trans; 732 #ifdef WLAN_FEATURE_11BE_MLO 733 struct mlo_vdev_start_flags mlo_flags; 734 struct mlo_vdev_start_partner_links mlo_partner; 735 #endif 736 uint8_t mbssid_multi_group_flag; 737 uint32_t mbssid_multi_group_id; 738 }; 739 740 /** 741 * struct vdev_set_params - vdev set cmd parameter 742 * @vdev_id: vdev id 743 * @param_id: parameter id 744 * @param_value: parameter value 745 */ 746 struct vdev_set_params { 747 uint32_t vdev_id; 748 uint32_t param_id; 749 uint32_t param_value; 750 }; 751 752 /** 753 * struct dev_set_param - vdev/pdev set param info 754 * @param_id: parameter id 755 * @param_value: parameter value 756 */ 757 struct dev_set_param { 758 uint32_t param_id; 759 uint32_t param_value; 760 }; 761 762 /** 763 * struct set_multiple_pdev_vdev_param 764 * @param_type: enum of type mlme_dev_setparam 765 * @is_host_pdev_id: to indicate @dev_id holds host pdev id in case of pdev set 766 * param, need conversion to target pdev id before sending to fw. 767 * @dev_id: unique dev_id identifying the VDEV/PDEV 768 * @n_params: Number of parambers to set 769 * @params: pointer to dev_set_param structure 770 */ 771 struct set_multiple_pdev_vdev_param { 772 enum mlme_dev_setparam param_type; 773 uint8_t is_host_pdev_id; 774 uint8_t dev_id; 775 uint8_t n_params; 776 struct dev_set_param *params; 777 }; 778 779 /** 780 * struct set_rx_mac_filter - Set rx mac filter command parameters 781 * @vdev_id: Vdev id 782 * @mac: mac addr 783 * @freq: frequency 784 * @set: set or clear 785 */ 786 struct set_rx_mac_filter { 787 uint32_t vdev_id; 788 uint8_t mac[QDF_MAC_ADDR_SIZE]; 789 uint32_t freq; 790 bool set; 791 }; 792 793 static inline 794 QDF_STATUS mlme_check_index_setparam(struct dev_set_param *param, 795 uint32_t paramid, uint32_t paramvalue, 796 uint8_t index, uint8_t n_params) 797 { 798 if (index >= n_params) { 799 mlme_err("Index:%d OOB to fill param", index); 800 return QDF_STATUS_E_FAILURE; 801 } 802 param[index].param_id = paramid; 803 param[index].param_value = paramvalue; 804 return QDF_STATUS_SUCCESS; 805 } 806 807 /** 808 * struct vdev_set_mu_snif_param - vdev set mu sniffer cmd parameter 809 * @vdev_id: vdev id 810 * @mode: mu snif mode 811 * @num_user: max number of user 812 * @num_aid: number of set sta aid 813 * @aid: sta aids 814 */ 815 816 struct vdev_set_mu_snif_param { 817 uint32_t vdev_id; 818 uint32_t mode; 819 uint32_t num_user; 820 uint32_t num_aid; 821 uint32_t aid[WLAN_MU_SNIF_MAX_AIDS]; 822 }; 823 824 /** 825 * struct vdev_create_params - vdev create cmd parameter 826 * @vdev_id: interface id 827 * @vdev_stats_id_valid: flag to indicate valid stats id 828 * @vdev_stats_id: stats_id for stats collection 829 * @type: interface type 830 * @subtype: interface subtype 831 * @nss_2g: NSS for 2G 832 * @nss_5g: NSS for 5G 833 * @pdev_id: pdev id on pdev for this vdev 834 * @mbssid_flags: MBSS IE flags indicating vdev type 835 * @vdevid_trans: id of transmitting vdev for MBSS IE 836 * @special_vdev_mode: indicates special vdev mode 837 * @mlo_mac: Multilink Operation MAC address 838 */ 839 struct vdev_create_params { 840 uint8_t vdev_id; 841 bool vdev_stats_id_valid; 842 uint8_t vdev_stats_id; 843 uint32_t type; 844 uint32_t subtype; 845 uint8_t nss_2g; 846 uint8_t nss_5g; 847 uint32_t pdev_id; 848 uint32_t mbssid_flags; 849 uint8_t vdevid_trans; 850 bool special_vdev_mode; 851 #ifdef WLAN_FEATURE_11BE_MLO 852 uint8_t mlo_mac[QDF_MAC_ADDR_SIZE]; 853 #endif 854 }; 855 856 /** 857 * struct vdev_delete_params - vdev delete cmd parameter 858 * @vdev_id: vdev id 859 */ 860 struct vdev_delete_params { 861 uint8_t vdev_id; 862 }; 863 864 /** 865 * struct vdev_stop_params - vdev stop cmd parameter 866 * @vdev_id: vdev id 867 * @is_mlo_link_switch: Is VDEV stop due to link switch 868 */ 869 struct vdev_stop_params { 870 uint8_t vdev_id; 871 bool is_mlo_link_switch; 872 }; 873 874 /** 875 * struct vdev_up_params - vdev up cmd parameter 876 * @vdev_id: vdev id 877 * @assoc_id: association id 878 * @profile_idx: profile index of the connected non-trans ap (mbssid case). 879 * 0 means invalid. 880 * @profile_num: the total profile numbers of non-trans aps (mbssid case). 881 * 0 means non-MBSS AP. 882 * @trans_bssid: bssid of transmitted AP (MBSS IE case) 883 */ 884 struct vdev_up_params { 885 uint8_t vdev_id; 886 uint16_t assoc_id; 887 uint32_t profile_idx; 888 uint32_t profile_num; 889 uint8_t trans_bssid[QDF_MAC_ADDR_SIZE]; 890 }; 891 892 /** 893 * struct vdev_down_params - vdev down cmd parameter 894 * @vdev_id: vdev id 895 */ 896 struct vdev_down_params { 897 uint8_t vdev_id; 898 }; 899 900 /** 901 * struct peer_delete_all_params - peer delete all request parameter 902 * @vdev_id: vdev id 903 * @peer_type_bitmap: Bitmap of type with bits corresponding to value from 904 * enum wlan_peer_type 905 */ 906 struct peer_delete_all_params { 907 uint8_t vdev_id; 908 uint32_t peer_type_bitmap; 909 }; 910 911 #define AC_MAX 4 912 #define WMI_MUEDCA_PARAM_MASK 0xff 913 /** 914 * struct muedca_params - MU-EDCA parameters 915 * @pdev_id: pdev id 916 * @muedca_ecwmin: CWmin in exponential form 917 * @muedca_ecwmax: CWmax in exponential form 918 * @muedca_aifsn: AIFSN parameter 919 * @muedca_acm: ACM parameter 920 * @muedca_timer: MU EDCA timer value 921 */ 922 struct muedca_params { 923 uint32_t pdev_id; 924 uint8_t muedca_ecwmin[AC_MAX]; /* CWmin in exponential form */ 925 uint8_t muedca_ecwmax[AC_MAX]; /* CWmax in exponential form */ 926 uint8_t muedca_aifsn[AC_MAX]; /* AIFSN parameter */ 927 uint8_t muedca_acm[AC_MAX]; /* ACM parameter */ 928 uint8_t muedca_timer[AC_MAX]; /* MU EDCA timer value */ 929 }; 930 931 /* Total 10 BSSIDs can be packed in a single measurement request buffer */ 932 #define RTT_MAX_BSSIDS_TO_SCAN 10 933 934 /** 935 * struct rtt_bssid_info - Store the parsed macaddr and BW from the measurement 936 * request buffer. 937 * @macaddr: Destination macaddr to scan 938 * @bw: packet bandwidth 939 */ 940 struct rtt_bssid_info { 941 uint8_t macaddr[QDF_MAC_ADDR_SIZE]; 942 uint8_t bw; 943 }; 944 945 /** 946 * struct rtt_channel_info - Store the parsed channel info from LOWI measurement 947 * request buffer. 948 * @freq: Channel frequency 949 * @cfreq1: Center frequency1 950 * @cfreq2: Center frequency2 951 * @phymode: Phymode 952 * @num_bssids: Number of bssids present in the measurement request buffer 953 * @bssid_info: Array to store BW and macaddr present in the measurement request 954 * buffer. 955 */ 956 struct rtt_channel_info { 957 uint16_t freq; 958 uint16_t cfreq1; 959 uint16_t cfreq2; 960 uint16_t phymode; 961 uint16_t num_bssids; 962 struct rtt_bssid_info bssid_info[RTT_MAX_BSSIDS_TO_SCAN]; 963 }; 964 965 /** 966 * struct sr_prohibit_param - SR prohibit command parameter 967 * 968 * @vdev_id: vdev id 969 * @sr_he_siga_val15_allowed: HE_SIG_A_VAL15_ALLOWED is enabled/disabled 970 */ 971 struct sr_prohibit_param { 972 uint8_t vdev_id; 973 bool sr_he_siga_val15_allowed; 974 }; 975 #endif /* __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ */ 976