Marc Gonzalez <mgonzalez@xxxxxxxxxx> writes: >> Here's one example where in ath10k we use a feature bit as a workaround: >> >> /* Don't trust error code from otp.bin */ >> ATH10K_FW_FEATURE_IGNORE_OTP_RESULT = 7, >> >> .... >> >> if (!(skip_otp || test_bit(ATH10K_FW_FEATURE_IGNORE_OTP_RESULT, >> ar->running_fw->fw_file.fw_features)) && >> result != 0) { >> ath10k_err(ar, "otp calibration failed: %d", result); >> return -EINVAL; >> } >> >> BTW for modifying firmware-N.bin files we have a script here: >> >> https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath10k/ath10k-fwencoder > > If I understand correctly, you are saying that there is > (maybe... probably) a bug in the FW, so it makes sense to > tag that specific FW file with a special bit which the kernel > will interpret as "this FW is broken in a specific way; > and here's how to work around the issue." > > So this bit would serve the same purpose as my proposed > "qcom,no-msa-ready-indicator" bit (that bit existed instead > in my board's device tree). > > The problem I see is that the firmware files are signed. > Thus, changing a single bit breaks the verification... > UNLESS the FW format allows for a signed section ALONG-SIDE > an unsigned section? firmware-N.bin is ath10k specific container file format and we (the Linux community) have full access to it using ath10k-fwencoder, there's no signing or anything like that. One of the major reasons why it was designed was to handle differences between firmware branches, just like in this case. Of course plan A should be to fix the firmware but if that doesn't work out then plan B could be using the feature bit in firmware-N.bin. BTW related to this Dmitry is extending firmware-N.bin handling for WCN3990, you will most likely need to use that: https://patchwork.kernel.org/project/linux-wireless/cover/20240130-wcn3990-firmware-path-v1-0-826b93202964@xxxxxxxxxx/ -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches