Lines Matching full:profile

260 BOOL qmidevice_detect(char *qmichannel, char *usbnet_adapter, unsigned bufsize, PROFILE_T *profile)…  in qmidevice_detect()  argument
286 query_usb_device_info(pl->path, &profile->usb_dev); in qmidevice_detect()
287 if (profile->usb_dev.idVendor == CM_INVALID_VAL) in qmidevice_detect()
290 if (profile->usb_dev.idVendor == 0x2c7c || profile->usb_dev.idVendor == 0x05c6) { in qmidevice_detect()
292 rootdir, ent->d_name, profile->usb_dev.idVendor, profile->usb_dev.idProduct, in qmidevice_detect()
293 profile->usb_dev.busnum, profile->usb_dev.devnum); in qmidevice_detect()
300 for (netIntf = 0; netIntf < (profile->usb_dev.bNumInterfaces + 8); netIntf++) { in qmidevice_detect()
318 query_usb_interface_info(pl->path, &profile->usb_intf); in qmidevice_detect()
332 query_usb_interface_info(pl->path, &profile->usb_intf); in qmidevice_detect()
333 driver_type = get_driver_type(profile); in qmidevice_detect()
342 if (profile->usb_dev.idVendor == 0x2c7c) { //Quectel in qmidevice_detect()
343 if ((profile->usb_dev.idProduct&0xFF00) == 0x0900) //unisoc in qmidevice_detect()
345 else if ((profile->usb_dev.idProduct&0xF000) == 0x8000) //hisi in qmidevice_detect()
347 else if ((profile->usb_dev.idProduct&0xFF00) == 0x6000) //asr in qmidevice_detect()
349 //else if ((profile->usb_dev.idProduct&0xF000) == 0x0000) //mdm in qmidevice_detect()
387 int mhidevice_detect(char *qmichannel, char *usbnet_adapter, PROFILE_T *profile) { in mhidevice_detect() argument
399 profile->software_interface = SOFTWARE_MBIM; in mhidevice_detect()
403 profile->software_interface = SOFTWARE_QMI; in mhidevice_detect()
414 int get_driver_type(PROFILE_T *profile) in get_driver_type() argument
417 if (profile->usb_intf.bInterfaceClass == USB_CLASS_VENDOR_SPEC) { in get_driver_type()
420 else if (profile->usb_intf.bInterfaceClass == USB_CLASS_COMM) { in get_driver_type()
421 switch (profile->usb_intf.bInterfaceSubClass) { in get_driver_type()
433 else if (profile->usb_intf.bInterfaceClass == USB_CLASS_WIRELESS_CONTROLLER) { in get_driver_type()
434 if (profile->usb_intf.bInterfaceSubClass == 1 && profile->usb_intf.bInterfaceProtocol == 3) in get_driver_type()
439 profile->usb_intf.bInterfaceClass, profile->usb_intf.bInterfaceSubClass); in get_driver_type()
498 int reattach_driver(PROFILE_T *profile) in reattach_driver() argument
503 …snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d/%03d", profile->usb_dev.busnum, profile->usb… in reattach_driver()
549 PROFILE_T *profile = (PROFILE_T *)arg; in catch_log() local
555 snprintf(filter, sizeof(filter), ":%d:%03d:", profile->usb_dev.busnum, profile->usb_dev.devnum); in catch_log()
558 nreads = read(profile->usbmon_fd, tbuff + tsize, sizeof(tbuff) - tsize - 1); in catch_log()
573 fwrite(tbuff, strlen(tbuff), 1, profile->usbmon_logfile_fp); in catch_log()
579 int ql_capture_usbmon_log(PROFILE_T *profile, const char *log_path) in ql_capture_usbmon_log() argument
595 …snprintf(usbmon_path, sizeof(usbmon_path), "/sys/kernel/debug/usb/usbmon/%du", profile->usb_dev.bu… in ql_capture_usbmon_log()
596 profile->usbmon_fd = open(usbmon_path, O_RDONLY); in ql_capture_usbmon_log()
597 if (profile->usbmon_fd < 0) { in ql_capture_usbmon_log()
605 profile->usbmon_logfile_fp = fopen(log_path, "wb"); in ql_capture_usbmon_log()
606 if (!profile->usbmon_logfile_fp) { in ql_capture_usbmon_log()
608 close(profile->usbmon_fd); in ql_capture_usbmon_log()
609 profile->usbmon_fd = -1; in ql_capture_usbmon_log()
616 pthread_create(&pt, &attr, catch_log, (void *)profile); in ql_capture_usbmon_log()
621 void ql_stop_usbmon_log(PROFILE_T *profile) { in ql_stop_usbmon_log() argument
622 if (profile->usbmon_fd > 0) in ql_stop_usbmon_log()
623 close(profile->usbmon_fd); in ql_stop_usbmon_log()
624 if (profile->usbmon_logfile_fp) in ql_stop_usbmon_log()
625 fclose(profile->usbmon_logfile_fp); in ql_stop_usbmon_log()