@@ -489,7 +489,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
489
489
}
490
490
491
491
switch (version -> img_type ) {
492
- case 0x01 :
492
+ case BTINTEL_IMG_BOOTLOADER :
493
493
variant = "Bootloader" ;
494
494
/* It is required that every single firmware fragment is acknowledged
495
495
* with a command complete event. If the boot parameters indicate
@@ -521,7 +521,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
521
521
version -> min_fw_build_nn , version -> min_fw_build_cw ,
522
522
2000 + version -> min_fw_build_yy );
523
523
break ;
524
- case 0x03 :
524
+ case BTINTEL_IMG_OP :
525
525
variant = "Firmware" ;
526
526
break ;
527
527
default :
@@ -535,7 +535,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
535
535
bt_dev_info (hdev , "%s timestamp %u.%u buildtype %u build %u" , variant ,
536
536
2000 + (version -> timestamp >> 8 ), version -> timestamp & 0xff ,
537
537
version -> build_type , version -> build_num );
538
- if (version -> img_type == 0x03 )
538
+ if (version -> img_type == BTINTEL_IMG_OP )
539
539
bt_dev_info (hdev , "Firmware SHA1: 0x%8.8x" , version -> git_sha1 );
540
540
541
541
return 0 ;
@@ -1172,7 +1172,7 @@ static int btintel_download_fw_tlv(struct hci_dev *hdev,
1172
1172
* If the firmware version has changed that means it needs to be reset
1173
1173
* to bootloader when operational so the new firmware can be loaded.
1174
1174
*/
1175
- if (ver -> img_type == 0x03 )
1175
+ if (ver -> img_type == BTINTEL_IMG_OP )
1176
1176
return - EINVAL ;
1177
1177
1178
1178
/* iBT hardware variants 0x0b, 0x0c, 0x11, 0x12, 0x13, 0x14 support
@@ -2230,7 +2230,7 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev,
2230
2230
* It is not possible to use the Secure Boot Parameters in this
2231
2231
* case since that command is only available in bootloader mode.
2232
2232
*/
2233
- if (ver -> img_type == 0x03 ) {
2233
+ if (ver -> img_type == BTINTEL_IMG_OP ) {
2234
2234
btintel_clear_flag (hdev , INTEL_BOOTLOADER );
2235
2235
btintel_check_bdaddr (hdev );
2236
2236
} else {
@@ -2600,7 +2600,7 @@ static int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
2600
2600
return err ;
2601
2601
2602
2602
/* check if controller is already having an operational firmware */
2603
- if (ver -> img_type == 0x03 )
2603
+ if (ver -> img_type == BTINTEL_IMG_OP )
2604
2604
goto finish ;
2605
2605
2606
2606
err = btintel_boot (hdev , boot_param );
0 commit comments