ath10k: add testmode support for 10.4 firmware
This patch adds testmode support for 10.4 based chipsets and added code swap support for UTF binary. Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
d48059fd48
commit
58c44fa93c
1 changed files with 23 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "wmi.h"
|
#include "wmi.h"
|
||||||
#include "hif.h"
|
#include "hif.h"
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
|
#include "core.h"
|
||||||
|
|
||||||
#include "testmode_i.h"
|
#include "testmode_i.h"
|
||||||
|
|
||||||
|
@ -240,6 +241,18 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[])
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ar->testmode.utf_mode_fw.fw_file.codeswap_data &&
|
||||||
|
ar->testmode.utf_mode_fw.fw_file.codeswap_len) {
|
||||||
|
ret = ath10k_swap_code_seg_init(ar,
|
||||||
|
&ar->testmode.utf_mode_fw.fw_file);
|
||||||
|
if (ret) {
|
||||||
|
ath10k_warn(ar,
|
||||||
|
"failed to init utf code swap segment: %d\n",
|
||||||
|
ret);
|
||||||
|
goto err_release_utf_mode_fw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
spin_lock_bh(&ar->data_lock);
|
spin_lock_bh(&ar->data_lock);
|
||||||
ar->testmode.utf_monitor = true;
|
ar->testmode.utf_monitor = true;
|
||||||
spin_unlock_bh(&ar->data_lock);
|
spin_unlock_bh(&ar->data_lock);
|
||||||
|
@ -279,6 +292,11 @@ err_power_down:
|
||||||
ath10k_hif_power_down(ar);
|
ath10k_hif_power_down(ar);
|
||||||
|
|
||||||
err_release_utf_mode_fw:
|
err_release_utf_mode_fw:
|
||||||
|
if (ar->testmode.utf_mode_fw.fw_file.codeswap_data &&
|
||||||
|
ar->testmode.utf_mode_fw.fw_file.codeswap_len)
|
||||||
|
ath10k_swap_code_seg_release(ar,
|
||||||
|
&ar->testmode.utf_mode_fw.fw_file);
|
||||||
|
|
||||||
release_firmware(ar->testmode.utf_mode_fw.fw_file.firmware);
|
release_firmware(ar->testmode.utf_mode_fw.fw_file.firmware);
|
||||||
ar->testmode.utf_mode_fw.fw_file.firmware = NULL;
|
ar->testmode.utf_mode_fw.fw_file.firmware = NULL;
|
||||||
|
|
||||||
|
@ -301,6 +319,11 @@ static void __ath10k_tm_cmd_utf_stop(struct ath10k *ar)
|
||||||
|
|
||||||
spin_unlock_bh(&ar->data_lock);
|
spin_unlock_bh(&ar->data_lock);
|
||||||
|
|
||||||
|
if (ar->testmode.utf_mode_fw.fw_file.codeswap_data &&
|
||||||
|
ar->testmode.utf_mode_fw.fw_file.codeswap_len)
|
||||||
|
ath10k_swap_code_seg_release(ar,
|
||||||
|
&ar->testmode.utf_mode_fw.fw_file);
|
||||||
|
|
||||||
release_firmware(ar->testmode.utf_mode_fw.fw_file.firmware);
|
release_firmware(ar->testmode.utf_mode_fw.fw_file.firmware);
|
||||||
ar->testmode.utf_mode_fw.fw_file.firmware = NULL;
|
ar->testmode.utf_mode_fw.fw_file.firmware = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue