Merge "Bluetooth: btrtl: Fix an issue that failing to download the FW which size is over 32K bytes" into odroidg12-4.9.y-android

This commit is contained in:
Chris
2020-11-09 16:19:04 +09:00
committed by Gerrit Code Review

View File

@@ -411,7 +411,11 @@ static int rtl_download_firmware(struct hci_dev *hdev,
BT_DBG("download fw (%d/%d)", i, frag_num);
dl_cmd->index = i;
if (i > 0x7f)
dl_cmd->index = (i & 0x7f) + 1;
else
dl_cmd->index = i;
if (i == (frag_num - 1)) {
dl_cmd->index |= 0x80; /* data end */
frag_len = fw_len % RTL_FRAG_LEN;