Take control over auto ack feature of 802.15.4 driver

is there a way to get more control over the auto ack feature of the 802.15.4 driver in zephyr?

I would like to ack  frames without destination address only if nrf_802154_ack_data_pending_bit_should_be_set(). For now I added

    if (m_flags.frame_filtered &&
        m_flags.frame_parsed_result &&
        nrf_802154_frame_parser_ar_bit_is_set(&m_current_rx_frame_data) &&
        nrf_802154_pib_auto_ack_get())
    {
+        uint8_t dest_addr_type = nrf_802154_frame_parser_dst_addr_type_get(&m_current_rx_frame_data);
+        if ((dest_addr_type != DEST_ADDR_TYPE_NONE) ||
+            (dest_addr_type == DEST_ADDR_TYPE_NONE &&
+            nrf_802154_ack_data_pending_bit_should_be_set(&m_current_rx_frame_data)))
+        {
            nrf_802154_tx_work_buffer_reset(&m_default_frame_props);
            mp_ack = nrf_802154_ack_generator_create(&m_current_rx_frame_data);
+        }
    }

to nrf_802154_trx_receive_frame_bcmatched() but as this isn't default behavior of IEEE 802.15.4 I don't think a pull request would be merged. Would it be possible to get some kind of hook or weak function that I can overwrite in my application?

Parents Reply Children
No Data
Related