1 /* 2 * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 18 #ifndef _COEX_TX_STATUS_H_ 19 #define _COEX_TX_STATUS_H_ 20 21 #define NUM_OF_DWORDS_COEX_TX_STATUS 3 22 23 struct coex_tx_status { 24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 25 uint32_t reserved_0a : 7, 26 tx_bw : 3, 27 tx_status_reason : 3, 28 tx_wait_ack : 1, 29 fes_tx_is_gen_frame : 1, 30 sch_tx_burst_ongoing : 1, 31 current_tx_duration : 16; 32 uint32_t next_rx_active_time : 16, 33 remaining_fes_time : 16; 34 uint32_t tx_antenna_mask : 8, 35 shared_ant_tx_pwr : 8, 36 other_ant_tx_pwr : 8, 37 reserved_2 : 8; 38 #else 39 uint32_t current_tx_duration : 16, 40 sch_tx_burst_ongoing : 1, 41 fes_tx_is_gen_frame : 1, 42 tx_wait_ack : 1, 43 tx_status_reason : 3, 44 tx_bw : 3, 45 reserved_0a : 7; 46 uint32_t remaining_fes_time : 16, 47 next_rx_active_time : 16; 48 uint32_t reserved_2 : 8, 49 other_ant_tx_pwr : 8, 50 shared_ant_tx_pwr : 8, 51 tx_antenna_mask : 8; 52 #endif 53 }; 54 55 #define COEX_TX_STATUS_RESERVED_0A_OFFSET 0x00000000 56 #define COEX_TX_STATUS_RESERVED_0A_LSB 0 57 #define COEX_TX_STATUS_RESERVED_0A_MSB 6 58 #define COEX_TX_STATUS_RESERVED_0A_MASK 0x0000007f 59 60 #define COEX_TX_STATUS_TX_BW_OFFSET 0x00000000 61 #define COEX_TX_STATUS_TX_BW_LSB 7 62 #define COEX_TX_STATUS_TX_BW_MSB 9 63 #define COEX_TX_STATUS_TX_BW_MASK 0x00000380 64 65 #define COEX_TX_STATUS_TX_STATUS_REASON_OFFSET 0x00000000 66 #define COEX_TX_STATUS_TX_STATUS_REASON_LSB 10 67 #define COEX_TX_STATUS_TX_STATUS_REASON_MSB 12 68 #define COEX_TX_STATUS_TX_STATUS_REASON_MASK 0x00001c00 69 70 #define COEX_TX_STATUS_TX_WAIT_ACK_OFFSET 0x00000000 71 #define COEX_TX_STATUS_TX_WAIT_ACK_LSB 13 72 #define COEX_TX_STATUS_TX_WAIT_ACK_MSB 13 73 #define COEX_TX_STATUS_TX_WAIT_ACK_MASK 0x00002000 74 75 #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_OFFSET 0x00000000 76 #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_LSB 14 77 #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_MSB 14 78 #define COEX_TX_STATUS_FES_TX_IS_GEN_FRAME_MASK 0x00004000 79 80 #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_OFFSET 0x00000000 81 #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_LSB 15 82 #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_MSB 15 83 #define COEX_TX_STATUS_SCH_TX_BURST_ONGOING_MASK 0x00008000 84 85 #define COEX_TX_STATUS_CURRENT_TX_DURATION_OFFSET 0x00000000 86 #define COEX_TX_STATUS_CURRENT_TX_DURATION_LSB 16 87 #define COEX_TX_STATUS_CURRENT_TX_DURATION_MSB 31 88 #define COEX_TX_STATUS_CURRENT_TX_DURATION_MASK 0xffff0000 89 90 #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_OFFSET 0x00000004 91 #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_LSB 0 92 #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_MSB 15 93 #define COEX_TX_STATUS_NEXT_RX_ACTIVE_TIME_MASK 0x0000ffff 94 95 #define COEX_TX_STATUS_REMAINING_FES_TIME_OFFSET 0x00000004 96 #define COEX_TX_STATUS_REMAINING_FES_TIME_LSB 16 97 #define COEX_TX_STATUS_REMAINING_FES_TIME_MSB 31 98 #define COEX_TX_STATUS_REMAINING_FES_TIME_MASK 0xffff0000 99 100 #define COEX_TX_STATUS_TX_ANTENNA_MASK_OFFSET 0x00000008 101 #define COEX_TX_STATUS_TX_ANTENNA_MASK_LSB 0 102 #define COEX_TX_STATUS_TX_ANTENNA_MASK_MSB 7 103 #define COEX_TX_STATUS_TX_ANTENNA_MASK_MASK 0x000000ff 104 105 #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_OFFSET 0x00000008 106 #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_LSB 8 107 #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_MSB 15 108 #define COEX_TX_STATUS_SHARED_ANT_TX_PWR_MASK 0x0000ff00 109 110 #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_OFFSET 0x00000008 111 #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_LSB 16 112 #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_MSB 23 113 #define COEX_TX_STATUS_OTHER_ANT_TX_PWR_MASK 0x00ff0000 114 115 #define COEX_TX_STATUS_RESERVED_2_OFFSET 0x00000008 116 #define COEX_TX_STATUS_RESERVED_2_LSB 24 117 #define COEX_TX_STATUS_RESERVED_2_MSB 31 118 #define COEX_TX_STATUS_RESERVED_2_MASK 0xff000000 119 120 #endif 121