Skip to content

Commit b247693

Browse files
RyanHsugregkh
authored andcommitted
ath10k: ignore configuring the incorrect board_id
[ Upstream commit d2e202c06ca42d353d95df12437740921a6d05b5 ] With command to get board_id from otp, in the case of following boot get otp board id result 0x00000000 board_id 0 chip_id 0 boot using board name 'bus=pci,bmi-chip-id=0,bmi-board-id=0" ... failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=0 from ath10k/QCA6174/hw3.0/board-2.bin The invalid board_id=0 will be used as index to search in the board-2.bin. Ignore the case with board_id=0, as it means the otp is not carrying the board id information. Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 64b22ee commit b247693

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • drivers/net/wireless/ath/ath10k

drivers/net/wireless/ath/ath10k/core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,11 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar)
548548
"boot get otp board id result 0x%08x board_id %d chip_id %d\n",
549549
result, board_id, chip_id);
550550

551-
if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0)
551+
if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0 ||
552+
(board_id == 0)) {
553+
ath10k_warn(ar, "board id is not exist in otp, ignore it\n");
552554
return -EOPNOTSUPP;
555+
}
553556

554557
ar->id.bmi_ids_valid = true;
555558
ar->id.bmi_board_id = board_id;

0 commit comments

Comments
 (0)