net/net_pkt: Fully separate struct net_pkt from struct net_buf
- net_pkt becomes a stand-alone structure with network packet meta
information.
- network packet data is still managed through net_buf, mostly named
'frag'.
- net_pkt memory management is done through k_mem_slab
- function got introduced or relevantly renamed to target eithe net_pkt
or net_buf fragments.
- net_buf's sent_list ends up in net_pkt now, and thus helps to save
memory when TCP is enabled.
Change-Id: Ibd5c17df4f75891dec79db723a4c9fc704eb843d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
diff --git a/include/net/ieee802154_radio.h b/include/net/ieee802154_radio.h
index ee7966e..6d29ccd 100644
--- a/include/net/ieee802154_radio.h
+++ b/include/net/ieee802154_radio.h
@@ -42,9 +42,9 @@
/** Set TX power level in dbm */
int (*set_txpower)(struct device *dev, int16_t dbm);
- /** Transmit a buffer fragment */
+ /** Transmit a packet fragment */
int (*tx)(struct device *dev,
- struct net_buf *buf,
+ struct net_pkt *pkt,
struct net_buf *frag);
/** Start the device */
@@ -63,12 +63,12 @@
* @details This function should be used to fill in struct net_if's send pointer.
*
* @param iface A valid pointer on a network interface to send from
- * @param buf A valid pointer on a buffer to send
+ * @param pkt A valid pointer on a packet to send
*
* @return 0 on success, negative value otherwise
*/
extern int ieee802154_radio_send(struct net_if *iface,
- struct net_buf *buf);
+ struct net_pkt *pkt);
/**
* @brief Radio driver ACK handling function that hw drivers should use
@@ -77,12 +77,12 @@
* helps to hook direcly the hw drivers to the radio driver.
*
* @param iface A valid pointer on a network interface that received the packet
- * @param buf A valid pointer on a buffer to check
+ * @param pkt A valid pointer on a packet to check
*
* @return NET_OK if it was handled, NET_CONTINUE otherwise
*/
extern enum net_verdict ieee802154_radio_handle_ack(struct net_if *iface,
- struct net_buf *buf);
+ struct net_pkt *pkt);
/**
* @brief Initialize L2 stack for a given interface