jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <string.h> |
| 4 | #include <sys/types.h> |
| 5 | #include <sys/stat.h> |
| 6 | #include <fcntl.h> |
| 7 | #include <errno.h> |
| 8 | #include <pthread.h> |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 9 | #include<unistd.h> |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 10 | #include <cutils/uevent.h> |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 11 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 12 | #include <lynq_autosuspend.h> |
| 13 | #include "lynq-qser-autosuspend.h" |
| 14 | #include "liblog/lynq_deflog.h" |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 15 | #include "sc_mnet_whitelist.h" |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | |
| 22 | extern int lynq_autosleep_enable(void); |
| 23 | extern int lynq_autosleep_disable(void); |
| 24 | extern int release_wake_lock(char *name); |
| 25 | extern int acquire_wake_lock(int lock, char *name); |
| 26 | |
| 27 | #define USER_LOG_TAG "LYNQ_QSER_AUTOSUSPEND" |
| 28 | #define FILE_LOCK_TABLE "/tmp/.lock_table" |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 29 | #define UEVENT_MSG_LEN 128 |
| 30 | |
| 31 | |
| 32 | struct dtr_uevent { |
| 33 | const char *action; |
| 34 | const char *path; |
| 35 | const char *subsystem; |
| 36 | const char *usbevent; |
| 37 | }; |
| 38 | |
| 39 | static void parse_event(const char *msg, struct dtr_uevent *dtr_uevent); |
| 40 | |
| 41 | |
| 42 | qser_lpm_Handler_t g_lpm_handler = NULL; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 43 | |
| 44 | |
| 45 | LOCK_TABLE lock_status; |
| 46 | |
| 47 | |
| 48 | int file_fd; |
| 49 | int first_run = 0; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 50 | pthread_t thid; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 51 | |
| 52 | |
| 53 | int lock_table_init(void) |
| 54 | { |
| 55 | int ret; |
| 56 | int err; |
| 57 | |
| 58 | file_fd = open(FILE_LOCK_TABLE, O_RDWR| O_CREAT,0777); |
| 59 | if(file_fd < 0) |
| 60 | { |
| 61 | err = errno; |
| 62 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
| 63 | return -err; |
| 64 | } |
| 65 | memset(&lock_status, 0, sizeof(lock_status)); |
| 66 | ret = write(file_fd, (char*)&lock_status, sizeof(lock_status)); |
| 67 | if(ret <= 0) |
| 68 | { |
| 69 | LYINFLOG("write fail\n"); |
| 70 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 71 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 72 | } |
| 73 | sync(); |
| 74 | close(file_fd); |
| 75 | return 0; |
| 76 | } |
| 77 | |
| 78 | |
| 79 | int read_lock_table(void) |
| 80 | { |
| 81 | int err; |
| 82 | int ret; |
| 83 | int i; |
| 84 | LYLOGSET(LOG_INFO); |
| 85 | LYLOGEINIT(USER_LOG_TAG); |
| 86 | |
| 87 | if(access(FILE_LOCK_TABLE,0) < 0) |
| 88 | { |
| 89 | ret = lock_table_init(); |
| 90 | if(ret < 0) |
| 91 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 92 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 93 | } |
| 94 | } |
| 95 | |
| 96 | file_fd = open(FILE_LOCK_TABLE,O_RDWR); |
| 97 | if(file_fd < 0) |
| 98 | { |
| 99 | err = errno; |
| 100 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 101 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | memset(&lock_status, 0, sizeof(lock_status)); |
| 105 | lseek(file_fd,0,SEEK_SET); |
| 106 | ret = read(file_fd,(unsigned char *)&lock_status,sizeof(lock_status)); |
| 107 | LYINFLOG("read ret=%d\n", ret); |
| 108 | if(ret <= 0) |
| 109 | { |
| 110 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 111 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | for(i=0;i<MAX_LOCK_NUM;i++) |
| 115 | { |
| 116 | if(strlen(lock_status.lock_name[i]) != 0) |
| 117 | { |
| 118 | LYINFLOG("fd: %d lock_name:%s strlen:%d\n", i, lock_status.lock_name[i], strlen(lock_status.lock_name[i])); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | close(file_fd); |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | |
| 127 | int save_lock_table(void) |
| 128 | { |
| 129 | int err; |
| 130 | int ret; |
| 131 | file_fd = open(FILE_LOCK_TABLE,O_RDWR); |
| 132 | if(file_fd < 0) |
| 133 | { |
| 134 | err = errno; |
| 135 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 136 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 137 | } |
| 138 | LYINFLOG("write lock_name[0]: %s\n", lock_status.lock_name[0]); |
| 139 | ret = write(file_fd, (unsigned char *)&lock_status, sizeof(lock_status)); |
| 140 | LYINFLOG("write ret=%d\n", ret); |
| 141 | if(ret <= 0) |
| 142 | { |
| 143 | LYINFLOG("write fail\n"); |
| 144 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 145 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 146 | } |
| 147 | sync(); |
| 148 | close(file_fd); |
| 149 | |
| 150 | return 0; |
| 151 | } |
| 152 | |
| 153 | |
| 154 | int check_lock(char *name) |
| 155 | { |
| 156 | int j; |
| 157 | int num; |
| 158 | for(j=0;j<MAX_LOCK_NUM;j++) |
| 159 | { |
| 160 | if(strcmp(lock_status.lock_name[j], name) == 0) |
| 161 | { |
| 162 | num = j; |
| 163 | break; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | if(j < MAX_LOCK_NUM) |
| 168 | { |
| 169 | return num; |
| 170 | } |
| 171 | |
| 172 | return -1; |
| 173 | } |
| 174 | |
| 175 | |
| 176 | int add_lock(char *name) |
| 177 | { |
| 178 | int ret; |
| 179 | int i = 0; |
| 180 | int num; |
| 181 | int check_flag; |
| 182 | |
| 183 | LYINFLOG("name:%s\n", name); |
| 184 | ret = read_lock_table(); |
| 185 | LYINFLOG("read_lock_table ret = %d\n", ret); |
| 186 | if(ret <0) |
| 187 | { |
| 188 | return ret; |
| 189 | } |
| 190 | |
| 191 | check_flag = check_lock(name); |
| 192 | |
| 193 | if(check_flag < 0) |
| 194 | { |
| 195 | for(i=0;i<MAX_LOCK_NUM;i++) |
| 196 | { |
| 197 | if(strlen(lock_status.lock_name[i]) == 0) |
| 198 | { |
| 199 | strcpy(lock_status.lock_name[i], name); |
| 200 | LYINFLOG("lock_name[%d] %s\n", i, lock_status.lock_name[i]); |
| 201 | break; |
| 202 | } |
| 203 | } |
| 204 | if(i == MAX_LOCK_NUM) |
| 205 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 206 | return E_TABLE_FULL; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 207 | } |
| 208 | else |
| 209 | { |
| 210 | num = i; |
| 211 | } |
| 212 | } |
| 213 | else |
| 214 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 215 | return E_LOCK_EXIST; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | LYINFLOG("num = %d\n", num); |
| 219 | ret = save_lock_table(); |
| 220 | if(ret < 0) |
| 221 | { |
| 222 | return ret; |
| 223 | } |
| 224 | return num; |
| 225 | } |
| 226 | |
| 227 | int delete_lock(int fd) |
| 228 | { |
| 229 | int ret; |
| 230 | int i; |
| 231 | ret = read_lock_table(); |
| 232 | memset(lock_status.lock_name[fd], 0, sizeof(lock_status.lock_name[fd])); |
| 233 | ret = save_lock_table(); |
| 234 | return ret; |
| 235 | } |
| 236 | |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 237 | static void parse_event(const char *msg, struct dtr_uevent *dtr_uevent) |
| 238 | { |
| 239 | dtr_uevent->action = ""; |
| 240 | dtr_uevent->path = ""; |
| 241 | dtr_uevent->subsystem = ""; |
| 242 | dtr_uevent->usbevent = ""; |
| 243 | |
| 244 | while (*msg) { |
| 245 | if (!strncmp(msg, "ACTION=", 7)) |
| 246 | { |
| 247 | msg += 7; |
| 248 | dtr_uevent->action = msg; |
| 249 | } |
| 250 | else if (!strncmp(msg, "DEVPATH=", 8)) |
| 251 | { |
| 252 | msg += 8; |
| 253 | dtr_uevent->path = msg; |
| 254 | } |
| 255 | else if (!strncmp(msg, "SUBSYSTEM=", 10)) |
| 256 | { |
| 257 | msg += 10; |
| 258 | dtr_uevent->subsystem = msg; |
| 259 | } |
| 260 | else if (!strncmp(msg, "USBEVENT=", 9)) { |
| 261 | msg += 9; |
| 262 | dtr_uevent->usbevent = msg; |
| 263 | } |
| 264 | |
| 265 | while(*msg++); |
| 266 | } |
| 267 | |
| 268 | LYINFLOG("event { '%s', '%s', '%s', '%s'}\n", |
| 269 | dtr_uevent->action, dtr_uevent->path, dtr_uevent->subsystem,dtr_uevent->usbevent); |
| 270 | } |
| 271 | |
| 272 | |
| 273 | |
| 274 | void *check_dtr(void * arg) |
| 275 | { |
| 276 | int device_fd; |
| 277 | qser_lpm_edge_t lpm_edge; |
| 278 | char msg[UEVENT_MSG_LEN+2]; |
| 279 | struct dtr_uevent dtr_uevent; |
| 280 | int n; |
| 281 | int i; |
| 282 | |
| 283 | device_fd = uevent_open_socket(4*UEVENT_MSG_LEN, true); |
| 284 | if(device_fd < 0) |
| 285 | { |
| 286 | LYERRLOG("uevent_open_socket fail\n"); |
| 287 | return -1; |
| 288 | } |
| 289 | while(1) |
| 290 | { |
| 291 | n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN); |
| 292 | msg[n] = '\0'; |
| 293 | msg[n+1] = '\0'; |
| 294 | parse_event(msg, &dtr_uevent); |
| 295 | if((!strcmp(dtr_uevent.subsystem, "xp2xp")) && (!strcmp(dtr_uevent.action, "online"))) |
| 296 | { |
| 297 | g_lpm_handler(lpm_edge); |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | return 0; |
| 302 | } |
| 303 | |
| 304 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 305 | int qser_lpm_init(qser_lpm_Handler_t qser_lpm_handler, qser_pm_cfg_t *qser_lpm_cfg) |
| 306 | { |
| 307 | int ret; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 308 | int num; |
| 309 | |
| 310 | g_lpm_handler = qser_lpm_handler; |
| 311 | ret = pthread_create(&thid,NULL,check_dtr,NULL); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 312 | if(ret != 0) |
| 313 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 314 | LYERRLOG("restart service fail"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 315 | } |
| 316 | return ret; |
| 317 | } |
| 318 | |
| 319 | |
| 320 | int qser_lpm_deinit(void) |
| 321 | { |
| 322 | int ret; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 323 | ret = pthread_cancel(thid); |
| 324 | if(!ret) |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 325 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 326 | LYERRLOG("pthread cancel success, lpm deinit success\n"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 327 | } |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 328 | else |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 329 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 330 | LYERRLOG("pthread cancel fail, lpm deinit fail\n"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 331 | } |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame^] | 332 | return ret; |
| 333 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 334 | } |
| 335 | |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 336 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 337 | int qser_autosuspend_enable(char enable) |
| 338 | { |
| 339 | int ret; |
| 340 | if(enable == '0') |
| 341 | { |
| 342 | ret = lynq_autosleep_disable(); |
| 343 | |
| 344 | } |
| 345 | else if(enable == '1') |
| 346 | { |
| 347 | ret = lynq_autosleep_enable(); |
| 348 | } |
| 349 | else |
| 350 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 351 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 352 | |
| 353 | } |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 354 | if(ret >= 0) |
| 355 | { |
| 356 | ret = 0; |
| 357 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 358 | return ret; |
| 359 | |
| 360 | } |
| 361 | |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 362 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 363 | int qser_wakelock_create(const char *name, size_t len) |
| 364 | { |
| 365 | int ret; |
| 366 | if(name == NULL) |
| 367 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 368 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 369 | } |
| 370 | LYINFLOG("%s\n", name); |
| 371 | ret = add_lock(name); |
| 372 | return ret; |
| 373 | } |
| 374 | |
| 375 | int qser_wakelock_lock(int fd) |
| 376 | { |
| 377 | |
| 378 | int ret; |
| 379 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 380 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 381 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 382 | } |
| 383 | ret = read_lock_table(); |
| 384 | ret = acquire_wake_lock( 0, lock_status.lock_name[fd]); |
jb.qi | 68fe778 | 2023-09-18 20:40:58 -0700 | [diff] [blame] | 385 | if(ret > 0) |
| 386 | { |
| 387 | ret = 0; |
| 388 | } |
| 389 | else |
| 390 | { |
| 391 | ret = -1; |
| 392 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 393 | return ret; |
| 394 | } |
| 395 | |
| 396 | int qser_wakelock_unlock(int fd) |
| 397 | { |
| 398 | int ret; |
| 399 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 400 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 401 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 402 | } |
| 403 | ret = read_lock_table(); |
| 404 | if(strlen(lock_status.lock_name[fd]) == 0) |
| 405 | { |
| 406 | LYINFLOG("%d is null\n", fd); |
| 407 | return -1; |
| 408 | } |
| 409 | ret = release_wake_lock(lock_status.lock_name[fd]); |
jb.qi | 68fe778 | 2023-09-18 20:40:58 -0700 | [diff] [blame] | 410 | if(ret > 0) |
| 411 | { |
| 412 | ret = 0; |
| 413 | } |
| 414 | else |
| 415 | { |
| 416 | ret = -1; |
| 417 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 418 | return ret; |
| 419 | } |
| 420 | |
| 421 | int qser_wakelock_destroy(int fd) |
| 422 | { |
| 423 | int ret; |
| 424 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 425 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 426 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 427 | } |
jb.qi | 5221035 | 2023-09-19 23:29:09 -0700 | [diff] [blame] | 428 | ret = qser_wakelock_unlock(fd); |
| 429 | if(ret) |
| 430 | { |
| 431 | LYINFLOG("unlock is fail\n"); |
| 432 | return ret; |
| 433 | } |
| 434 | |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 435 | ret = delete_lock(fd); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 436 | return ret; |
| 437 | } |
| 438 | |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 439 | int qser_whitelist_add(int id) |
| 440 | { |
| 441 | int ret; |
| 442 | if(sc_mnet_whitelist_init() != 0) |
| 443 | { |
| 444 | LYINFLOG("sc_mnet_whitelist_init failed.\n"); |
| 445 | return -1; |
| 446 | } |
| 447 | |
| 448 | ret = sc_mnet_whitelist_add(id); |
| 449 | LYINFLOG("sc_mnet_whitelist_add ret %d.\n", ret); |
| 450 | |
| 451 | sc_mnet_whitelist_deinit(); |
| 452 | return ret; |
| 453 | |
| 454 | } |
| 455 | |
| 456 | int qser_whitelist_del(int id) |
| 457 | { |
| 458 | int ret; |
| 459 | if(sc_mnet_whitelist_init() != 0) |
| 460 | { |
| 461 | LYINFLOG("sc_mnet_whitelist_init failed.\n"); |
| 462 | return -1; |
| 463 | } |
| 464 | |
| 465 | ret = sc_mnet_whitelist_del(id); |
| 466 | LYINFLOG("qser_whitelist_del ret %d.\n", ret); |
| 467 | |
| 468 | sc_mnet_whitelist_deinit(); |
| 469 | return ret; |
| 470 | |
| 471 | } |
| 472 | |
| 473 | int qser_whitelist_get(char* whitelist) |
| 474 | { |
| 475 | int ret; |
| 476 | if(sc_mnet_whitelist_init() != 0) |
| 477 | { |
| 478 | LYINFLOG("sc_mnet_whitelist_init failed.\n"); |
| 479 | return -1; |
| 480 | } |
| 481 | |
| 482 | whitelist = sc_mnet_whitelist_get(); |
| 483 | if(NULL != whitelist) |
| 484 | { |
| 485 | LYINFLOG("sc_mnet_whitelist_get :%s\n",whitelist); |
| 486 | ret = 0; |
| 487 | } |
| 488 | else |
| 489 | { |
| 490 | LYINFLOG("sc_mnet_whitelist_get empty\n"); |
| 491 | ret = -1; |
| 492 | } |
| 493 | sc_mnet_whitelist_deinit(); |
| 494 | return ret; |
| 495 | } |
| 496 | |
| 497 | int qser_whitelist_clear(void) |
| 498 | { |
| 499 | int ret; |
| 500 | if(sc_mnet_whitelist_init() != 0) |
| 501 | { |
| 502 | LYINFLOG("sc_mnet_whitelist_init failed.\n"); |
| 503 | return -1; |
| 504 | } |
| 505 | ret = sc_mnet_whitelist_clear(); |
| 506 | LYINFLOG("sc_mnet_whitelist_clear ret %d\n", ret); |
| 507 | sc_mnet_whitelist_deinit(); |
| 508 | return ret; |
| 509 | |
| 510 | } |
| 511 | |
| 512 | |
you.chen | 21c62b7 | 2023-09-08 09:41:11 +0800 | [diff] [blame] | 513 | DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_AUTOSUSPEND) |
| 514 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 515 | #ifdef __cplusplus |
| 516 | } |
| 517 | #endif |
| 518 | |
| 519 | |
| 520 | |