Lines Matching refs:ret

39 	int ret;
42 ret = wlcore_read_reg(wl, REG_ECPU_CONTROL, &cpu_ctrl);
43 if (ret < 0)
48 ret = wlcore_write_reg(wl, REG_ECPU_CONTROL, cpu_ctrl);
51 return ret;
57 int ret;
65 ret = sscanf(wl->chip.fw_ver_str + 4, "%u.%u.%u.%u.%u",
70 if (ret != 5) {
73 ret = -EINVAL;
77 ret = wlcore_identify_fw(wl);
78 if (ret < 0)
81 return ret;
145 int ret;
149 ret = -ENOMEM;
153 ret = wlcore_read(wl, wl->cmd_box_addr, static_data, len, false);
154 if (ret < 0)
157 ret = wlcore_boot_parse_fw_ver(wl, static_data);
158 if (ret < 0)
161 ret = wlcore_validate_fw_ver(wl);
162 if (ret < 0)
165 ret = wlcore_handle_static_data(wl, static_data);
166 if (ret < 0)
172 return ret;
181 int ret;
203 ret = wlcore_set_partition(wl, &partition);
204 if (ret < 0)
219 ret = wlcore_set_partition(wl, &partition);
220 if (ret < 0)
230 ret = wlcore_write(wl, addr, chunk, CHUNK_SIZE, false);
231 if (ret < 0)
243 ret = wlcore_write(wl, addr, chunk, fw_data_len % CHUNK_SIZE, false);
247 return ret;
253 int ret = 0;
274 ret = wl1271_boot_upload_firmware_chunk(wl, fw, len, addr);
275 if (ret != 0)
280 return ret;
290 int ret;
388 ret = wlcore_write32(wl, dest_addr, val);
389 if (ret < 0)
390 return ret;
416 ret = wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
417 if (ret < 0)
418 return ret;
426 ret = wlcore_write_data(wl, REG_CMD_MBOX_ADDRESS, nvs_aligned, nvs_len,
430 return ret;
440 int loop, ret;
444 ret = wlcore_set_partition(wl, &wl->ptable[PART_BOOT]);
445 if (ret < 0)
446 return ret;
448 ret = wl1271_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
449 if (ret < 0)
450 return ret;
452 ret = wlcore_read_reg(wl, REG_CHIP_ID_B, &chip_id);
453 if (ret < 0)
454 return ret;
467 ret = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR, &intr);
468 if (ret < 0)
469 return ret;
478 ret = wlcore_write_reg(wl, REG_INTERRUPT_ACK,
480 if (ret < 0)
481 return ret;
493 ret = wlcore_read_reg(wl, REG_COMMAND_MAILBOX_PTR, &wl->cmd_box_addr);
494 if (ret < 0)
495 return ret;
500 ret = wlcore_read_reg(wl, REG_EVENT_MAILBOX_PTR, &wl->mbox_ptr[0]);
501 if (ret < 0)
502 return ret;
509 ret = wlcore_boot_static_data(wl);
510 if (ret < 0) {
512 return ret;
521 ret = wl1271_event_unmask(wl);
522 if (ret < 0) {
524 return ret;
528 ret = wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
531 return ret;