summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2017-01-26 14:31:30 +0100
committerJukka Rissanen <jukka.rissanen@linux.intel.com>2017-01-27 12:35:53 +0200
commit83ed3a29be8b1c7636cdd3233c79191277ca517e (patch)
tree6a79a3eafe6af31ec3958cc981c058e94bd01ef0 /include
parent5794d80c10dadfd5149772ce6d84d84c2716be1a (diff)
net/ieee802154: Modify radio TX function signature
The cause for this change is TCP. Until now, the radio strategy driver (ALOHA or CSMA) was providing the actual nbuf, and not the buffer fragment, counting on the fact that the loop was using net_buf_frag_del() which made so, iteration after iteration, buffer framgent to be always buf->frags. The problem with this logic is loosing the fragments that might be still referenced by TCP, in case the whole buffer did not make it so TCP can retry later and so on. Instead, TX now takes the nbuf and the actual frag to send. It could have been working with just a pointer on the data, and the whole length of the frame. But it has been avoided due to possible future devices, that will be smarter and run CSMA directly in the hw, thus it will require to access the whole buffer list through the nbuf. Change-Id: I8d77b1e13b648c0ec3645cb2d55d1910d00381ea Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/ieee802154_radio.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/ieee802154_radio.h b/include/net/ieee802154_radio.h
index 9e5e6ab85..ee7966ecc 100644
--- a/include/net/ieee802154_radio.h
+++ b/include/net/ieee802154_radio.h
@@ -42,8 +42,10 @@ struct ieee802154_radio_api {
/** Set TX power level in dbm */
int (*set_txpower)(struct device *dev, int16_t dbm);
- /** Transmit a buffer */
- int (*tx)(struct device *dev, struct net_buf *buf);
+ /** Transmit a buffer fragment */
+ int (*tx)(struct device *dev,
+ struct net_buf *buf,
+ struct net_buf *frag);
/** Start the device */
int (*start)(struct device *dev);