[PATCH V2 09/10] ath10k: Add support for code swap
Kalle Valo
kvalo at qca.qualcomm.com
Mon Jun 29 04:21:03 PDT 2015
Vasanthakumar Thiagarajan <vthiagar at qti.qualcomm.com> writes:
> Code swap is a mechanism to use host memory to store
> some fw binary code segment. Ath10k host driver allocates
> and loads the code swap binary into the host memory and
> configures the target with the host allocated memory
> information at the address taken from code swap binary.
> This patch adds code swap support for firmware binary.
> Code swap binary for firmware bin is available in
> ATH10K_FW_IE_FW_CODE_SWAP_IMAGE.
>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar at qti.qualcomm.com>
[...]
> +static struct ath10k_swap_code_seg_info *
> +ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len)
> +{
> + struct ath10k_swap_code_seg_info *seg_info;
> + void *virt_addr;
> + dma_addr_t paddr;
> +
> + swap_bin_len = roundup(swap_bin_len, 2);
> + if (swap_bin_len > ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX) {
> + ath10k_err(ar, "refusing code swap bin because it is too big %zd > %d\n",
> + swap_bin_len, ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX);
kbuild found a bug here, I fixed it with the patch below. Please review:
--- a/drivers/net/wireless/ath/ath10k/swap.c
+++ b/drivers/net/wireless/ath/ath10k/swap.c
@@ -106,7 +106,7 @@ ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len)
swap_bin_len = roundup(swap_bin_len, 2);
if (swap_bin_len > ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX) {
- ath10k_err(ar, "refusing code swap bin because it is too big %zd > %d\n",
+ ath10k_err(ar, "refusing code swap bin because it is too big %zu > %d\n",
swap_bin_len, ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX);
return NULL;
}
--
Kalle Valo
More information about the ath10k
mailing list