wifi: ath10k: support board-specific firmware overrides
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 4 Apr 2024 10:17:25 +0000 (13:17 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 5 Apr 2024 12:04:03 +0000 (15:04 +0300)
commit5abf259772df8329dc95f1f9699617ae59eb0b95
tree6494eae506f4f1bf37ca51eba81355a35aea1802
parent158fff51b4c326d053e42c146e7798ae5748087f
wifi: ath10k: support board-specific firmware overrides

Different Qualcomm platforms using WCN3990 WiFI chip use SoC-specific
firmware versions with different features. For example firmware for
SDM845 doesn't use single-chan-info-per-channel feature, while firmware
for QRB2210 / QRB4210 requires that feature. Allow board DT files to
override the subdir of the fw dir used to lookup the firmware-N.bin file
decribing corresponding WiFi firmware.

For example:

- ath10k/WCN3990/hw1.0/wlanmdsp.mbn,
  ath10k/WCN3990/hw1.0/firmware-5.bin: main firmware files, used by default

- ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn,
  ath10k/WCN3990/hw1.0/qcm2290/firmware-5.bin: SoC specific firmware
    with different signature and feature bits

Note, while board files lookup uses the same function and thus it is
possible to provide board-specific board-2.bin files, this is not
required in 99% of cases as board-2.bin already contains a way to
provide board-specific data with finer granularity than DT overrides.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240306-wcn3990-firmware-path-v2-2-f89e98e71a57@linaro.org
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/snoc.c