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