net: Renamed network data receive function

Renamed net_recv() to net_recv_data() so that the more generic
name can be used by applications. The net_recv_data() is only
meant to be used when L2 layer feeds data into L3 (IP) layer.

Change-Id: Iba155d51f81e3b99964fa916fe87a05a8bf8766a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-05-19 12:02:28 +03:00
commit 5729d1c461
3 changed files with 4 additions and 4 deletions

View file

@ -193,8 +193,8 @@ static void process_msg(struct slip_context *slip)
} }
if (buf->frags) { if (buf->frags) {
if (net_recv(net_if_get_by_link_addr(&slip->ll_addr), if (net_recv_data(net_if_get_by_link_addr(&slip->ll_addr),
buf) < 0) { buf) < 0) {
net_nbuf_unref(buf); net_nbuf_unref(buf);
} }
slip->rx = slip->last = NULL; slip->rx = slip->last = NULL;

View file

@ -65,7 +65,7 @@ enum net_verdict {
}; };
/* Called by lower network stack when a network packet has been received */ /* Called by lower network stack when a network packet has been received */
int net_recv(struct net_if *iface, struct net_buf *buf); int net_recv_data(struct net_if *iface, struct net_buf *buf);
/** @cond ignore */ /** @cond ignore */
#if defined(CONFIG_INIT_STACKS) && defined(CONFIG_PRINTK) #if defined(CONFIG_INIT_STACKS) && defined(CONFIG_PRINTK)

View file

@ -274,7 +274,7 @@ static void init_rx_queue(void)
} }
/* Called by driver when an IP packet has been received */ /* Called by driver when an IP packet has been received */
int net_recv(struct net_if *iface, struct net_buf *buf) int net_recv_data(struct net_if *iface, struct net_buf *buf)
{ {
if (!buf->frags) { if (!buf->frags) {
return -ENODATA; return -ENODATA;