1 /* 2 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 /** 20 * DOC: wlan_serialization_debug_i.h 21 * This file defines the prototypes for the debug functions 22 * for the serialization component. 23 */ 24 25 #ifndef __WLAN_SERIALIZATION_DEBUG_I_H 26 #define __WLAN_SERIALIZATION_DEBUG_I_H 27 28 #ifdef WLAN_SER_DEBUG 29 30 #define SER_MAX_HISTORY_CMDS 50 31 32 #define WLAN_SER_LINE "--------------------"\ 33 "--------------------" 34 35 #define WLAN_SER_HISTORY_HEADER " TIME|CMD_TYPE|CMD_ID|VDEV_ID|"\ 36 "BLOCKING|PRIORITY|ACTION|"\ 37 " QUEUE| REASON|" 38 39 enum ser_queue_type { 40 SER_PDEV_QUEUE_TYPE, 41 SER_VDEV_QUEUE_TYPE, 42 }; 43 44 struct ser_data { 45 /* 46 * Serialization Actions that modifies the serialization queues 47 * 0: SER_REQUEST 48 * 1: SER_REMOVE 49 * 2: SER_CANCEL 50 * 3: SER_TIMEOUT 51 * 4: SER_ACTIVATION_FAILED 52 * 5: SER_PENDING_TO_ACTIVE 53 */ 54 uint32_t cmd_type:6, /* max 2^6 = 64 types of commands */ 55 cmd_id:16, /* max cmd_id = 2^16 */ 56 is_blocking:1, 57 is_high_priority:1, 58 add_remove:1, 59 active_pending:1, 60 data_updated:1, 61 ser_reason:5; 62 63 uint16_t vdev_id; 64 uint64_t time; 65 }; 66 67 struct ser_history { 68 struct ser_data data[SER_MAX_HISTORY_CMDS]; 69 uint16_t index; 70 }; 71 #endif /* WLAN_SER_DEBUG */ 72 #endif 73 74