Skip to content

Commit

Permalink
[nrf noup] drivers: ieee802154: temporary fix for ACK header IE config
Browse files Browse the repository at this point in the history
Skip configuring ACK header IE if `EnableCsl()`
has been called with arguments:

- `aCslPeriod` == 0
- `aShortAddr` == IEEE802154_NO_SHORT_ADDRESS_ASSIGNED
- `aExtAddr` == NULL

This happens during RCP startup in `Radio::Init()` implementation.
It will be fixed on OT and Zephyr level, but this commit is needed
to prevent coprocessor samples from asserting on boot.

Signed-off-by: Maciej Baczmanski <[email protected]>
  • Loading branch information
maciejbaczmanski authored and rlubos committed Jan 12, 2024
1 parent d68a96e commit 1da00e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/ieee802154/ieee802154_nrf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,19 @@ static int nrf5_configure(const struct device *dev,
uint8_t short_addr_le[SHORT_ADDRESS_SIZE];
uint8_t element_id;

if (config->ack_ie.ext_addr == NULL &&
config->ack_ie.header_ie == NULL &&
config->ack_ie.short_addr == IEEE802154_NO_SHORT_ADDRESS_ASSIGNED) {
/* Hotfix for case when `EnableCsl()` has been called with arguments:
* - `aCslPeriod` == 0
* - `aShortAddr` == IEEE802154_NO_SHORT_ADDRESS_ASSIGNED
* - `aExtAddr` == NULL
* In this case skip configuring ACK header IE until proper resetting of
* configuration is implemented.
*/
break;
}

if (config->ack_ie.short_addr == IEEE802154_BROADCAST_ADDRESS ||
config->ack_ie.ext_addr == NULL) {
return -ENOTSUP;
Expand Down

0 comments on commit 1da00e0

Please sign in to comment.