Skip to content

Commit ef4cc7c

Browse files
yangbolu1991kartben
authored andcommitted
include: net_if: fix clarification of timestamp callback
The functions of timestamp callback were implemented under CONFIG_NET_PKT_TIMESTAMP_THREAD, but were clarified under CONFIG_NET_PKT_TIMESTAMP. The clarification in header file may misunderstand users, because enabling CONFIG_NET_PKT_TIMESTAMP is not enough to use these functions. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
1 parent c1d213a commit ef4cc7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/zephyr/net/net_if.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,12 +3151,12 @@ static inline bool net_if_is_dormant(struct net_if *iface)
31513151
return net_if_flag_is_set(iface, NET_IF_DORMANT);
31523152
}
31533153

3154-
#if defined(CONFIG_NET_PKT_TIMESTAMP) && defined(CONFIG_NET_NATIVE)
3154+
#if defined(CONFIG_NET_PKT_TIMESTAMP_THREAD) || defined(__DOXYGEN__)
31553155
/**
31563156
* @typedef net_if_timestamp_callback_t
31573157
* @brief Define callback that is called after a network packet
31583158
* has been timestamped.
3159-
* @param "struct net_pkt *pkt" A pointer on a struct net_pkt which has
3159+
* @param pkt A pointer on a struct net_pkt which has
31603160
* been timestamped after being sent.
31613161
*/
31623162
typedef void (*net_if_timestamp_callback_t)(struct net_pkt *pkt);
@@ -3222,7 +3222,7 @@ void net_if_call_timestamp_cb(struct net_pkt *pkt);
32223222
* @param pkt Timestamped buffer
32233223
*/
32243224
void net_if_add_tx_timestamp(struct net_pkt *pkt);
3225-
#endif /* CONFIG_NET_PKT_TIMESTAMP */
3225+
#endif /* CONFIG_NET_PKT_TIMESTAMP_THREAD */
32263226

32273227
/**
32283228
* @brief Set network interface into promiscuous mode

0 commit comments

Comments
 (0)