net: pkt: Add ACK Frame Pending Bit information for ieee802154

OpenThread expects information, whether Frame Pending Bit was set in the
ACK response sent by the radio driver. Carry this information in the
net_pkt structure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2020-03-19 16:40:21 +01:00 committed by Jukka Rissanen
commit 00d1f6e772

View file

@ -241,6 +241,7 @@ struct net_pkt {
#if defined(CONFIG_IEEE802154) #if defined(CONFIG_IEEE802154)
u8_t ieee802154_rssi; /* Received Signal Strength Indication */ u8_t ieee802154_rssi; /* Received Signal Strength Indication */
u8_t ieee802154_lqi; /* Link Quality Indicator */ u8_t ieee802154_lqi; /* Link Quality Indicator */
u8_t ieee802154_ack_fpb : 1; /* Frame Pending Bit was set in the ACK */
#endif #endif
#if defined(CONFIG_NET_L2_CANBUS) #if defined(CONFIG_NET_L2_CANBUS)
union { union {
@ -881,6 +882,17 @@ static inline void net_pkt_set_ieee802154_lqi(struct net_pkt *pkt,
{ {
pkt->ieee802154_lqi = lqi; pkt->ieee802154_lqi = lqi;
} }
static inline bool net_pkt_ieee802154_ack_fpb(struct net_pkt *pkt)
{
return pkt->ieee802154_ack_fpb;
}
static inline void net_pkt_set_ieee802154_ack_fpb(struct net_pkt *pkt,
bool fpb)
{
pkt->ieee802154_ack_fpb = fpb;
}
#endif #endif
#if defined(CONFIG_NET_IPV4_AUTO) #if defined(CONFIG_NET_IPV4_AUTO)