You need to sign in or sign up before continuing.
提交 8b077bdb 编写于 作者: M Maxim Zhukov 提交者: Marcel Holtmann

Bluetooth: ath3k: replace hardcode numbers with define

Replaced the numbers with a readable define.
Signed-off-by: NMaxim Zhukov <mussitantesmortem@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 1ce0cec1
...@@ -227,15 +227,16 @@ static int ath3k_load_firmware(struct usb_device *udev, ...@@ -227,15 +227,16 @@ static int ath3k_load_firmware(struct usb_device *udev,
return -ENOMEM; return -ENOMEM;
} }
memcpy(send_buf, firmware->data, 20); memcpy(send_buf, firmware->data, FW_HDR_SIZE);
err = usb_control_msg(udev, pipe, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR, err = usb_control_msg(udev, pipe, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR,
0, 0, send_buf, 20, USB_CTRL_SET_TIMEOUT); 0, 0, send_buf, FW_HDR_SIZE,
USB_CTRL_SET_TIMEOUT);
if (err < 0) { if (err < 0) {
BT_ERR("Can't change to loading configuration err"); BT_ERR("Can't change to loading configuration err");
goto error; goto error;
} }
sent += 20; sent += FW_HDR_SIZE;
count -= 20; count -= FW_HDR_SIZE;
pipe = usb_sndbulkpipe(udev, 0x02); pipe = usb_sndbulkpipe(udev, 0x02);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册