Skip to content
Merged
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions drivers/ieee802154/ieee802154_nrf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,11 @@ static int nrf5_tx(const struct device *dev,
uint8_t *payload = frag->data;
bool ret = true;

if (payload_len > NRF5_PSDU_LENGTH) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a good opportunity to switch to IEEE802154_MTU instead everywhere and remove that custom constant which seems to be redundant? (of course not required at all - just an idea)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the redefined constants and switched to use symbols defined in ieee802154.h header, where applicable in the driver.

LOG_ERR("Payload too large: %d", payload_len);
return -EMSGSIZE;
}

LOG_DBG("%p (%u)", payload, payload_len);

nrf5_radio->tx_psdu[0] = payload_len + NRF5_FCS_LENGTH;
Expand Down