From 1fd92db83d399ff7918e51ba84bc73d2466b5eb6 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 8 Apr 2015 01:41:06 -0500 Subject: net: cosmetic: Fix var naming net <-> eth drivers Update the naming convention used in the network stack functions and variables that Ethernet drivers use to interact with it. This cleans up the temporary hacks that were added to this interface along with the DM support. This patch has a few remaining checkpatch.pl failures that would be out of the scope of this patch to fix (drivers that are in gross violation of checkpatch.pl). Signed-off-by: Joe Hershberger Acked-by: Simon Glass --- doc/README.drivers.eth | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/README.drivers.eth b/doc/README.drivers.eth index 8b4d3521c1..1a9a23b51b 100644 --- a/doc/README.drivers.eth +++ b/doc/README.drivers.eth @@ -141,11 +141,11 @@ function can be called multiple times in a row. The recv function should process packets as long as the hardware has them readily available before returning. i.e. you should drain the hardware fifo. -For each packet you receive, you should call the NetReceive() function on it +For each packet you receive, you should call the net_process_received_packet() function on it along with the packet length. The common code sets up packet buffers for you -already in the .bss (NetRxPackets), so there should be no need to allocate your -own. This doesn't mean you must use the NetRxPackets array however; you're -free to call the NetReceive() function with any buffer you wish. So the pseudo +already in the .bss (net_rx_packets), so there should be no need to allocate your +own. This doesn't mean you must use the net_rx_packets array however; you're +free to call the net_process_received_packet() function with any buffer you wish. So the pseudo code here would look something like: int ape_recv(struct eth_device *dev) { @@ -153,9 +153,9 @@ int ape_recv(struct eth_device *dev) ... while (packets_are_available()) { ... - length = ape_get_packet(&NetRxPackets[i]); + length = ape_get_packet(&net_rx_packets[i]); ... - NetReceive(&NetRxPackets[i], length); + net_process_received_packet(&net_rx_packets[i], length); ... if (++i >= PKTBUFSRX) i = 0; -- cgit v1.2.1