Lines Matching refs:cmd_len
487 int cmd_len, resp_len, i; in wilc_spi_single_read() local
512 cmd_len = offsetof(struct wilc_spi_cmd, u.simple_cmd.crc); in wilc_spi_single_read()
516 c->u.simple_cmd.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_single_read()
517 cmd_len += 1; in wilc_spi_single_read()
521 if (cmd_len + resp_len > ARRAY_SIZE(wb)) { in wilc_spi_single_read()
524 cmd_len, resp_len, ARRAY_SIZE(wb)); in wilc_spi_single_read()
528 if (wilc_spi_tx_rx(wilc, wb, rb, cmd_len + resp_len)) { in wilc_spi_single_read()
533 r = (struct wilc_spi_rsp_data *)&rb[cmd_len]; in wilc_spi_single_read()
582 int cmd_len, resp_len; in wilc_spi_write_cmd() local
597 cmd_len = offsetof(struct wilc_spi_cmd, u.internal_w_cmd.crc); in wilc_spi_write_cmd()
599 c->u.internal_w_cmd.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_write_cmd()
605 cmd_len = offsetof(struct wilc_spi_cmd, u.w_cmd.crc); in wilc_spi_write_cmd()
607 c->u.w_cmd.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_write_cmd()
614 cmd_len += 1; in wilc_spi_write_cmd()
618 if (cmd_len + resp_len > ARRAY_SIZE(wb)) { in wilc_spi_write_cmd()
621 cmd_len, resp_len, ARRAY_SIZE(wb)); in wilc_spi_write_cmd()
625 if (wilc_spi_tx_rx(wilc, wb, rb, cmd_len + resp_len)) { in wilc_spi_write_cmd()
630 r = (struct wilc_spi_rsp_data *)&rb[cmd_len]; in wilc_spi_write_cmd()
657 int cmd_len, resp_len; in wilc_spi_dma_rw() local
673 cmd_len = offsetof(struct wilc_spi_cmd, u.dma_cmd.crc); in wilc_spi_dma_rw()
675 c->u.dma_cmd.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_dma_rw()
683 cmd_len = offsetof(struct wilc_spi_cmd, u.dma_cmd_ext.crc); in wilc_spi_dma_rw()
685 c->u.dma_cmd_ext.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_dma_rw()
692 cmd_len += 1; in wilc_spi_dma_rw()
696 if (cmd_len + resp_len > ARRAY_SIZE(wb)) { in wilc_spi_dma_rw()
698 cmd_len, resp_len, ARRAY_SIZE(wb)); in wilc_spi_dma_rw()
702 if (wilc_spi_tx_rx(wilc, wb, rb, cmd_len + resp_len)) { in wilc_spi_dma_rw()
707 r = (struct wilc_spi_rsp_data *)&rb[cmd_len]; in wilc_spi_dma_rw()
783 int cmd_len, resp_len = 0; in wilc_spi_special_cmd() local
798 cmd_len = offsetof(struct wilc_spi_cmd, u.simple_cmd.crc); in wilc_spi_special_cmd()
802 c->u.simple_cmd.crc[0] = wilc_get_crc7(wb, cmd_len); in wilc_spi_special_cmd()
803 cmd_len += 1; in wilc_spi_special_cmd()
805 if (cmd_len + resp_len > ARRAY_SIZE(wb)) { in wilc_spi_special_cmd()
807 cmd_len, resp_len, ARRAY_SIZE(wb)); in wilc_spi_special_cmd()
811 if (wilc_spi_tx_rx(wilc, wb, rb, cmd_len + resp_len)) { in wilc_spi_special_cmd()
816 r = (struct wilc_spi_special_cmd_rsp *)&rb[cmd_len]; in wilc_spi_special_cmd()