Re: RFC: ieee802154 radio api


Tomasz Bursztyka
 

Hi Oliver,

On Wed, Jan 18, 2017 at 09:57:15AM +0100, Tomasz Bursztyka wrote:
For example, if the hardware can automatically perform CCA before the TX
sequence (IEEE802154_HW_LBT is set), the linklayer does not have to call
the API function int (*cca)(struct device *dev);
No. L2 has to call that, unless hw can perform part or all of the radio
strategy (usually, CSMA).
Doing cca before tx on hw side is just to ensure that it won't generate
noise uselessly. (and fails its transmission as well as
creating jitters on the network). That has to be enabled all the time, it's
cost-less.
<snip>
- IEEE802154_HW_LBT (listen before transmit or CCA before TX)
Always enable it if the hw supports it, at built time.
Not sure, I understand you correctly here, but some transceivers (e.g. the
at86rf2xx) does not allow you to perform manual CCA if automatic CCA is
enabled.
Good to know. Does it behave like that because it can do some/all of the
CSMA job directly?
For now I'd say disable auto-CCA in driver by default, then.

Basically manual CCA is meant for the fully soft-CSMA radio strategy,
as it is right now.
If only auto-cca does not mess up with the manual one, then keep it enabled.

But soon, we'll have to figure out a way to hand-over CSMA parts to
relevant hw that can
do it.


- IEEE802154_HW_FRAME_RETRIES
Up to the driver to handle it. L2 does not have to care about it.
What if the MAC needs full control over L2 retransmissions (e.g. in a TDMA
MAC).
Hum, MAC and L2 in our case is the same. What I call L2 here is
ieee802.15.4 soft-MAC L2 stack.
See subsys/net/ip/l2/ieee802154/

Anyway, TDMA is not part of IEEE 802.15.4 <= 2011, so we can put it aside.


In addition, I would insert following flags:
- IEEE802154_HW_TX_AUTOACK (can transmit ACK frame after RX)
Always enable it if the hw supports it.
Same as above. For some MAC protocols (e.g. IEEE 802.15.4 TSCH mode) this is
not a viable solution.
TSCH is for IEEE 802.15.4 >= 2012. So at this point we can put it aside.

Or is your point only about setting these capabilities at runtime? Is it still
possible to disable these flags at compile time?
We had autoack, and crc and all being disabled at compile time for a
while. But at this stage
it was just useless, so it got removed.


Br,

Tomasz

Join devel@lists.zephyrproject.org to automatically receive all group messages.