On Monday 29 June 2015 04:51 PM, Kalle Valo wrote:
Vasanthakumar Thiagarajan <vthia...@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 <vthia...@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;
         }

Looks good. Thanks.


Vasanth

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to