-
Notifications
You must be signed in to change notification settings - Fork 2
/
bl_strs.c
182 lines (173 loc) · 9.55 KB
/
bl_strs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/**
******************************************************************************
*
* @file bl_strs.c
*
* @brief Miscellaneous debug strings
*
* Copyright (C) BouffaloLab 2017-2018
*
******************************************************************************
*/
#include "bl_utils.h"
#include "lmac_msg.h"
static const char *const bl_mmid2str[MSG_I(MM_MAX)] = {
[MSG_I(MM_RESET_REQ)] = "MM_RESET_REQ",
[MSG_I(MM_RESET_CFM)] = "MM_RESET_CFM",
[MSG_I(MM_START_REQ)] = "MM_START_REQ",
[MSG_I(MM_START_CFM)] = "MM_START_CFM",
[MSG_I(MM_VERSION_REQ)] = "MM_VERSION_REQ",
[MSG_I(MM_VERSION_CFM)] = "MM_VERSION_CFM",
[MSG_I(MM_ADD_IF_REQ)] = "MM_ADD_IF_REQ",
[MSG_I(MM_ADD_IF_CFM)] = "MM_ADD_IF_CFM",
[MSG_I(MM_REMOVE_IF_REQ)] = "MM_REMOVE_IF_REQ",
[MSG_I(MM_REMOVE_IF_CFM)] = "MM_REMOVE_IF_CFM",
[MSG_I(MM_STA_ADD_REQ)] = "MM_STA_ADD_REQ",
[MSG_I(MM_STA_ADD_CFM)] = "MM_STA_ADD_CFM",
[MSG_I(MM_STA_DEL_REQ)] = "MM_STA_DEL_REQ",
[MSG_I(MM_STA_DEL_CFM)] = "MM_STA_DEL_CFM",
[MSG_I(MM_SET_FILTER_REQ)] = "MM_SET_FILTER_REQ",
[MSG_I(MM_SET_FILTER_CFM)] = "MM_SET_FILTER_CFM",
[MSG_I(MM_SET_CHANNEL_REQ)] = "MM_SET_CHANNEL_REQ",
[MSG_I(MM_SET_CHANNEL_CFM)] = "MM_SET_CHANNEL_CFM",
[MSG_I(MM_SET_DTIM_REQ)] = "MM_SET_DTIM_REQ",
[MSG_I(MM_SET_DTIM_CFM)] = "MM_SET_DTIM_CFM",
[MSG_I(MM_SET_BEACON_INT_REQ)] = "MM_SET_BEACON_INT_REQ",
[MSG_I(MM_SET_BEACON_INT_CFM)] = "MM_SET_BEACON_INT_CFM",
[MSG_I(MM_SET_BASIC_RATES_REQ)] = "MM_SET_BASIC_RATES_REQ",
[MSG_I(MM_SET_BASIC_RATES_CFM)] = "MM_SET_BASIC_RATES_CFM",
[MSG_I(MM_SET_BSSID_REQ)] = "MM_SET_BSSID_REQ",
[MSG_I(MM_SET_BSSID_CFM)] = "MM_SET_BSSID_CFM",
[MSG_I(MM_SET_EDCA_REQ)] = "MM_SET_EDCA_REQ",
[MSG_I(MM_SET_EDCA_CFM)] = "MM_SET_EDCA_CFM",
[MSG_I(MM_SET_MODE_REQ)] = "MM_SET_MODE_REQ",
[MSG_I(MM_SET_MODE_CFM)] = "MM_SET_MODE_CFM",
[MSG_I(MM_SET_VIF_STATE_REQ)] = "MM_SET_VIF_STATE_REQ",
[MSG_I(MM_SET_VIF_STATE_CFM)] = "MM_SET_VIF_STATE_CFM",
[MSG_I(MM_SET_SLOTTIME_REQ)] = "MM_SET_SLOTTIME_REQ",
[MSG_I(MM_SET_SLOTTIME_CFM)] = "MM_SET_SLOTTIME_CFM",
[MSG_I(MM_SET_IDLE_REQ)] = "MM_SET_IDLE_REQ",
[MSG_I(MM_SET_IDLE_CFM)] = "MM_SET_IDLE_CFM",
[MSG_I(MM_KEY_ADD_REQ)] = "MM_KEY_ADD_REQ",
[MSG_I(MM_KEY_ADD_CFM)] = "MM_KEY_ADD_CFM",
[MSG_I(MM_KEY_DEL_REQ)] = "MM_KEY_DEL_REQ",
[MSG_I(MM_KEY_DEL_CFM)] = "MM_KEY_DEL_CFM",
[MSG_I(MM_BA_ADD_REQ)] = "MM_BA_ADD_REQ",
[MSG_I(MM_BA_ADD_CFM)] = "MM_BA_ADD_CFM",
[MSG_I(MM_BA_DEL_REQ)] = "MM_BA_DEL_REQ",
[MSG_I(MM_BA_DEL_CFM)] = "MM_BA_DEL_CFM",
[MSG_I(MM_PRIMARY_TBTT_IND)] = "MM_PRIMARY_TBTT_IND",
[MSG_I(MM_SECONDARY_TBTT_IND)] = "MM_SECONDARY_TBTT_IND",
[MSG_I(MM_SET_POWER_REQ)] = "MM_SET_POWER_REQ",
[MSG_I(MM_SET_POWER_CFM)] = "MM_SET_POWER_CFM",
[MSG_I(MM_DBG_TRIGGER_REQ)] = "MM_DBG_TRIGGER_REQ",
[MSG_I(MM_SET_PS_MODE_REQ)] = "MM_SET_PS_MODE_REQ",
[MSG_I(MM_SET_PS_MODE_CFM)] = "MM_SET_PS_MODE_CFM",
[MSG_I(MM_CHAN_CTXT_ADD_REQ)] = "MM_CHAN_CTXT_ADD_REQ",
[MSG_I(MM_CHAN_CTXT_ADD_CFM)] = "MM_CHAN_CTXT_ADD_CFM",
[MSG_I(MM_CHAN_CTXT_DEL_REQ)] = "MM_CHAN_CTXT_DEL_REQ",
[MSG_I(MM_CHAN_CTXT_DEL_CFM)] = "MM_CHAN_CTXT_DEL_CFM",
[MSG_I(MM_CHAN_CTXT_LINK_REQ)] = "MM_CHAN_CTXT_LINK_REQ",
[MSG_I(MM_CHAN_CTXT_LINK_CFM)] = "MM_CHAN_CTXT_LINK_CFM",
[MSG_I(MM_CHAN_CTXT_UNLINK_REQ)] = "MM_CHAN_CTXT_UNLINK_REQ",
[MSG_I(MM_CHAN_CTXT_UNLINK_CFM)] = "MM_CHAN_CTXT_UNLINK_CFM",
[MSG_I(MM_CHAN_CTXT_UPDATE_REQ)] = "MM_CHAN_CTXT_UPDATE_REQ",
[MSG_I(MM_CHAN_CTXT_UPDATE_CFM)] = "MM_CHAN_CTXT_UPDATE_CFM",
[MSG_I(MM_CHAN_CTXT_SCHED_REQ)] = "MM_CHAN_CTXT_SCHED_REQ",
[MSG_I(MM_CHAN_CTXT_SCHED_CFM)] = "MM_CHAN_CTXT_SCHED_CFM",
[MSG_I(MM_BCN_CHANGE_REQ)] = "MM_BCN_CHANGE_REQ",
[MSG_I(MM_BCN_CHANGE_CFM)] = "MM_BCN_CHANGE_CFM",
[MSG_I(MM_TIM_UPDATE_REQ)] = "MM_TIM_UPDATE_REQ",
[MSG_I(MM_TIM_UPDATE_CFM)] = "MM_TIM_UPDATE_CFM",
[MSG_I(MM_CONNECTION_LOSS_IND)] = "MM_CONNECTION_LOSS_IND",
[MSG_I(MM_CHANNEL_SWITCH_IND)] = "MM_CHANNEL_SWITCH_IND",
[MSG_I(MM_CHANNEL_PRE_SWITCH_IND)] = "MM_CHANNEL_PRE_SWITCH_IND",
[MSG_I(MM_REMAIN_ON_CHANNEL_REQ)] = "MM_REMAIN_ON_CHANNEL_REQ",
[MSG_I(MM_REMAIN_ON_CHANNEL_CFM)] = "MM_REMAIN_ON_CHANNEL_CFM",
[MSG_I(MM_REMAIN_ON_CHANNEL_EXP_IND)] = "MM_REMAIN_ON_CHANNEL_EXP_IND",
[MSG_I(MM_PS_CHANGE_IND)] = "MM_PS_CHANGE_IND",
[MSG_I(MM_TRAFFIC_REQ_IND)] = "MM_TRAFFIC_REQ_IND",
[MSG_I(MM_SET_PS_OPTIONS_REQ)] = "MM_SET_PS_OPTIONS_REQ",
[MSG_I(MM_SET_PS_OPTIONS_CFM)] = "MM_SET_PS_OPTIONS_CFM",
[MSG_I(MM_P2P_VIF_PS_CHANGE_IND)] = "MM_P2P_VIF_PS_CHANGE_IND",
[MSG_I(MM_CSA_COUNTER_IND)] = "MM_CSA_COUNTER_IND",
[MSG_I(MM_CHANNEL_SURVEY_IND)] = "MM_CHANNEL_SURVEY_IND",
[MSG_I(MM_CFG_RSSI_REQ)] = "MM_CFG_RSSI_REQ",
[MSG_I(MM_RSSI_STATUS_IND)] = "MM_RSSI_STATUS_IND",
[MSG_I(MM_CSA_FINISH_IND)] = "MM_CSA_FINISH_IND",
[MSG_I(MM_CSA_TRAFFIC_IND)] = "MM_CSA_TRAFFIC_IND",
};
static const char *const bl_dbgid2str[MSG_I(DBG_MAX)] = {
[MSG_I(DBG_MEM_READ_REQ)] = "DBG_MEM_READ_REQ",
[MSG_I(DBG_MEM_READ_CFM)] = "DBG_MEM_READ_CFM",
[MSG_I(DBG_MEM_WRITE_REQ)] = "DBG_MEM_WRITE_REQ",
[MSG_I(DBG_MEM_WRITE_CFM)] = "DBG_MEM_WRITE_CFM",
[MSG_I(DBG_SET_MOD_FILTER_REQ)] = "DBG_SET_MOD_FILTER_REQ",
[MSG_I(DBG_SET_MOD_FILTER_CFM)] = "DBG_SET_MOD_FILTER_CFM",
[MSG_I(DBG_SET_SEV_FILTER_REQ)] = "DBG_SET_SEV_FILTER_REQ",
[MSG_I(DBG_SET_SEV_FILTER_CFM)] = "DBG_SET_SEV_FILTER_CFM",
[MSG_I(DBG_ERROR_IND)] = "DBG_ERROR_IND",
[MSG_I(DBG_GET_SYS_STAT_REQ)] = "DBG_GET_SYS_STAT_REQ",
[MSG_I(DBG_GET_SYS_STAT_CFM)] = "DBG_GET_SYS_STAT_CFM",
};
static const char *const bl_scanid2str[MSG_I(SCAN_MAX)] = {
[MSG_I(SCAN_START_REQ)] = "SCAN_START_REQ",
[MSG_I(SCAN_START_CFM)] = "SCAN_START_CFM",
[MSG_I(SCAN_DONE_IND)] = "SCAN_DONE_IND",
};
static const char *const bl_scanuid2str[MSG_I(SCANU_MAX)] = {
[MSG_I(SCANU_START_REQ)] = "SCANU_START_REQ",
[MSG_I(SCANU_START_CFM)] = "SCANU_START_CFM",
[MSG_I(SCANU_JOIN_REQ)] = "SCANU_JOIN_REQ",
[MSG_I(SCANU_JOIN_CFM)] = "SCANU_JOIN_CFM",
[MSG_I(SCANU_RESULT_IND)] = "SCANU_RESULT_IND",
[MSG_I(SCANU_FAST_REQ)] = "SCANU_FAST_REQ",
[MSG_I(SCANU_FAST_CFM)] = "SCANU_FAST_CFM",
};
static const char *const bl_meid2str[MSG_I(ME_MAX)] = {
[MSG_I(ME_CONFIG_REQ)] = "ME_CONFIG_REQ",
[MSG_I(ME_CONFIG_CFM)] = "ME_CONFIG_CFM",
[MSG_I(ME_CHAN_CONFIG_REQ)] = "ME_CHAN_CONFIG_REQ",
[MSG_I(ME_CHAN_CONFIG_CFM)] = "ME_CHAN_CONFIG_CFM",
[MSG_I(ME_SET_CONTROL_PORT_REQ)] = "ME_SET_CONTROL_PORT_REQ",
[MSG_I(ME_SET_CONTROL_PORT_CFM)] = "ME_SET_CONTROL_PORT_CFM",
[MSG_I(ME_TKIP_MIC_FAILURE_IND)] = "ME_TKIP_MIC_FAILURE_IND",
[MSG_I(ME_STA_ADD_REQ)] = "ME_STA_ADD_REQ",
[MSG_I(ME_STA_ADD_CFM)] = "ME_STA_ADD_CFM",
[MSG_I(ME_STA_DEL_REQ)] = "ME_STA_DEL_REQ",
[MSG_I(ME_STA_DEL_CFM)] = "ME_STA_DEL_CFM",
[MSG_I(ME_TX_CREDITS_UPDATE_IND)]= "ME_TX_CREDITS_UPDATE_IND",
[MSG_I(ME_RC_STATS_REQ)] = "ME_RC_STATS_REQ",
[MSG_I(ME_RC_STATS_CFM)] = "ME_RC_STATS_CFM",
[MSG_I(ME_RC_SET_RATE_REQ)] = "ME_RC_SET_RATE_REQ",
[MSG_I(ME_TRAFFIC_IND_REQ)] = "ME_TRAFFIC_IND_REQ",
[MSG_I(ME_TRAFFIC_IND_CFM)] = "ME_TRAFFIC_IND_CFM",
};
static const char *const bl_smid2str[MSG_I(SM_MAX)] = {
[MSG_I(SM_CONNECT_REQ)] = "SM_CONNECT_REQ",
[MSG_I(SM_CONNECT_CFM)] = "SM_CONNECT_CFM",
[MSG_I(SM_CONNECT_IND)] = "SM_CONNECT_IND",
[MSG_I(SM_DISCONNECT_REQ)] = "SM_DISCONNECT_REQ",
[MSG_I(SM_DISCONNECT_CFM)] = "SM_DISCONNECT_CFM",
[MSG_I(SM_DISCONNECT_IND)] = "SM_DISCONNECT_IND",
[MSG_I(SM_RSP_TIMEOUT_IND)] = "SM_RSP_TIMEOUT_IND",
};
static const char *const bl_apmid2str[MSG_I(APM_MAX)] = {
[MSG_I(APM_START_REQ)] = "APM_START_REQ",
[MSG_I(APM_START_CFM)] = "APM_START_CFM",
[MSG_I(APM_STOP_REQ)] = "APM_STOP_REQ",
[MSG_I(APM_STOP_CFM)] = "APM_STOP_CFM",
[MSG_I(APM_START_CAC_REQ)] = "APM_START_CAC_REQ",
[MSG_I(APM_START_CAC_CFM)] = "APM_START_CAC_CFM",
[MSG_I(APM_STOP_CAC_REQ)] = "APM_STOP_CAC_REQ",
[MSG_I(APM_STOP_CAC_CFM)] = "APM_STOP_CAC_CFM",
};
const char *const *bl_id2str[TASK_LAST_EMB + 1] = {
[TASK_MM] = bl_mmid2str,
[TASK_DBG] = bl_dbgid2str,
[TASK_SCAN] = bl_scanid2str,
[TASK_SCANU] = bl_scanuid2str,
[TASK_ME] = bl_meid2str,
[TASK_SM] = bl_smid2str,
[TASK_APM] = bl_apmid2str,
};