Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion drivers/wifi/nrfwifi/src/qspi/src/spi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
addr & 0xFF,
0 /* dummy byte */
};
uint8_t discard[sizeof(hdr) + 2 * 4];

const struct spi_buf tx_buf[] = {
{.buf = hdr, .len = sizeof(hdr) },
Expand All @@ -67,12 +68,17 @@
const struct spi_buf_set tx = { .buffers = tx_buf, .count = 2 };

const struct spi_buf rx_buf[] = {
{.buf = NULL, .len = sizeof(hdr) + discard_bytes},
{.buf = discard, .len = sizeof(hdr) + discard_bytes},
{.buf = data, .len = len },
};

Check notice on line 73 in drivers/wifi/nrfwifi/src/qspi/src/spi_if.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/qspi/src/spi_if.c:73 - {.buf = discard, .len = sizeof(hdr) + discard_bytes}, - {.buf = data, .len = len }, + {.buf = discard, .len = sizeof(hdr) + discard_bytes}, + {.buf = data, .len = len},

Check notice on line 73 in drivers/wifi/nrfwifi/src/qspi/src/spi_if.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrfwifi/src/qspi/src/spi_if.c:73 - {.buf = discard, .len = sizeof(hdr) + discard_bytes}, - {.buf = data, .len = len }, + {.buf = discard, .len = sizeof(hdr) + discard_bytes}, + {.buf = data, .len = len},

const struct spi_buf_set rx = { .buffers = rx_buf, .count = 2 };

if (rx_buf[0].len > sizeof(discard)) {
LOG_ERR("Discard bytes too large, please adjust buf size");
return -EINVAL;
}

return spi_transceive_dt(&spi_spec, &tx, &rx);
}

Expand Down
Loading