-
Notifications
You must be signed in to change notification settings - Fork 8.4k
drivers: ieee802154: support selective TX channel #79919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: ieee802154: support selective TX channel #79919
Conversation
|
@fgrandel This (draft) PR is another approach instead of #79782 |
1216c6e to
c75f55c
Compare
The Kconfig `IEEE802154_SELECTIVE_TXCHANNEL` is added along with the new capability `IEEE802154_HW_SELECTIVE_TXCHANNEL`. The new capability of the ieee802154 drivers allows to schedule CSL transmissions as stated in IEEE 802.15.4-2020 chapter 6.12.2.7 CSL over multiple channels. The benefit of the new API is that additional call to `ieee802154_radio_api::set_channel()` is not required. The drivers will switch to the new channel as late as possible for CSL transmissions thus will not interrupt any reception that might be in progress until the very late moment when the transmission actually starts. This improves reception performance when CSL transmissions are used. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Andrzej Kuroś <[email protected]>
The ieee802154_nrf5 supports the IEEE802154_SELECTIVE_TXCHANNEL Kconfig option and advertises the IEEE802154_HW_SELECTIVE_TXCHANNEL capability. The ieee802154_nrf5 driver now allows to schedule timed transmission requests with selective tx channel, that is set at the latest possible moment. This improves reception performance when the timed transmissions are requested. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Andrzej Kuroś <[email protected]>
c75f55c to
a17d1ac
Compare
…TXCHANNEL The Kconfig `IEEE802154_SELECTIVE_TXCHANNEL` is added along with the new capability `IEEE802154_HW_SELECTIVE_TXCHANNEL`. The new capability of the ieee802154 drivers allows to schedule CSL transmissions as stated in IEEE 802.15.4-2020 chapter 6.12.2.7 CSL over multiple channels. The benefit of the new API is that additional call to `ieee802154_radio_api::set_channel()` is not required. The drivers will switch to the new channel as late as possible for CSL transmissions thus will not interrupt any reception that might be in progress until the very late moment when the transmission actually starts. This improves reception performance when CSL transmissions are used. Upstream PR: zephyrproject-rtos/zephyr#79919 Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Andrzej Kuroś <[email protected]>
…_TXCHANNEL The ieee802154_nrf5 supports the IEEE802154_SELECTIVE_TXCHANNEL Kconfig option and advertises the IEEE802154_HW_SELECTIVE_TXCHANNEL capability. The ieee802154_nrf5 driver now allows to schedule timed transmission requests with selective tx channel, that is set at the latest possible moment. This improves reception performance when the timed transmissions are requested. Upstream PR: zephyrproject-rtos/zephyr#79919 Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Andrzej Kuroś <[email protected]>
The capabilities returned by radio_api->get_capabilities do not change. The result is cached in a variable to improve performance. Upstream PR: zephyrproject-rtos/zephyr#79919 Signed-off-by: Andrzej Kuroś <[email protected]>
…TXCHANNEL For transmit_message if the transmission is timed and underlying driver supports `IEEE802154_HW_SELECTIVE_TXCHANNEL` then use the selective txchannel feature for transmission. This does not change the current `channel` at the moment of call, the driver will transmit the message on the channel selected through `net_pkt_set_ieee802154_txchannel` then (after receiving an ACK if requested) it will return to the original channel. When Kconfig option IEEE802154_SELECTIVE_TXCHANNEL is turned on, the timed transmissions scheduled some time ahead on different channel will not abort ongoing reception until the exact moment of transmission comes. Upstream PR: zephyrproject-rtos/zephyr#79919 Signed-off-by: Andrzej Kuroś <[email protected]>
For transmit_message if the transmission is timed and underlying driver supports `IEEE802154_HW_SELECTIVE_TXCHANNEL` then use the selective txchannel feature for transmission. This does not change the current `channel` at the moment of call, the driver will transmit the message on the channel selected through `net_pkt_set_ieee802154_txchannel` then (after receiving an ACK if requested) it will return to the original channel. When Kconfig option IEEE802154_SELECTIVE_TXCHANNEL is turned on, the timed transmissions scheduled some time ahead on different channel will not abort ongoing reception until the exact moment of transmission comes. Signed-off-by: Andrzej Kuroś <[email protected]>
a17d1ac to
2ea27d9
Compare
cfriedt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very neatly done. I hope we can see other drivers supporting this feature soon as well 👍
This PR adds the following:
IEEE802154_SELECTIVE_TXCHANNELis added that allows ieee802154 drivers that support the new (also introduced) capabilityIEEE802154_HW_SELECTIVE_TXCHANNELto transmit timed messages with a channel passed throughnet_pkt. Upper layer that is aware of this feature should query the driver for the capability. If the driver has the capability then the upper layer passes the channel to radio_api->tx operation vianet_pkt. This allows to perfrom CSL transmissions as stated in as stated in IEEE 802.15.4-2020 chapter 6.12.2.7 without additional call to radio_api->set_channel which would interrupt reception of any incoming frame. However the actual transmission occurs later. Drivers have no duty to support this feature, as they do not have to claim the IEEE802154_HW_SELECTIVE_TXCHANNEL capability. The upper layer has no duty to support this feature because it might not enable Kconfig option.IEEE802154_SELECTIVE_TXCHANNELis added to nrf802154_nrf5 drier.IEEE802154_SELECTIVE_TXCHANNELKconfig option and supports theIEEE802154_HW_SELECTIVE_TXCHANNELcapability.This PR improves performance of reception while OpenThread schedules timed CSL transmissions.
This is an alternative to #79782