Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btmtk: improve mt79xx firmware setup retry flow

If retries are exhausted, driver should not do futher operation.
During mt79xx firmware download process, if the retry count reaches0,
driver will return an -EIO error and release the firmware resources.

Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Chris Lu and committed by
Luiz Augusto von Dentz
54f1f020 a80b51f0

+6
+6
drivers/bluetooth/btmtk.c
··· 205 205 } 206 206 } 207 207 208 + /* If retry exhausted goto err_release_fw */ 209 + if (retry == 0) { 210 + err = -EIO; 211 + goto err_release_fw; 212 + } 213 + 208 214 fw_ptr += section_offset; 209 215 wmt_params.op = BTMTK_WMT_PATCH_DWNLD; 210 216 wmt_params.status = NULL;