xref: /wlan-driver/fw-api/hw/kiwi/v2/pdg_tx_req.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /*
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 
19 
20 #ifndef _PDG_TX_REQ_H_
21 #define _PDG_TX_REQ_H_
22 #if !defined(__ASSEMBLER__)
23 #endif
24 
25 #define NUM_OF_DWORDS_PDG_TX_REQ 2
26 
27 #define NUM_OF_QWORDS_PDG_TX_REQ 1
28 
29 struct pdg_tx_req {
30 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
31              uint32_t tx_reason                                               :  2,
32                       use_puncture_pattern                                    :  2,
33                       req_bw                                                  :  3,
34                       puncture_pattern_number                                 :  6,
35                       reserved_0b                                             :  1,
36                       req_paprd                                               :  1,
37                       duration_field_boundary_valid                           :  1,
38                       duration_field_boundary                                 : 16;
39              uint32_t puncture_subband_mask                                   : 16,
40                       reserved_0c                                             : 16;
41 #else
42              uint32_t duration_field_boundary                                 : 16,
43                       duration_field_boundary_valid                           :  1,
44                       req_paprd                                               :  1,
45                       reserved_0b                                             :  1,
46                       puncture_pattern_number                                 :  6,
47                       req_bw                                                  :  3,
48                       use_puncture_pattern                                    :  2,
49                       tx_reason                                               :  2;
50              uint32_t reserved_0c                                             : 16,
51                       puncture_subband_mask                                   : 16;
52 #endif
53 };
54 
55 #define PDG_TX_REQ_TX_REASON_OFFSET                                                 0x0000000000000000
56 #define PDG_TX_REQ_TX_REASON_LSB                                                    0
57 #define PDG_TX_REQ_TX_REASON_MSB                                                    1
58 #define PDG_TX_REQ_TX_REASON_MASK                                                   0x0000000000000003
59 
60 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_OFFSET                                      0x0000000000000000
61 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_LSB                                         2
62 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MSB                                         3
63 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MASK                                        0x000000000000000c
64 
65 #define PDG_TX_REQ_REQ_BW_OFFSET                                                    0x0000000000000000
66 #define PDG_TX_REQ_REQ_BW_LSB                                                       4
67 #define PDG_TX_REQ_REQ_BW_MSB                                                       6
68 #define PDG_TX_REQ_REQ_BW_MASK                                                      0x0000000000000070
69 
70 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_OFFSET                                   0x0000000000000000
71 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_LSB                                      7
72 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MSB                                      12
73 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MASK                                     0x0000000000001f80
74 
75 #define PDG_TX_REQ_RESERVED_0B_OFFSET                                               0x0000000000000000
76 #define PDG_TX_REQ_RESERVED_0B_LSB                                                  13
77 #define PDG_TX_REQ_RESERVED_0B_MSB                                                  13
78 #define PDG_TX_REQ_RESERVED_0B_MASK                                                 0x0000000000002000
79 
80 #define PDG_TX_REQ_REQ_PAPRD_OFFSET                                                 0x0000000000000000
81 #define PDG_TX_REQ_REQ_PAPRD_LSB                                                    14
82 #define PDG_TX_REQ_REQ_PAPRD_MSB                                                    14
83 #define PDG_TX_REQ_REQ_PAPRD_MASK                                                   0x0000000000004000
84 
85 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_OFFSET                             0x0000000000000000
86 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_LSB                                15
87 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MSB                                15
88 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MASK                               0x0000000000008000
89 
90 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_OFFSET                                   0x0000000000000000
91 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_LSB                                      16
92 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MSB                                      31
93 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MASK                                     0x00000000ffff0000
94 
95 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_OFFSET                                     0x0000000000000000
96 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_LSB                                        32
97 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MSB                                        47
98 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MASK                                       0x0000ffff00000000
99 
100 #define PDG_TX_REQ_RESERVED_0C_OFFSET                                               0x0000000000000000
101 #define PDG_TX_REQ_RESERVED_0C_LSB                                                  48
102 #define PDG_TX_REQ_RESERVED_0C_MSB                                                  63
103 #define PDG_TX_REQ_RESERVED_0C_MASK                                                 0xffff000000000000
104 
105 #endif
106