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 _MON_DROP_H_ 19 #define _MON_DROP_H_ 20 21 #define NUM_OF_DWORDS_MON_DROP 2 22 23 struct mon_drop { 24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 25 uint32_t ppdu_id : 32; 26 uint32_t ppdu_drop_cnt : 10, 27 mpdu_drop_cnt : 10, 28 tlv_drop_cnt : 10, 29 end_of_ppdu_seen : 1, 30 reserved_1a : 1; 31 #else 32 uint32_t ppdu_id : 32; 33 uint32_t reserved_1a : 1, 34 end_of_ppdu_seen : 1, 35 tlv_drop_cnt : 10, 36 mpdu_drop_cnt : 10, 37 ppdu_drop_cnt : 10; 38 #endif 39 }; 40 41 #define MON_DROP_PPDU_ID_OFFSET 0x00000000 42 #define MON_DROP_PPDU_ID_LSB 0 43 #define MON_DROP_PPDU_ID_MSB 31 44 #define MON_DROP_PPDU_ID_MASK 0xffffffff 45 46 #define MON_DROP_PPDU_DROP_CNT_OFFSET 0x00000004 47 #define MON_DROP_PPDU_DROP_CNT_LSB 0 48 #define MON_DROP_PPDU_DROP_CNT_MSB 9 49 #define MON_DROP_PPDU_DROP_CNT_MASK 0x000003ff 50 51 #define MON_DROP_MPDU_DROP_CNT_OFFSET 0x00000004 52 #define MON_DROP_MPDU_DROP_CNT_LSB 10 53 #define MON_DROP_MPDU_DROP_CNT_MSB 19 54 #define MON_DROP_MPDU_DROP_CNT_MASK 0x000ffc00 55 56 #define MON_DROP_TLV_DROP_CNT_OFFSET 0x00000004 57 #define MON_DROP_TLV_DROP_CNT_LSB 20 58 #define MON_DROP_TLV_DROP_CNT_MSB 29 59 #define MON_DROP_TLV_DROP_CNT_MASK 0x3ff00000 60 61 #define MON_DROP_END_OF_PPDU_SEEN_OFFSET 0x00000004 62 #define MON_DROP_END_OF_PPDU_SEEN_LSB 30 63 #define MON_DROP_END_OF_PPDU_SEEN_MSB 30 64 #define MON_DROP_END_OF_PPDU_SEEN_MASK 0x40000000 65 66 #define MON_DROP_RESERVED_1A_OFFSET 0x00000004 67 #define MON_DROP_RESERVED_1A_LSB 31 68 #define MON_DROP_RESERVED_1A_MSB 31 69 #define MON_DROP_RESERVED_1A_MASK 0x80000000 70 71 #endif 72