Lines Matching refs:ret

24 	int ret;
27 ret = wlcore_read_reg(wl, REG_ECPU_CONTROL, &cpu_ctrl);
28 if (ret < 0)
33 ret = wlcore_write_reg(wl, REG_ECPU_CONTROL, cpu_ctrl);
36 return ret;
42 int ret;
47 ret = sscanf(wl->chip.fw_ver_str + 4, "%u.%u.%u.%u.%u",
52 if (ret != 5) {
55 ret = -EINVAL;
59 ret = wlcore_identify_fw(wl);
60 if (ret < 0)
63 return ret;
130 int ret;
134 ret = -ENOMEM;
138 ret = wlcore_read(wl, wl->cmd_box_addr, static_data, len, false);
139 if (ret < 0)
142 ret = wlcore_boot_parse_fw_ver(wl, static_data);
143 if (ret < 0)
146 ret = wlcore_validate_fw_ver(wl);
147 if (ret < 0)
150 ret = wlcore_handle_static_data(wl, static_data);
151 if (ret < 0)
157 return ret;
166 int ret;
188 ret = wlcore_set_partition(wl, &partition);
189 if (ret < 0)
204 ret = wlcore_set_partition(wl, &partition);
205 if (ret < 0)
215 ret = wlcore_write(wl, addr, chunk, CHUNK_SIZE, false);
216 if (ret < 0)
228 ret = wlcore_write(wl, addr, chunk, fw_data_len % CHUNK_SIZE, false);
232 return ret;
238 int ret = 0;
259 ret = wl1271_boot_upload_firmware_chunk(wl, fw, len, addr);
260 if (ret != 0)
265 return ret;
278 int ret;
380 ret = wlcore_write32(wl, dest_addr, val);
381 if (ret < 0)
382 return ret;
408 ret = wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
409 if (ret < 0)
410 return ret;
418 ret = wlcore_write_data(wl, REG_CMD_MBOX_ADDRESS, nvs_aligned, nvs_len,
422 return ret;
432 int loop, ret;
436 ret = wlcore_set_partition(wl, &wl->ptable[PART_BOOT]);
437 if (ret < 0)
438 return ret;
440 ret = wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
441 if (ret < 0)
442 return ret;
444 ret = wlcore_read_reg(wl, REG_CHIP_ID_B, &chip_id);
445 if (ret < 0)
446 return ret;
459 ret = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR, &intr);
460 if (ret < 0)
461 return ret;
470 ret = wlcore_write_reg(wl, REG_INTERRUPT_ACK,
472 if (ret < 0)
473 return ret;
485 ret = wlcore_read_reg(wl, REG_COMMAND_MAILBOX_PTR, &wl->cmd_box_addr);
486 if (ret < 0)
487 return ret;
492 ret = wlcore_read_reg(wl, REG_EVENT_MAILBOX_PTR, &wl->mbox_ptr[0]);
493 if (ret < 0)
494 return ret;
501 ret = wlcore_boot_static_data(wl);
502 if (ret < 0) {
504 return ret;
513 ret = wl1271_event_unmask(wl);
514 if (ret < 0) {
516 return ret;
520 ret = wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
523 return ret;