net: promisc: Refactor because of timeout overhaul

Convert minimal parts to support k_timeout_t values.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2020-04-03 13:27:41 +03:00
parent 9e3778f89d
commit 406bdb1fc6
2 changed files with 3 additions and 3 deletions

View file

@ -36,9 +36,9 @@ extern "C" {
* @return Received net_pkt, NULL if not received any packet.
*/
#if defined(CONFIG_NET_PROMISCUOUS_MODE)
struct net_pkt *net_promisc_mode_wait_data(s32_t timeout);
struct net_pkt *net_promisc_mode_wait_data(k_timeout_t timeout);
#else
static inline struct net_pkt *net_promisc_mode_wait_data(s32_t timeout)
static inline struct net_pkt *net_promisc_mode_wait_data(k_timeout_t timeout)
{
ARG_UNUSED(timeout);

View file

@ -25,7 +25,7 @@ LOG_MODULE_REGISTER(net_promisc, CONFIG_NET_PROMISC_LOG_LEVEL);
static K_FIFO_DEFINE(promiscuous_queue);
static atomic_t enabled = ATOMIC_INIT(0);
struct net_pkt *net_promisc_mode_wait_data(s32_t timeout)
struct net_pkt *net_promisc_mode_wait_data(k_timeout_t timeout)
{
return k_fifo_get(&promiscuous_queue, timeout);
}