Search Linux Wireless

Re: [PATCH V2 09/10] ath10k: Add support for code swap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vasanthakumar Thiagarajan <vthiagar@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>

[...]

> +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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux