1 /* 2 * Copyright (c) 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 _RX_MPDU_DESC_INFO_H_ 19 #define _RX_MPDU_DESC_INFO_H_ 20 21 #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2 22 23 struct rx_mpdu_desc_info { 24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 25 uint32_t msdu_count : 8, 26 fragment_flag : 1, 27 mpdu_retry_bit : 1, 28 ampdu_flag : 1, 29 bar_frame : 1, 30 pn_fields_contain_valid_info : 1, 31 raw_mpdu : 1, 32 more_fragment_flag : 1, 33 src_info : 12, 34 mpdu_qos_control_valid : 1, 35 tid : 4; 36 uint32_t peer_meta_data : 32; 37 #else 38 uint32_t tid : 4, 39 mpdu_qos_control_valid : 1, 40 src_info : 12, 41 more_fragment_flag : 1, 42 raw_mpdu : 1, 43 pn_fields_contain_valid_info : 1, 44 bar_frame : 1, 45 ampdu_flag : 1, 46 mpdu_retry_bit : 1, 47 fragment_flag : 1, 48 msdu_count : 8; 49 uint32_t peer_meta_data : 32; 50 #endif 51 }; 52 53 #define RX_MPDU_DESC_INFO_MSDU_COUNT_OFFSET 0x00000000 54 #define RX_MPDU_DESC_INFO_MSDU_COUNT_LSB 0 55 #define RX_MPDU_DESC_INFO_MSDU_COUNT_MSB 7 56 #define RX_MPDU_DESC_INFO_MSDU_COUNT_MASK 0x000000ff 57 58 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_OFFSET 0x00000000 59 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_LSB 8 60 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MSB 8 61 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MASK 0x00000100 62 63 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_OFFSET 0x00000000 64 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_LSB 9 65 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MSB 9 66 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MASK 0x00000200 67 68 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_OFFSET 0x00000000 69 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_LSB 10 70 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MSB 10 71 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MASK 0x00000400 72 73 #define RX_MPDU_DESC_INFO_BAR_FRAME_OFFSET 0x00000000 74 #define RX_MPDU_DESC_INFO_BAR_FRAME_LSB 11 75 #define RX_MPDU_DESC_INFO_BAR_FRAME_MSB 11 76 #define RX_MPDU_DESC_INFO_BAR_FRAME_MASK 0x00000800 77 78 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000 79 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_LSB 12 80 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MSB 12 81 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x00001000 82 83 #define RX_MPDU_DESC_INFO_RAW_MPDU_OFFSET 0x00000000 84 #define RX_MPDU_DESC_INFO_RAW_MPDU_LSB 13 85 #define RX_MPDU_DESC_INFO_RAW_MPDU_MSB 13 86 #define RX_MPDU_DESC_INFO_RAW_MPDU_MASK 0x00002000 87 88 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_OFFSET 0x00000000 89 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_LSB 14 90 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MSB 14 91 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MASK 0x00004000 92 93 #define RX_MPDU_DESC_INFO_SRC_INFO_OFFSET 0x00000000 94 #define RX_MPDU_DESC_INFO_SRC_INFO_LSB 15 95 #define RX_MPDU_DESC_INFO_SRC_INFO_MSB 26 96 #define RX_MPDU_DESC_INFO_SRC_INFO_MASK 0x07ff8000 97 98 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_OFFSET 0x00000000 99 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_LSB 27 100 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MSB 27 101 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MASK 0x08000000 102 103 #define RX_MPDU_DESC_INFO_TID_OFFSET 0x00000000 104 #define RX_MPDU_DESC_INFO_TID_LSB 28 105 #define RX_MPDU_DESC_INFO_TID_MSB 31 106 #define RX_MPDU_DESC_INFO_TID_MASK 0xf0000000 107 108 #define RX_MPDU_DESC_INFO_PEER_META_DATA_OFFSET 0x00000004 109 #define RX_MPDU_DESC_INFO_PEER_META_DATA_LSB 0 110 #define RX_MPDU_DESC_INFO_PEER_META_DATA_MSB 31 111 #define RX_MPDU_DESC_INFO_PEER_META_DATA_MASK 0xffffffff 112 113 #endif 114