Lines Matching defs:ar
15 static int ath10k_swap_code_seg_fill(struct ath10k *ar,
39 ath10k_err(ar, "refusing to parse invalid tlv length %d\n",
47 ath10k_err(ar, "refusing an invalid swap file\n");
64 ath10k_err(ar, "failed to parse invalid swap file\n");
73 ath10k_swap_code_seg_free(struct ath10k *ar,
85 dma_free_coherent(ar->dev, seg_size, seg_info->virt_address[0],
90 ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len)
98 ath10k_err(ar, "refusing code swap bin because it is too big %zu > %d\n",
103 seg_info = devm_kzalloc(ar->dev, sizeof(*seg_info), GFP_KERNEL);
107 virt_addr = dma_alloc_coherent(ar->dev, swap_bin_len, &paddr,
124 int ath10k_swap_code_seg_configure(struct ath10k *ar,
133 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot found firmware code swap binary\n");
137 ret = ath10k_bmi_write_memory(ar, seg_info->target_addr,
141 ath10k_err(ar, "failed to write Code swap segment information (%d)\n",
149 void ath10k_swap_code_seg_release(struct ath10k *ar,
152 ath10k_swap_code_seg_free(ar, fw_file->firmware_swap_code_seg_info);
163 int ath10k_swap_code_seg_init(struct ath10k *ar, struct ath10k_fw_file *fw_file)
176 seg_info = ath10k_swap_code_seg_alloc(ar, codeswap_len);
178 ath10k_err(ar, "failed to allocate fw code swap segment\n");
182 ret = ath10k_swap_code_seg_fill(ar, seg_info,
186 ath10k_warn(ar, "failed to initialize fw code swap segment: %d\n",
188 ath10k_swap_code_seg_free(ar, seg_info);