Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: l2: Correct debug message and avoid unneeded assignment #1481

Merged
merged 1 commit into from
Sep 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions subsys/net/ip/l2/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,20 @@ static enum net_verdict ethernet_send(struct net_if *iface,
return NET_DROP;
}

NET_DBG("Sending arp pkt %p (orig %p) to iface %p",
arp_pkt, pkt, iface);

if (pkt != arp_pkt) {
NET_DBG("Sending arp pkt %p (orig %p) to iface %p",
arp_pkt, pkt, iface);

/* Either pkt went to ARP pending queue
* or there was not space in the queue anymore
*/
net_pkt_unref(pkt);
}

pkt = arp_pkt;
pkt = arp_pkt;
} else {
NET_DBG("Found ARP entry, sending pkt %p to iface %p",
pkt, iface);
}

net_pkt_ll_src(pkt)->addr = (u8_t *)&NET_ETH_HDR(pkt)->src;
net_pkt_ll_src(pkt)->len = sizeof(struct net_eth_addr);
Expand Down