Lines Matching refs:udev
205 static int ath3k_load_firmware(struct usb_device *udev, in ath3k_load_firmware() argument
213 BT_DBG("udev %p", udev); in ath3k_load_firmware()
221 err = usb_control_msg_send(udev, 0, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR, in ath3k_load_firmware()
231 pipe = usb_sndbulkpipe(udev, 0x02); in ath3k_load_firmware()
240 err = usb_bulk_msg(udev, pipe, send_buf, size, in ath3k_load_firmware()
257 static int ath3k_get_state(struct usb_device *udev, unsigned char *state) in ath3k_get_state() argument
259 return usb_control_msg_recv(udev, 0, ATH3K_GETSTATE, in ath3k_get_state()
265 static int ath3k_get_version(struct usb_device *udev, in ath3k_get_version() argument
268 return usb_control_msg_recv(udev, 0, ATH3K_GETVERSION, in ath3k_get_version()
274 static int ath3k_load_fwfile(struct usb_device *udev, in ath3k_load_fwfile() argument
292 ret = usb_control_msg_send(udev, 0, ATH3K_DNLOAD, USB_TYPE_VENDOR, 0, 0, in ath3k_load_fwfile()
304 pipe = usb_sndbulkpipe(udev, 0x02); in ath3k_load_fwfile()
313 err = usb_bulk_msg(udev, pipe, send_buf, size, in ath3k_load_fwfile()
328 static void ath3k_switch_pid(struct usb_device *udev) in ath3k_switch_pid() argument
330 usb_control_msg_send(udev, 0, USB_REG_SWITCH_VID_PID, USB_TYPE_VENDOR, in ath3k_switch_pid()
334 static int ath3k_set_normal_mode(struct usb_device *udev) in ath3k_set_normal_mode() argument
339 ret = ath3k_get_state(udev, &fw_state); in ath3k_set_normal_mode()
350 return usb_control_msg_send(udev, 0, ATH3K_SET_NORMAL_MODE, in ath3k_set_normal_mode()
355 static int ath3k_load_patch(struct usb_device *udev) in ath3k_load_patch() argument
364 ret = ath3k_get_state(udev, &fw_state); in ath3k_load_patch()
375 ret = ath3k_get_version(udev, &fw_version); in ath3k_load_patch()
384 ret = request_firmware(&firmware, filename, &udev->dev); in ath3k_load_patch()
402 ret = ath3k_load_fwfile(udev, firmware); in ath3k_load_patch()
408 static int ath3k_load_syscfg(struct usb_device *udev) in ath3k_load_syscfg() argument
416 ret = ath3k_get_state(udev, &fw_state); in ath3k_load_syscfg()
422 ret = ath3k_get_version(udev, &fw_version); in ath3k_load_syscfg()
447 ret = request_firmware(&firmware, filename, &udev->dev); in ath3k_load_syscfg()
453 ret = ath3k_load_fwfile(udev, firmware); in ath3k_load_syscfg()
463 struct usb_device *udev = interface_to_usbdev(intf); in ath3k_probe() local
483 if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001) in ath3k_probe()
486 ret = ath3k_load_patch(udev); in ath3k_probe()
491 ret = ath3k_load_syscfg(udev); in ath3k_probe()
496 ret = ath3k_set_normal_mode(udev); in ath3k_probe()
501 ath3k_switch_pid(udev); in ath3k_probe()
505 ret = request_firmware(&firmware, ATH3K_FIRMWARE, &udev->dev); in ath3k_probe()
516 ret = ath3k_load_firmware(udev, firmware); in ath3k_probe()