1 /* 2 * Copyright (c) 2018 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 #ifndef _PHYRX_RSSI_LEGACY_H_ 20 #define _PHYRX_RSSI_LEGACY_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #include "receive_rssi_info.h" 25 26 // ################ START SUMMARY ################# 27 // 28 // Dword Fields 29 // 0 reception_type[3:0], reserved_0[5:4], receive_bandwidth[7:6], rx_chain_mask[15:8], phy_ppdu_id[31:16] 30 // 1 sw_phy_meta_data[31:0] 31 // 2 ppdu_start_timestamp[31:0] 32 // 3-18 struct receive_rssi_info pre_rssi_info_details; 33 // 19-34 struct receive_rssi_info preamble_rssi_info_details; 34 // 35 pre_rssi_comb[7:0], rssi_comb[15:8], normalized_pre_rssi_comb[23:16], normalized_rssi_comb[31:24] 35 // 36 rssi_comb_ppdu[7:0], rssi_db_to_dbm_offset[15:8], reserved_36a[31:16] 36 // 37 // ################ END SUMMARY ################# 38 39 #define NUM_OF_DWORDS_PHYRX_RSSI_LEGACY 37 40 41 struct phyrx_rssi_legacy { 42 uint32_t reception_type : 4, //[3:0] 43 reserved_0 : 2, //[5:4] 44 receive_bandwidth : 2, //[7:6] 45 rx_chain_mask : 8, //[15:8] 46 phy_ppdu_id : 16; //[31:16] 47 uint32_t sw_phy_meta_data : 32; //[31:0] 48 uint32_t ppdu_start_timestamp : 32; //[31:0] 49 struct receive_rssi_info pre_rssi_info_details; 50 struct receive_rssi_info preamble_rssi_info_details; 51 uint32_t pre_rssi_comb : 8, //[7:0] 52 rssi_comb : 8, //[15:8] 53 normalized_pre_rssi_comb : 8, //[23:16] 54 normalized_rssi_comb : 8; //[31:24] 55 uint32_t rssi_comb_ppdu : 8, //[7:0] 56 rssi_db_to_dbm_offset : 8, //[15:8] 57 reserved_36a : 16; //[31:16] 58 }; 59 60 /* 61 62 reception_type 63 64 This field helps MAC SW determine which field in this 65 (and following TLVs) will contain valid information. For 66 example some RSSI info not valid in case of uplink_ofdma.. 67 68 <enum 0 reception_is_uplink_ofdma> 69 70 <enum 1 reception_is_uplink_mimo> 71 72 <enum 2 reception_is_other> 73 74 <enum 3 reception_is_frameless> PHY RX has been 75 instructed in advance that the upcoming reception is 76 frameless. This implieas that in advance it is known that 77 all frames will collide in the medium, and nothing can be 78 properly decoded... This can happen during the CTS reception 79 in response to the triggered MU-RTS transmission. 80 81 MAC takes no action when seeing this e_num. For the 82 frameless reception the indication in pkt_end is the final 83 one evaluated by the MAC 84 85 <legal 0-3> 86 87 reserved_0 88 89 <legal 0> 90 91 receive_bandwidth 92 93 Full receive Bandwidth 94 95 96 97 <enum 0 full_rx_bw_20_mhz> 98 99 <enum 1 full_rx_bw_40_mhz> 100 101 <enum 2 full_rx_bw_80_mhz> 102 103 <enum 3 full_rx_bw_160_mhz> 104 105 106 107 <legal 0-3> 108 109 rx_chain_mask 110 111 The chain mask at the start of the reception of this 112 frame. 113 114 115 116 each bit is one antenna 117 118 0: the chain is NOT used 119 120 1: the chain is used 121 122 123 124 Supports up to 8 chains 125 126 127 128 Used in 11ax TPC calculations for UL OFDMA/MIMO and has 129 to be in sync with the rssi_comb value as this is also used 130 by the MAC for the TPC calculations. 131 132 <legal all> 133 134 phy_ppdu_id 135 136 A ppdu counter value that PHY increments for every PPDU 137 received. The counter value wraps around 138 139 <legal all> 140 141 sw_phy_meta_data 142 143 32 bit Meta data that SW can program in a 32 bit PHY 144 register and PHY will insert the value in every 145 RX_RSSI_LEGACY TLV that it generates. 146 147 SW uses this field to embed among other things some SW 148 channel info. 149 150 ppdu_start_timestamp 151 152 Timestamp that indicates when the PPDU that contained 153 this MPDU started on the medium. 154 155 156 157 Note that PHY will detect the start later, and will have 158 to derive out of the preamble info when the frame actually 159 appeared on the medium 160 161 <legal 0- 10> 162 163 struct receive_rssi_info pre_rssi_info_details 164 165 This field is not valid when reception_is_uplink_ofdma 166 167 168 169 Overview of the pre-RSSI values. That is RSSI values 170 measured on the medium before this reception started. 171 172 struct receive_rssi_info preamble_rssi_info_details 173 174 This field is not valid when reception_is_uplink_ofdma 175 176 177 178 Overview of the RSSI values measured during the 179 pre-amble phase of this reception 180 181 pre_rssi_comb 182 183 Combined pre_rssi of all chains. Based on primary 184 channel RSSI. 185 186 187 188 RSSI is reported as 8b signed values. Nominally value is 189 in dB units above or below the noisefloor(minCCApwr). 190 191 192 193 The resolution can be: 194 195 1dB or 0.5dB. This is statically configured within the 196 PHY and MAC 197 198 199 200 In case of 1dB, the Range is: 201 202 -128dB to 127dB 203 204 205 206 In case of 0.5dB, the Range is: 207 208 -64dB to 63.5dB 209 210 211 212 <legal all> 213 214 rssi_comb 215 216 Combined rssi of all chains. Based on primary channel 217 RSSI. 218 219 220 221 RSSI is reported as 8b signed values. Nominally value is 222 in dB units above or below the noisefloor(minCCApwr). 223 224 225 226 The resolution can be: 227 228 1dB or 0.5dB. This is statically configured within the 229 PHY and MAC 230 231 232 233 In case of 1dB, the Range is: 234 235 -128dB to 127dB 236 237 238 239 In case of 0.5dB, the Range is: 240 241 -64dB to 63.5dB 242 243 244 245 <legal all> 246 247 normalized_pre_rssi_comb 248 249 Combined pre_rssi of all chains, but normalized back to 250 a single chain. This avoids PDG from having to evaluate this 251 in combination with receive chain mask and perform all kinds 252 of pre-processing algorithms. 253 254 255 256 Based on primary channel RSSI. 257 258 259 260 RSSI is reported as 8b signed values. Nominally value is 261 in dB units above or below the noisefloor(minCCApwr). 262 263 264 265 The resolution can be: 266 267 1dB or 0.5dB. This is statically configured within the 268 PHY and MAC 269 270 271 272 In case of 1dB, the Range is: 273 274 -128dB to 127dB 275 276 277 278 In case of 0.5dB, the Range is: 279 280 -64dB to 63.5dB 281 282 283 284 <legal all> 285 286 normalized_rssi_comb 287 288 Combined rssi of all chains, but normalized back to a 289 single chain. This avoids PDG from having to evaluate this 290 in combination with receive chain mask and perform all kinds 291 of pre-processing algorithms. 292 293 294 295 Based on primary channel RSSI. 296 297 298 299 RSSI is reported as 8b signed values. Nominally value is 300 in dB units above or below the noisefloor(minCCApwr). 301 302 303 304 The resolution can be: 305 306 1dB or 0.5dB. This is statically configured within the 307 PHY and MAC 308 309 In case of 1dB, the Range is: 310 311 -128dB to 127dB 312 313 314 315 In case of 0.5dB, the Range is: 316 317 -64dB to 63.5dB 318 319 320 321 <legal all> 322 323 rssi_comb_ppdu 324 325 Combined rssi of all chains, based on active 326 RUs/subchannels 327 328 329 330 RSSI is reported as 8b signed values. Nominally value is 331 in dB units above or below the noisefloor(minCCApwr). 332 333 334 335 The resolution can be: 336 337 1dB or 0.5dB. This is statically configured within the 338 PHY and MAC 339 340 341 342 In case of 1dB, the Range is: 343 344 -128dB to 127dB 345 346 347 348 In case of 0.5dB, the Range is: 349 350 -64dB to 63.5dB 351 352 353 354 When packet BW is 20 MHz, 355 356 rssi_comb_ppdu = rssi_comb. 357 358 359 360 When packet BW > 20 MHz, 361 362 rssi_comb < rssi_comb_ppdu because rssi_comb only 363 includes power of primary 20 MHz while rssi_comb_ppdu 364 includes power of active RUs/subchannels. 365 366 367 368 <legal all> 369 370 rssi_db_to_dbm_offset 371 372 Offset between 'dB' and 'dBm' values. SW can use this 373 value to convert RSSI 'dBm' values back to 'dB,' and report 374 both the values. 375 376 377 378 When rssi_db_to_dbm_offset = 0, 379 380 all rssi_xxx fields are defined in dB. 381 382 383 384 When rssi_db_to_dbm_offset is a large negative value, 385 all rssi_xxx fields are defined in dBm. 386 387 388 389 <legal all> 390 391 reserved_36a 392 393 <legal 0> 394 */ 395 396 397 /* Description PHYRX_RSSI_LEGACY_0_RECEPTION_TYPE 398 399 This field helps MAC SW determine which field in this 400 (and following TLVs) will contain valid information. For 401 example some RSSI info not valid in case of uplink_ofdma.. 402 403 <enum 0 reception_is_uplink_ofdma> 404 405 <enum 1 reception_is_uplink_mimo> 406 407 <enum 2 reception_is_other> 408 409 <enum 3 reception_is_frameless> PHY RX has been 410 instructed in advance that the upcoming reception is 411 frameless. This implieas that in advance it is known that 412 all frames will collide in the medium, and nothing can be 413 properly decoded... This can happen during the CTS reception 414 in response to the triggered MU-RTS transmission. 415 416 MAC takes no action when seeing this e_num. For the 417 frameless reception the indication in pkt_end is the final 418 one evaluated by the MAC 419 420 <legal 0-3> 421 */ 422 #define PHYRX_RSSI_LEGACY_0_RECEPTION_TYPE_OFFSET 0x00000000 423 #define PHYRX_RSSI_LEGACY_0_RECEPTION_TYPE_LSB 0 424 #define PHYRX_RSSI_LEGACY_0_RECEPTION_TYPE_MASK 0x0000000f 425 426 /* Description PHYRX_RSSI_LEGACY_0_RESERVED_0 427 428 <legal 0> 429 */ 430 #define PHYRX_RSSI_LEGACY_0_RESERVED_0_OFFSET 0x00000000 431 #define PHYRX_RSSI_LEGACY_0_RESERVED_0_LSB 4 432 #define PHYRX_RSSI_LEGACY_0_RESERVED_0_MASK 0x00000030 433 434 /* Description PHYRX_RSSI_LEGACY_0_RECEIVE_BANDWIDTH 435 436 Full receive Bandwidth 437 438 439 440 <enum 0 full_rx_bw_20_mhz> 441 442 <enum 1 full_rx_bw_40_mhz> 443 444 <enum 2 full_rx_bw_80_mhz> 445 446 <enum 3 full_rx_bw_160_mhz> 447 448 449 450 <legal 0-3> 451 */ 452 #define PHYRX_RSSI_LEGACY_0_RECEIVE_BANDWIDTH_OFFSET 0x00000000 453 #define PHYRX_RSSI_LEGACY_0_RECEIVE_BANDWIDTH_LSB 6 454 #define PHYRX_RSSI_LEGACY_0_RECEIVE_BANDWIDTH_MASK 0x000000c0 455 456 /* Description PHYRX_RSSI_LEGACY_0_RX_CHAIN_MASK 457 458 The chain mask at the start of the reception of this 459 frame. 460 461 462 463 each bit is one antenna 464 465 0: the chain is NOT used 466 467 1: the chain is used 468 469 470 471 Supports up to 8 chains 472 473 474 475 Used in 11ax TPC calculations for UL OFDMA/MIMO and has 476 to be in sync with the rssi_comb value as this is also used 477 by the MAC for the TPC calculations. 478 479 <legal all> 480 */ 481 #define PHYRX_RSSI_LEGACY_0_RX_CHAIN_MASK_OFFSET 0x00000000 482 #define PHYRX_RSSI_LEGACY_0_RX_CHAIN_MASK_LSB 8 483 #define PHYRX_RSSI_LEGACY_0_RX_CHAIN_MASK_MASK 0x0000ff00 484 485 /* Description PHYRX_RSSI_LEGACY_0_PHY_PPDU_ID 486 487 A ppdu counter value that PHY increments for every PPDU 488 received. The counter value wraps around 489 490 <legal all> 491 */ 492 #define PHYRX_RSSI_LEGACY_0_PHY_PPDU_ID_OFFSET 0x00000000 493 #define PHYRX_RSSI_LEGACY_0_PHY_PPDU_ID_LSB 16 494 #define PHYRX_RSSI_LEGACY_0_PHY_PPDU_ID_MASK 0xffff0000 495 496 /* Description PHYRX_RSSI_LEGACY_1_SW_PHY_META_DATA 497 498 32 bit Meta data that SW can program in a 32 bit PHY 499 register and PHY will insert the value in every 500 RX_RSSI_LEGACY TLV that it generates. 501 502 SW uses this field to embed among other things some SW 503 channel info. 504 */ 505 #define PHYRX_RSSI_LEGACY_1_SW_PHY_META_DATA_OFFSET 0x00000004 506 #define PHYRX_RSSI_LEGACY_1_SW_PHY_META_DATA_LSB 0 507 #define PHYRX_RSSI_LEGACY_1_SW_PHY_META_DATA_MASK 0xffffffff 508 509 /* Description PHYRX_RSSI_LEGACY_2_PPDU_START_TIMESTAMP 510 511 Timestamp that indicates when the PPDU that contained 512 this MPDU started on the medium. 513 514 515 516 Note that PHY will detect the start later, and will have 517 to derive out of the preamble info when the frame actually 518 appeared on the medium 519 520 <legal 0- 10> 521 */ 522 #define PHYRX_RSSI_LEGACY_2_PPDU_START_TIMESTAMP_OFFSET 0x00000008 523 #define PHYRX_RSSI_LEGACY_2_PPDU_START_TIMESTAMP_LSB 0 524 #define PHYRX_RSSI_LEGACY_2_PPDU_START_TIMESTAMP_MASK 0xffffffff 525 #define PHYRX_RSSI_LEGACY_3_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x0000000c 526 #define PHYRX_RSSI_LEGACY_3_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 527 #define PHYRX_RSSI_LEGACY_3_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 528 #define PHYRX_RSSI_LEGACY_4_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000010 529 #define PHYRX_RSSI_LEGACY_4_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 530 #define PHYRX_RSSI_LEGACY_4_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 531 #define PHYRX_RSSI_LEGACY_5_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000014 532 #define PHYRX_RSSI_LEGACY_5_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 533 #define PHYRX_RSSI_LEGACY_5_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 534 #define PHYRX_RSSI_LEGACY_6_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000018 535 #define PHYRX_RSSI_LEGACY_6_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 536 #define PHYRX_RSSI_LEGACY_6_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 537 #define PHYRX_RSSI_LEGACY_7_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x0000001c 538 #define PHYRX_RSSI_LEGACY_7_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 539 #define PHYRX_RSSI_LEGACY_7_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 540 #define PHYRX_RSSI_LEGACY_8_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000020 541 #define PHYRX_RSSI_LEGACY_8_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 542 #define PHYRX_RSSI_LEGACY_8_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 543 #define PHYRX_RSSI_LEGACY_9_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000024 544 #define PHYRX_RSSI_LEGACY_9_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 545 #define PHYRX_RSSI_LEGACY_9_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 546 #define PHYRX_RSSI_LEGACY_10_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000028 547 #define PHYRX_RSSI_LEGACY_10_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 548 #define PHYRX_RSSI_LEGACY_10_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 549 #define PHYRX_RSSI_LEGACY_11_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x0000002c 550 #define PHYRX_RSSI_LEGACY_11_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 551 #define PHYRX_RSSI_LEGACY_11_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 552 #define PHYRX_RSSI_LEGACY_12_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000030 553 #define PHYRX_RSSI_LEGACY_12_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 554 #define PHYRX_RSSI_LEGACY_12_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 555 #define PHYRX_RSSI_LEGACY_13_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000034 556 #define PHYRX_RSSI_LEGACY_13_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 557 #define PHYRX_RSSI_LEGACY_13_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 558 #define PHYRX_RSSI_LEGACY_14_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000038 559 #define PHYRX_RSSI_LEGACY_14_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 560 #define PHYRX_RSSI_LEGACY_14_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 561 #define PHYRX_RSSI_LEGACY_15_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x0000003c 562 #define PHYRX_RSSI_LEGACY_15_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 563 #define PHYRX_RSSI_LEGACY_15_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 564 #define PHYRX_RSSI_LEGACY_16_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000040 565 #define PHYRX_RSSI_LEGACY_16_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 566 #define PHYRX_RSSI_LEGACY_16_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 567 #define PHYRX_RSSI_LEGACY_17_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000044 568 #define PHYRX_RSSI_LEGACY_17_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 569 #define PHYRX_RSSI_LEGACY_17_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 570 #define PHYRX_RSSI_LEGACY_18_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_OFFSET 0x00000048 571 #define PHYRX_RSSI_LEGACY_18_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_LSB 0 572 #define PHYRX_RSSI_LEGACY_18_RECEIVE_RSSI_INFO_PRE_RSSI_INFO_DETAILS_MASK 0xffffffff 573 #define PHYRX_RSSI_LEGACY_19_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x0000004c 574 #define PHYRX_RSSI_LEGACY_19_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 575 #define PHYRX_RSSI_LEGACY_19_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 576 #define PHYRX_RSSI_LEGACY_20_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000050 577 #define PHYRX_RSSI_LEGACY_20_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 578 #define PHYRX_RSSI_LEGACY_20_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 579 #define PHYRX_RSSI_LEGACY_21_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000054 580 #define PHYRX_RSSI_LEGACY_21_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 581 #define PHYRX_RSSI_LEGACY_21_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 582 #define PHYRX_RSSI_LEGACY_22_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000058 583 #define PHYRX_RSSI_LEGACY_22_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 584 #define PHYRX_RSSI_LEGACY_22_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 585 #define PHYRX_RSSI_LEGACY_23_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x0000005c 586 #define PHYRX_RSSI_LEGACY_23_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 587 #define PHYRX_RSSI_LEGACY_23_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 588 #define PHYRX_RSSI_LEGACY_24_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000060 589 #define PHYRX_RSSI_LEGACY_24_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 590 #define PHYRX_RSSI_LEGACY_24_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 591 #define PHYRX_RSSI_LEGACY_25_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000064 592 #define PHYRX_RSSI_LEGACY_25_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 593 #define PHYRX_RSSI_LEGACY_25_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 594 #define PHYRX_RSSI_LEGACY_26_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000068 595 #define PHYRX_RSSI_LEGACY_26_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 596 #define PHYRX_RSSI_LEGACY_26_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 597 #define PHYRX_RSSI_LEGACY_27_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x0000006c 598 #define PHYRX_RSSI_LEGACY_27_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 599 #define PHYRX_RSSI_LEGACY_27_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 600 #define PHYRX_RSSI_LEGACY_28_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000070 601 #define PHYRX_RSSI_LEGACY_28_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 602 #define PHYRX_RSSI_LEGACY_28_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 603 #define PHYRX_RSSI_LEGACY_29_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000074 604 #define PHYRX_RSSI_LEGACY_29_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 605 #define PHYRX_RSSI_LEGACY_29_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 606 #define PHYRX_RSSI_LEGACY_30_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000078 607 #define PHYRX_RSSI_LEGACY_30_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 608 #define PHYRX_RSSI_LEGACY_30_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 609 #define PHYRX_RSSI_LEGACY_31_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x0000007c 610 #define PHYRX_RSSI_LEGACY_31_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 611 #define PHYRX_RSSI_LEGACY_31_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 612 #define PHYRX_RSSI_LEGACY_32_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000080 613 #define PHYRX_RSSI_LEGACY_32_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 614 #define PHYRX_RSSI_LEGACY_32_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 615 #define PHYRX_RSSI_LEGACY_33_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000084 616 #define PHYRX_RSSI_LEGACY_33_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 617 #define PHYRX_RSSI_LEGACY_33_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 618 #define PHYRX_RSSI_LEGACY_34_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_OFFSET 0x00000088 619 #define PHYRX_RSSI_LEGACY_34_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_LSB 0 620 #define PHYRX_RSSI_LEGACY_34_RECEIVE_RSSI_INFO_PREAMBLE_RSSI_INFO_DETAILS_MASK 0xffffffff 621 622 /* Description PHYRX_RSSI_LEGACY_35_PRE_RSSI_COMB 623 624 Combined pre_rssi of all chains. Based on primary 625 channel RSSI. 626 627 628 629 RSSI is reported as 8b signed values. Nominally value is 630 in dB units above or below the noisefloor(minCCApwr). 631 632 633 634 The resolution can be: 635 636 1dB or 0.5dB. This is statically configured within the 637 PHY and MAC 638 639 640 641 In case of 1dB, the Range is: 642 643 -128dB to 127dB 644 645 646 647 In case of 0.5dB, the Range is: 648 649 -64dB to 63.5dB 650 651 652 653 <legal all> 654 */ 655 #define PHYRX_RSSI_LEGACY_35_PRE_RSSI_COMB_OFFSET 0x0000008c 656 #define PHYRX_RSSI_LEGACY_35_PRE_RSSI_COMB_LSB 0 657 #define PHYRX_RSSI_LEGACY_35_PRE_RSSI_COMB_MASK 0x000000ff 658 659 /* Description PHYRX_RSSI_LEGACY_35_RSSI_COMB 660 661 Combined rssi of all chains. Based on primary channel 662 RSSI. 663 664 665 666 RSSI is reported as 8b signed values. Nominally value is 667 in dB units above or below the noisefloor(minCCApwr). 668 669 670 671 The resolution can be: 672 673 1dB or 0.5dB. This is statically configured within the 674 PHY and MAC 675 676 677 678 In case of 1dB, the Range is: 679 680 -128dB to 127dB 681 682 683 684 In case of 0.5dB, the Range is: 685 686 -64dB to 63.5dB 687 688 689 690 <legal all> 691 */ 692 #define PHYRX_RSSI_LEGACY_35_RSSI_COMB_OFFSET 0x0000008c 693 #define PHYRX_RSSI_LEGACY_35_RSSI_COMB_LSB 8 694 #define PHYRX_RSSI_LEGACY_35_RSSI_COMB_MASK 0x0000ff00 695 696 /* Description PHYRX_RSSI_LEGACY_35_NORMALIZED_PRE_RSSI_COMB 697 698 Combined pre_rssi of all chains, but normalized back to 699 a single chain. This avoids PDG from having to evaluate this 700 in combination with receive chain mask and perform all kinds 701 of pre-processing algorithms. 702 703 704 705 Based on primary channel RSSI. 706 707 708 709 RSSI is reported as 8b signed values. Nominally value is 710 in dB units above or below the noisefloor(minCCApwr). 711 712 713 714 The resolution can be: 715 716 1dB or 0.5dB. This is statically configured within the 717 PHY and MAC 718 719 720 721 In case of 1dB, the Range is: 722 723 -128dB to 127dB 724 725 726 727 In case of 0.5dB, the Range is: 728 729 -64dB to 63.5dB 730 731 732 733 <legal all> 734 */ 735 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_PRE_RSSI_COMB_OFFSET 0x0000008c 736 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_PRE_RSSI_COMB_LSB 16 737 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_PRE_RSSI_COMB_MASK 0x00ff0000 738 739 /* Description PHYRX_RSSI_LEGACY_35_NORMALIZED_RSSI_COMB 740 741 Combined rssi of all chains, but normalized back to a 742 single chain. This avoids PDG from having to evaluate this 743 in combination with receive chain mask and perform all kinds 744 of pre-processing algorithms. 745 746 747 748 Based on primary channel RSSI. 749 750 751 752 RSSI is reported as 8b signed values. Nominally value is 753 in dB units above or below the noisefloor(minCCApwr). 754 755 756 757 The resolution can be: 758 759 1dB or 0.5dB. This is statically configured within the 760 PHY and MAC 761 762 In case of 1dB, the Range is: 763 764 -128dB to 127dB 765 766 767 768 In case of 0.5dB, the Range is: 769 770 -64dB to 63.5dB 771 772 773 774 <legal all> 775 */ 776 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_RSSI_COMB_OFFSET 0x0000008c 777 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_RSSI_COMB_LSB 24 778 #define PHYRX_RSSI_LEGACY_35_NORMALIZED_RSSI_COMB_MASK 0xff000000 779 780 /* Description PHYRX_RSSI_LEGACY_36_RSSI_COMB_PPDU 781 782 Combined rssi of all chains, based on active 783 RUs/subchannels 784 785 786 787 RSSI is reported as 8b signed values. Nominally value is 788 in dB units above or below the noisefloor(minCCApwr). 789 790 791 792 The resolution can be: 793 794 1dB or 0.5dB. This is statically configured within the 795 PHY and MAC 796 797 798 799 In case of 1dB, the Range is: 800 801 -128dB to 127dB 802 803 804 805 In case of 0.5dB, the Range is: 806 807 -64dB to 63.5dB 808 809 810 811 When packet BW is 20 MHz, 812 813 rssi_comb_ppdu = rssi_comb. 814 815 816 817 When packet BW > 20 MHz, 818 819 rssi_comb < rssi_comb_ppdu because rssi_comb only 820 includes power of primary 20 MHz while rssi_comb_ppdu 821 includes power of active RUs/subchannels. 822 823 824 825 <legal all> 826 */ 827 #define PHYRX_RSSI_LEGACY_36_RSSI_COMB_PPDU_OFFSET 0x00000090 828 #define PHYRX_RSSI_LEGACY_36_RSSI_COMB_PPDU_LSB 0 829 #define PHYRX_RSSI_LEGACY_36_RSSI_COMB_PPDU_MASK 0x000000ff 830 831 /* Description PHYRX_RSSI_LEGACY_36_RSSI_DB_TO_DBM_OFFSET 832 833 Offset between 'dB' and 'dBm' values. SW can use this 834 value to convert RSSI 'dBm' values back to 'dB,' and report 835 both the values. 836 837 838 839 When rssi_db_to_dbm_offset = 0, 840 841 all rssi_xxx fields are defined in dB. 842 843 844 845 When rssi_db_to_dbm_offset is a large negative value, 846 all rssi_xxx fields are defined in dBm. 847 848 849 850 <legal all> 851 */ 852 #define PHYRX_RSSI_LEGACY_36_RSSI_DB_TO_DBM_OFFSET_OFFSET 0x00000090 853 #define PHYRX_RSSI_LEGACY_36_RSSI_DB_TO_DBM_OFFSET_LSB 8 854 #define PHYRX_RSSI_LEGACY_36_RSSI_DB_TO_DBM_OFFSET_MASK 0x0000ff00 855 856 /* Description PHYRX_RSSI_LEGACY_36_RESERVED_36A 857 858 <legal 0> 859 */ 860 #define PHYRX_RSSI_LEGACY_36_RESERVED_36A_OFFSET 0x00000090 861 #define PHYRX_RSSI_LEGACY_36_RESERVED_36A_LSB 16 862 #define PHYRX_RSSI_LEGACY_36_RESERVED_36A_MASK 0xffff0000 863 864 865 #endif // _PHYRX_RSSI_LEGACY_H_ 866