1 /* 2 * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: wlan_vdev_mgr_tgt_if_tx_defs.h 21 * 22 * This file provides definitions to data structures required for vdev Tx ops 23 */ 24 25 #ifndef __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ 26 #define __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ 27 28 #ifdef CMN_VDEV_MGR_TGT_IF_ENABLE 29 #include <qdf_nbuf.h> 30 31 /** 32 * struct mac_ssid - mac ssid structure 33 * @length: ssid length 34 * @mac_ssid: ssid 35 */ 36 struct mlme_mac_ssid { 37 uint8_t length; 38 uint8_t mac_ssid[WLAN_SSID_MAX_LEN]; 39 } qdf_packed; 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 * struct sta_ps_params - sta ps cmd parameter 61 * @vdev_id: vdev id 62 * @param_id: sta ps parameter 63 * @value: sta ps parameter value 64 */ 65 struct sta_ps_params { 66 uint32_t vdev_id; 67 uint32_t param_id; 68 uint32_t value; 69 }; 70 71 /** 72 * struct tbttoffset_params - Tbttoffset event params 73 * @vdev_id: Virtual AP device identifier 74 * @tbttoffset : Tbttoffset for the virtual AP device 75 */ 76 struct tbttoffset_params { 77 uint32_t vdev_id; 78 uint32_t tbttoffset; 79 }; 80 81 /** 82 * struct beacon_tmpl_params - beacon template cmd parameter 83 * @vdev_id: vdev id 84 * @tim_ie_offset: tim ie offset 85 * @mbssid_ie_offset: mbssid ie offset 86 * @tmpl_len: beacon template length 87 * @tmpl_len_aligned: beacon template alignment 88 * @csa_switch_count_offset: CSA swith count offset in beacon frame 89 * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame 90 * @esp_ie_offset: ESP IE offset in beacon frame 91 * @frm: beacon template parameter 92 */ 93 struct beacon_tmpl_params { 94 uint8_t vdev_id; 95 uint32_t tim_ie_offset; 96 uint32_t mbssid_ie_offset; 97 uint32_t tmpl_len; 98 uint32_t tmpl_len_aligned; 99 uint32_t csa_switch_count_offset; 100 uint32_t ext_csa_switch_count_offset; 101 uint32_t esp_ie_offset; 102 uint8_t *frm; 103 }; 104 105 /** 106 * struct beacon_params - beacon cmd parameter 107 * @vdev_id: vdev id 108 * @beacon_interval: Beacon interval 109 * @wbuf: beacon buffer 110 * @frame_ctrl: frame control field 111 * @bcn_txant: beacon antenna 112 * @is_dtim_count_zero: is it dtim beacon 113 * @is_bitctl_reqd: is Bit control required 114 * @is_high_latency: Is this high latency target 115 */ 116 struct beacon_params { 117 uint8_t vdev_id; 118 uint16_t beacon_interval; 119 qdf_nbuf_t wbuf; 120 uint16_t frame_ctrl; 121 uint32_t bcn_txant; 122 bool is_dtim_count_zero; 123 bool is_bitctl_reqd; 124 bool is_high_latency; 125 }; 126 127 /** 128 * struct mlme_channel_param - Channel parameters with all 129 * info required by target. 130 * @chan_id: channel id 131 * @pwr: channel power 132 * @mhz: channel frequency 133 * @half_rate: is half rate 134 * @quarter_rate: is quarter rate 135 * @dfs_set: is dfs channel 136 * @dfs_set_cfreq2: is secondary freq dfs channel 137 * @is_chan_passive: is this passive channel 138 * @allow_ht: HT allowed in chan 139 * @allow_vht: VHT allowed on chan 140 * @set_agile: is agile mode 141 * @phy_mode: phymode (vht80 or ht40 or ...) 142 * @cfreq1: centre frequency on primary 143 * @cfreq2: centre frequency on secondary 144 * @maxpower: max power for channel 145 * @minpower: min power for channel 146 * @maxreqpower: Max regulatory power 147 * @antennamac: Max antenna 148 * @reg_class_id: Regulatory class id. 149 */ 150 struct mlme_channel_param { 151 uint8_t chan_id; 152 uint8_t pwr; 153 uint32_t mhz; 154 uint32_t half_rate:1, 155 quarter_rate:1, 156 dfs_set:1, 157 dfs_set_cfreq2:1, 158 is_chan_passive:1, 159 allow_ht:1, 160 allow_vht:1, 161 set_agile:1; 162 enum wlan_phymode phy_mode; 163 uint32_t cfreq1; 164 uint32_t cfreq2; 165 int8_t maxpower; 166 int8_t minpower; 167 int8_t maxregpower; 168 uint8_t antennamax; 169 uint8_t reg_class_id; 170 }; 171 172 /** 173 * struct multiple_vdev_restart_params - Multiple vdev restart cmd parameter 174 * @pdev_id: Pdev identifier 175 * @requestor_id: Unique id identifying the module 176 * @disable_hw_ack: Flag to indicate disabling HW ACK during CAC 177 * @cac_duration_ms: CAC duration on the given channel 178 * @num_vdevs: No. of vdevs that need to be restarted 179 * @ch_param: Pointer to channel_param 180 * @vdev_ids: Pointer to array of vdev_ids 181 */ 182 struct multiple_vdev_restart_params { 183 uint32_t pdev_id; 184 uint32_t requestor_id; 185 uint32_t disable_hw_ack; 186 uint32_t cac_duration_ms; 187 uint32_t num_vdevs; 188 struct mlme_channel_param ch_param; 189 uint32_t vdev_ids[WLAN_UMAC_PDEV_MAX_VDEVS]; 190 }; 191 192 /** 193 * struct peer_flush_params - peer flush cmd parameter 194 * @peer_tid_bitmap: peer tid bitmap 195 * @vdev_id: vdev id 196 * @peer_mac: peer mac address 197 */ 198 struct peer_flush_params { 199 uint32_t peer_tid_bitmap; 200 uint8_t vdev_id; 201 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 202 }; 203 204 /** 205 * struct config_ratemask_params - ratemask config parameters 206 * @vdev_id: vdev id 207 * @type: Type 208 * @lower32: Lower 32 bits in the 1st 64-bit value 209 * @higher32: Higher 32 bits in the 1st 64-bit value 210 * @lower32_2: Lower 32 bits in the 2nd 64-bit value 211 */ 212 struct config_ratemask_params { 213 uint8_t vdev_id; 214 uint8_t type; 215 uint32_t lower32; 216 uint32_t higher32; 217 uint32_t lower32_2; 218 }; 219 220 /** 221 * struct set_custom_aggr_size_params - custom aggr size params 222 * @vdev_id : vdev id 223 * @tx_aggr_size : TX aggr size 224 * @rx_aggr_size : RX aggr size 225 * @enable_bitmap: Bitmap for aggr size check 226 */ 227 struct set_custom_aggr_size_params { 228 uint32_t vdev_id; 229 uint32_t tx_aggr_size; 230 uint32_t rx_aggr_size; 231 uint32_t ac:2, 232 aggr_type:1, 233 tx_aggr_size_disable:1, 234 rx_aggr_size_disable:1, 235 tx_ac_enable:1, 236 reserved:26; 237 }; 238 239 /** 240 * struct sifs_trigger_param - sifs_trigger cmd parameter 241 * @vdev_id: vdev id 242 * @param_value: parameter value 243 */ 244 struct sifs_trigger_param { 245 uint32_t vdev_id; 246 uint32_t param_value; 247 }; 248 249 /** 250 * struct set_neighbour_rx_params - Neighbour RX params 251 * @vdev_id: vdev id 252 * @idx: index of param 253 * @action: action 254 * @type: Type of param 255 */ 256 struct set_neighbour_rx_params { 257 uint8_t vdev_id; 258 uint32_t idx; 259 uint32_t action; 260 uint32_t type; 261 }; 262 263 /** 264 * struct vdev_scan_nac_rssi_params - NAC_RSSI cmd parameter 265 * @vdev_id: vdev id 266 * @bssid_addr: BSSID address 267 * @client_addr: client address 268 * @chan_num: channel number 269 * @action:NAC_RSSI action, 270 */ 271 struct vdev_scan_nac_rssi_params { 272 uint32_t vdev_id; 273 uint8_t bssid_addr[QDF_MAC_ADDR_SIZE]; 274 uint8_t client_addr[QDF_MAC_ADDR_SIZE]; 275 uint32_t chan_num; 276 uint32_t action; /* WMI_FILTER_NAC_RSSI_ACTION */ 277 }; 278 279 /** 280 * struct vdev_start_params - vdev start cmd parameter 281 * @vdev_id: vdev id 282 * @beacon_interval: beacon interval 283 * @dtim_period: dtim period 284 * @is_restart: flag to check if it is vdev 285 * @disable_hw_ack: to update disable hw ack flag 286 * @hidden_ssid: hidden ssid 287 * @pmf_enabled: pmf enabled 288 * @ssid: ssid MAC 289 * @num_noa_descriptors: number of noa descriptors 290 * @preferred_tx_streams: preferred tx streams 291 * @preferred_rx_streams: preferred rx streams 292 * @cac_duration_ms: cac duration in milliseconds 293 * @regdomain: Regulatory domain 294 * @he_ops: HE ops 295 * @channel_param: Channel params required by target. 296 * @bcn_tx_rate_code: Beacon tx rate code. 297 * @ldpc_rx_enabled: Enable/Disable LDPC RX for this vdev 298 */ 299 struct vdev_start_params { 300 uint8_t vdev_id; 301 uint32_t beacon_interval; 302 uint32_t dtim_period; 303 bool is_restart; 304 uint32_t disable_hw_ack; 305 bool hidden_ssid; 306 bool pmf_enabled; 307 struct mlme_mac_ssid ssid; 308 uint32_t num_noa_descriptors; 309 uint32_t preferred_rx_streams; 310 uint32_t preferred_tx_streams; 311 uint32_t cac_duration_ms; 312 uint32_t regdomain; 313 uint32_t he_ops; 314 struct mlme_channel_param channel; 315 enum mlme_bcn_tx_rate_code bcn_tx_rate_code; 316 bool ldpc_rx_enabled; 317 }; 318 319 /** 320 * struct vdev_set_params - vdev set cmd parameter 321 * @vdev_id: vdev id 322 * @param_id: parameter id 323 * @param_value: parameter value 324 */ 325 struct vdev_set_params { 326 uint32_t vdev_id; 327 uint32_t param_id; 328 uint32_t param_value; 329 }; 330 331 /** 332 * struct vdev_create_params - vdev create cmd parameter 333 * @vdev_id: interface id 334 * @type: interface type 335 * @subtype: interface subtype 336 * @nss_2g: NSS for 2G 337 * @nss_5g: NSS for 5G 338 * @pdev_id: pdev id on pdev for this vdev 339 * @mbssid_flags: MBSS IE flags indicating vdev type 340 * @vdevid_trans: id of transmitting vdev for MBSS IE 341 */ 342 struct vdev_create_params { 343 uint8_t vdev_id; 344 uint32_t type; 345 uint32_t subtype; 346 uint8_t nss_2g; 347 uint8_t nss_5g; 348 uint32_t pdev_id; 349 uint32_t mbssid_flags; 350 uint8_t vdevid_trans; 351 }; 352 353 /** 354 * struct vdev_delete_params - vdev delete cmd parameter 355 * @vdev_id: vdev id 356 */ 357 struct vdev_delete_params { 358 uint8_t vdev_id; 359 }; 360 361 /** 362 * struct vdev_stop_params - vdev stop cmd parameter 363 * @vdev_id: vdev id 364 */ 365 struct vdev_stop_params { 366 uint8_t vdev_id; 367 }; 368 369 /** 370 * struct vdev_up_params - vdev up cmd parameter 371 * @vdev_id: vdev id 372 * @assoc_id: association id 373 * @profile_idx: profile index of the connected non-trans ap (mbssid case). 374 * 0 means invalid. 375 * @profile_num: the total profile numbers of non-trans aps (mbssid case). 376 * 0 means non-MBSS AP. 377 * @trans_bssid: bssid of transmitted AP (MBSS IE case) 378 */ 379 struct vdev_up_params { 380 uint8_t vdev_id; 381 uint16_t assoc_id; 382 uint32_t profile_idx; 383 uint32_t profile_num; 384 uint8_t trans_bssid[QDF_MAC_ADDR_SIZE]; 385 }; 386 387 /** 388 * struct vdev_down_params - vdev down cmd parameter 389 * @vdev_id: vdev id 390 */ 391 struct vdev_down_params { 392 uint8_t vdev_id; 393 }; 394 395 #endif 396 #endif /* __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ */ 397