History log of /u-boot/net/rarp.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 01d1b99c 11-Mar-2022 Tom Rini <trini@konsulko.com>

Convert CONFIG_NET_RETRY_COUNT to Kconfig

This converts the following to Kconfig:
CONFIG_NET_RETRY_COUNT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34696958 23-Aug-2015 Lukasz Majewski <l.majewski@majess.pl>

net: tftp: Move tftp.h file from ./net to ./include/net

This change gives the ability to reuse the <tftp.h> header file by other
subsystems (like e.g. dfu).

Without this change compilation error emerges for the legacy update.c file.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# bc0571fc 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Fix checkpatch.pl failures in net.c

Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 698d78e5 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Clean up RARP variables and functions

Make a thorough pass through all variables and function names contained
within rarp.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 1203fcce 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Cleanup internal packet buffer names

This patch cleans up the names of internal packet buffer names that are
used within the network stack and the functions that use them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 049a95a7 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Change IPaddr_t to struct in_addr

This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 4ef8d53c 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Allow filtering on debug traces in the net subsystem

Add several levels of DEBUG prints so that you can limit the noise to
the severety of your problem.

DEBUG_LL_STATE = Link local state machine changes
DEBUG_DEV_PKT = Packets or info directed to the device
DEBUG_NET_PKT = Packets on info on the network at large
DEBUG_INT_STATE = Internal network state changes

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 00f33268 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Refactor packet length computations

Save the length when it is computed instead of forgetting it and
subtracting pointers to figure it out again.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 738853bb 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef ARP_t

Remove typedef and lower-case letters

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 594c26f8 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef IP_t

Rename IP header related things to IP_UDP. The existing definition
of IP_t includes UDP header, so name it to accurately describe the
structure.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 8b9c5322 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Move RARP receive logic out of net.c

Separate this functionality out of the net.c behemoth

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# c2faf4f9 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: rarp.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# db288a96 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Remove volatile from net API

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# e4a3d57d 27-Oct-2011 Simon Glass <sjg@chromium.org>

net: Export auto_load, use it in rarp

The rarp code includes another instance of the auto_load logic, so call
what is now net_auto_load() instead.

This also fixes an incorrect call to TftpStart() which was never seen
since apparently no boards enable rarp.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 03eb129f 18-Apr-2011 Luca Ceresoli <luca.ceresoli@comelit.it>

NET: pass source IP address to packet handlers

This is needed for the upcoming TFTP server implementation.

This also simplifies PingHandler() and fixes rxhand_f documentation.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>

# 6ac59c55 03-Nov-2009 Mike Frysinger <vapier@gentoo.org>

net: pull CONFIG checks out of source and into makefile

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 0ebf04c6 23-Jul-2009 Robin Getz <rgetz@blackfin.uclinux.org>

minor debug cleanups in ./net

Minor ./net cleanups - no functional changes
- change #ifdef DEBUG printf(); #endif to just debug()
- changed __FUNCTION__ to __func__
- got rid of extra whitespace between function and opening brace
- removed unnecessary braces on if statements

gcc dead code elimination should make this functionally/size equivalent
when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 49f3bdbb 01-Oct-2008 Bartlomiej Sieka <tur@semihalf.com>

net: express the first argument to NetSetTimeout() in milliseconds

Enforce millisecond semantics of the first argument to NetSetTimeout() --
the change is transparent for well-behaving boards (CFG_HZ == 1000 and
get_timer() countiing in milliseconds).

Rationale for this patch is to enable millisecond granularity for
network-related timeouts, which is needed for the upcoming automatic
software update feature.

Summary of changes:
- do not scale the first argument to NetSetTimeout() by CFG_HZ
- change timeout values used in the networking code to milliseconds

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 079c2c4f 17-Nov-2007 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Fix warning differ in signedness in net/net.c and net/nfs.c

# 610f2e9c 10-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove lingering references to CFG_CMD_* symbols.

Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# 643d1ab2 09-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove obsolete references to CONFIG_COMMANDS

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# 6e2115ac 11-Jun-2007 Jon Loeliger <jdl@jdl.com>

net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).

This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# a3d991bd 15-Apr-2004 Wolfgang Denk <wd@denx.de>

Patches by Pantelis Antoniou, 30 Mar 2004:
add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol)

# 4b9206ed 23-Mar-2004 Wolfgang Denk <wd@denx.de>

* Patches by Thomas Viehweger, 16 Mar 2004:
- show PCI clock frequency on MPC8260 systems
- add FCC_PSMR_RMII flag for HiP7 processors
- in do_jffs2_fsload(), take load address from load_addr if not set
explicit, update load_addr otherwise
- replaced printf by putc/puts when no formatting is needed
(smaller code size, faster execution)

# 0e6d798c 13-Mar-2004 Wolfgang Denk <wd@denx.de>

* Patch by Travis Sawyer, 01 Mar 2004:
Ocotea:
- Add IBM PPC440GX Ref Platform support (Ocotea)
Original code by Paul Reynolds <PaulReynolds@lhsolutions.com>
Adapted to U-Boot and 440GX port
440gx_enet.c:
- Add gracious handling of all Ethernet Pin Selections for 440GX
- Add RGMII selection for Cicada CIS8201 Gigabit PHY
ppc440.h:
- Add needed bit definitions
- Fix formatting

* Patch by Carl Riechers, 1 Mar 2004:
Add PPC440GX prbdv0 divider to fix memory clock calculation.

* Patch by Stephan Linz, 27 Feb 2004
- avoid problems for targets without NFS download support

# c40b2956 13-Mar-2004 Wolfgang Denk <wd@denx.de>

* Patch by Rune Torgersen, 27 Feb 2004:
- Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA)
- Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF)
- Added support for 64bit strtoul (CFG_64BIT_STRTOUL)

* Patch by Masami Komiya, 27 Feb 2004:
Fix rarpboot: add autoload by NFS

* Patch by Dan Eisenhut, 26 Feb 2004:
fix flash_write return value in saveenv

* Patch by Stephan Linz, 11 Dec 2003
expand config.mk to avoid trigraph warnings on NIOS

* Rename "BMS2003" board into "HMI10"

# 7a8e9bed 31-May-2003 Wolfgang Denk <wd@denx.de>

* Patch by Marc Singer, 29 May 2003:
Fixed rarp boot method for IA32 and other little-endian CPUs.

* Patch by Marc Singer, 28 May 2003:
Added port I/O commands.

* Patch by Matthew McClintock, 28 May 2003
- cpu/mpc824x/start.S: fix relocation code when booting from RAM
- minor patches for utx8245

* Patch by Daniel Engstr�m, 28 May 2003:
x86 update

* Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
add nand flash support to SXNI855T configuration
fix/extend nand flash support:
- fix 'nand erase' command so does not erase bad blocks
- fix 'nand write' command so does not write to bad blocks
- fix nand_probe() so handles no flash detected properly
- add doc/README.nand
- add .jffs2 and .oob options to nand read/write
- add 'nand bad' command to list bad blocks
- add 'clean' option to 'nand erase' to write JFFS2 clean markers
- make NAND read/write faster

* Patch by Rune Torgersen, 23 May 2003:
Update for MPC8266ADS board

# affae2bf 17-Aug-2002 Wolfgang Denk <wd@denx.de>

Initial revision

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 34696958 23-Aug-2015 Lukasz Majewski <l.majewski@majess.pl>

net: tftp: Move tftp.h file from ./net to ./include/net

This change gives the ability to reuse the <tftp.h> header file by other
subsystems (like e.g. dfu).

Without this change compilation error emerges for the legacy update.c file.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# bc0571fc 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Fix checkpatch.pl failures in net.c

Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 698d78e5 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Clean up RARP variables and functions

Make a thorough pass through all variables and function names contained
within rarp.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 1203fcce 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Cleanup internal packet buffer names

This patch cleans up the names of internal packet buffer names that are
used within the network stack and the functions that use them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 049a95a7 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Change IPaddr_t to struct in_addr

This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# 4ef8d53c 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Allow filtering on debug traces in the net subsystem

Add several levels of DEBUG prints so that you can limit the noise to
the severety of your problem.

DEBUG_LL_STATE = Link local state machine changes
DEBUG_DEV_PKT = Packets or info directed to the device
DEBUG_NET_PKT = Packets on info on the network at large
DEBUG_INT_STATE = Internal network state changes

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 00f33268 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Refactor packet length computations

Save the length when it is computed instead of forgetting it and
subtracting pointers to figure it out again.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 738853bb 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef ARP_t

Remove typedef and lower-case letters

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 594c26f8 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef IP_t

Rename IP header related things to IP_UDP. The existing definition
of IP_t includes UDP header, so name it to accurately describe the
structure.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 8b9c5322 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Move RARP receive logic out of net.c

Separate this functionality out of the net.c behemoth

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# c2faf4f9 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: rarp.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# db288a96 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Remove volatile from net API

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# e4a3d57d 27-Oct-2011 Simon Glass <sjg@chromium.org>

net: Export auto_load, use it in rarp

The rarp code includes another instance of the auto_load logic, so call
what is now net_auto_load() instead.

This also fixes an incorrect call to TftpStart() which was never seen
since apparently no boards enable rarp.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>

# 03eb129f 18-Apr-2011 Luca Ceresoli <luca.ceresoli@comelit.it>

NET: pass source IP address to packet handlers

This is needed for the upcoming TFTP server implementation.

This also simplifies PingHandler() and fixes rxhand_f documentation.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>

# 6ac59c55 03-Nov-2009 Mike Frysinger <vapier@gentoo.org>

net: pull CONFIG checks out of source and into makefile

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 0ebf04c6 23-Jul-2009 Robin Getz <rgetz@blackfin.uclinux.org>

minor debug cleanups in ./net

Minor ./net cleanups - no functional changes
- change #ifdef DEBUG printf(); #endif to just debug()
- changed __FUNCTION__ to __func__
- got rid of extra whitespace between function and opening brace
- removed unnecessary braces on if statements

gcc dead code elimination should make this functionally/size equivalent
when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 49f3bdbb 01-Oct-2008 Bartlomiej Sieka <tur@semihalf.com>

net: express the first argument to NetSetTimeout() in milliseconds

Enforce millisecond semantics of the first argument to NetSetTimeout() --
the change is transparent for well-behaving boards (CFG_HZ == 1000 and
get_timer() countiing in milliseconds).

Rationale for this patch is to enable millisecond granularity for
network-related timeouts, which is needed for the upcoming automatic
software update feature.

Summary of changes:
- do not scale the first argument to NetSetTimeout() by CFG_HZ
- change timeout values used in the networking code to milliseconds

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 079c2c4f 17-Nov-2007 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Fix warning differ in signedness in net/net.c and net/nfs.c

# 610f2e9c 10-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove lingering references to CFG_CMD_* symbols.

Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# 643d1ab2 09-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove obsolete references to CONFIG_COMMANDS

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# 6e2115ac 11-Jun-2007 Jon Loeliger <jdl@jdl.com>

net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).

This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>

# a3d991bd 15-Apr-2004 Wolfgang Denk <wdenk>

Patches by Pantelis Antoniou, 30 Mar 2004:
add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol)

# 4b9206ed 23-Mar-2004 Wolfgang Denk <wdenk>

* Patches by Thomas Viehweger, 16 Mar 2004:
- show PCI clock frequency on MPC8260 systems
- add FCC_PSMR_RMII flag for HiP7 processors
- in do_jffs2_fsload(), take load address from load_addr if not set
explicit, update load_addr otherwise
- replaced printf by putc/puts when no formatting is needed
(smaller code size, faster execution)

# 0e6d798c 13-Mar-2004 Wolfgang Denk <wdenk>

* Patch by Travis Sawyer, 01 Mar 2004:
Ocotea:
- Add IBM PPC440GX Ref Platform support (Ocotea)
Original code by Paul Reynolds <PaulReynolds@lhsolutions.com>
Adapted to U-Boot and 440GX port
440gx_enet.c:
- Add gracious handling of all Ethernet Pin Selections for 440GX
- Add RGMII selection for Cicada CIS8201 Gigabit PHY
ppc440.h:
- Add needed bit definitions
- Fix formatting

* Patch by Carl Riechers, 1 Mar 2004:
Add PPC440GX prbdv0 divider to fix memory clock calculation.

* Patch by Stephan Linz, 27 Feb 2004
- avoid problems for targets without NFS download support

# c40b2956 13-Mar-2004 Wolfgang Denk <wdenk>

* Patch by Rune Torgersen, 27 Feb 2004:
- Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA)
- Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF)
- Added support for 64bit strtoul (CFG_64BIT_STRTOUL)

* Patch by Masami Komiya, 27 Feb 2004:
Fix rarpboot: add autoload by NFS

* Patch by Dan Eisenhut, 26 Feb 2004:
fix flash_write return value in saveenv

* Patch by Stephan Linz, 11 Dec 2003
expand config.mk to avoid trigraph warnings on NIOS

* Rename "BMS2003" board into "HMI10"

# 7a8e9bed 31-May-2003 Wolfgang Denk <wdenk>

* Patch by Marc Singer, 29 May 2003:
Fixed rarp boot method for IA32 and other little-endian CPUs.

* Patch by Marc Singer, 28 May 2003:
Added port I/O commands.

* Patch by Matthew McClintock, 28 May 2003
- cpu/mpc824x/start.S: fix relocation code when booting from RAM
- minor patches for utx8245

* Patch by Daniel Engstr�m, 28 May 2003:
x86 update

* Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
add nand flash support to SXNI855T configuration
fix/extend nand flash support:
- fix 'nand erase' command so does not erase bad blocks
- fix 'nand write' command so does not write to bad blocks
- fix nand_probe() so handles no flash detected properly
- add doc/README.nand
- add .jffs2 and .oob options to nand read/write
- add 'nand bad' command to list bad blocks
- add 'clean' option to 'nand erase' to write JFFS2 clean markers
- make NAND read/write faster

* Patch by Rune Torgersen, 23 May 2003:
Update for MPC8266ADS board

# affae2bf 17-Aug-2002 Wolfgang Denk <wdenk>

Initial revision

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 34696958 23-Aug-2015 Lukasz Majewski <l.majewski@majess.pl>

net: tftp: Move tftp.h file from ./net to ./include/net

This change gives the ability to reuse the <tftp.h> header file by other
subsystems (like e.g. dfu).

Without this change compilation error emerges for the legacy update.c file.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# bc0571fc 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Fix checkpatch.pl failures in net.c

Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 698d78e5 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Clean up RARP variables and functions

Make a thorough pass through all variables and function names contained
within rarp.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 1203fcce 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Cleanup internal packet buffer names

This patch cleans up the names of internal packet buffer names that are
used within the network stack and the functions that use them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 049a95a7 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Change IPaddr_t to struct in_addr

This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# 4ef8d53c 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Allow filtering on debug traces in the net subsystem

Add several levels of DEBUG prints so that you can limit the noise to
the severety of your problem.

DEBUG_LL_STATE = Link local state machine changes
DEBUG_DEV_PKT = Packets or info directed to the device
DEBUG_NET_PKT = Packets on info on the network at large
DEBUG_INT_STATE = Internal network state changes

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 00f33268 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Refactor packet length computations

Save the length when it is computed instead of forgetting it and
subtracting pointers to figure it out again.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>


# 738853bb 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef ARP_t

Remove typedef and lower-case letters

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 594c26f8 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Un-typedef IP_t

Rename IP header related things to IP_UDP. The existing definition
of IP_t includes UDP header, so name it to accurately describe the
structure.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 8b9c5322 23-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Move RARP receive logic out of net.c

Separate this functionality out of the net.c behemoth

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>


# c2faf4f9 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: rarp.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# db288a96 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: Remove volatile from net API

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# e4a3d57d 27-Oct-2011 Simon Glass <sjg@chromium.org>

net: Export auto_load, use it in rarp

The rarp code includes another instance of the auto_load logic, so call
what is now net_auto_load() instead.

This also fixes an incorrect call to TftpStart() which was never seen
since apparently no boards enable rarp.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>


# 03eb129f 18-Apr-2011 Luca Ceresoli <luca.ceresoli@comelit.it>

NET: pass source IP address to packet handlers

This is needed for the upcoming TFTP server implementation.

This also simplifies PingHandler() and fixes rxhand_f documentation.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>


# 6ac59c55 03-Nov-2009 Mike Frysinger <vapier@gentoo.org>

net: pull CONFIG checks out of source and into makefile

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>


# 0ebf04c6 23-Jul-2009 Robin Getz <rgetz@blackfin.uclinux.org>

minor debug cleanups in ./net

Minor ./net cleanups - no functional changes
- change #ifdef DEBUG printf(); #endif to just debug()
- changed __FUNCTION__ to __func__
- got rid of extra whitespace between function and opening brace
- removed unnecessary braces on if statements

gcc dead code elimination should make this functionally/size equivalent
when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>


# 49f3bdbb 01-Oct-2008 Bartlomiej Sieka <tur@semihalf.com>

net: express the first argument to NetSetTimeout() in milliseconds

Enforce millisecond semantics of the first argument to NetSetTimeout() --
the change is transparent for well-behaving boards (CFG_HZ == 1000 and
get_timer() countiing in milliseconds).

Rationale for this patch is to enable millisecond granularity for
network-related timeouts, which is needed for the upcoming automatic
software update feature.

Summary of changes:
- do not scale the first argument to NetSetTimeout() by CFG_HZ
- change timeout values used in the networking code to milliseconds

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>


# 079c2c4f 17-Nov-2007 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Fix warning differ in signedness in net/net.c and net/nfs.c


# 610f2e9c 10-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove lingering references to CFG_CMD_* symbols.

Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>


# 643d1ab2 09-Jul-2007 Jon Loeliger <jdl@freescale.com>

net/: Remove obsolete references to CONFIG_COMMANDS

Signed-off-by: Jon Loeliger <jdl@freescale.com>


# 6e2115ac 11-Jun-2007 Jon Loeliger <jdl@jdl.com>

net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).

This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>


# a3d991bd 15-Apr-2004 wdenk <wdenk>

Patches by Pantelis Antoniou, 30 Mar 2004:
add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol)


# 4b9206ed 23-Mar-2004 wdenk <wdenk>

* Patches by Thomas Viehweger, 16 Mar 2004:
- show PCI clock frequency on MPC8260 systems
- add FCC_PSMR_RMII flag for HiP7 processors
- in do_jffs2_fsload(), take load address from load_addr if not set
explicit, update load_addr otherwise
- replaced printf by putc/puts when no formatting is needed
(smaller code size, faster execution)


# 0e6d798c 13-Mar-2004 wdenk <wdenk>

* Patch by Travis Sawyer, 01 Mar 2004:
Ocotea:
- Add IBM PPC440GX Ref Platform support (Ocotea)
Original code by Paul Reynolds <PaulReynolds@lhsolutions.com>
Adapted to U-Boot and 440GX port
440gx_enet.c:
- Add gracious handling of all Ethernet Pin Selections for 440GX
- Add RGMII selection for Cicada CIS8201 Gigabit PHY
ppc440.h:
- Add needed bit definitions
- Fix formatting

* Patch by Carl Riechers, 1 Mar 2004:
Add PPC440GX prbdv0 divider to fix memory clock calculation.

* Patch by Stephan Linz, 27 Feb 2004
- avoid problems for targets without NFS download support


# c40b2956 13-Mar-2004 wdenk <wdenk>

* Patch by Rune Torgersen, 27 Feb 2004:
- Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA)
- Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF)
- Added support for 64bit strtoul (CFG_64BIT_STRTOUL)

* Patch by Masami Komiya, 27 Feb 2004:
Fix rarpboot: add autoload by NFS

* Patch by Dan Eisenhut, 26 Feb 2004:
fix flash_write return value in saveenv

* Patch by Stephan Linz, 11 Dec 2003
expand config.mk to avoid trigraph warnings on NIOS

* Rename "BMS2003" board into "HMI10"


# 7a8e9bed 31-May-2003 wdenk <wdenk>

* Patch by Marc Singer, 29 May 2003:
Fixed rarp boot method for IA32 and other little-endian CPUs.

* Patch by Marc Singer, 28 May 2003:
Added port I/O commands.

* Patch by Matthew McClintock, 28 May 2003
- cpu/mpc824x/start.S: fix relocation code when booting from RAM
- minor patches for utx8245

* Patch by Daniel Engstr�m, 28 May 2003:
x86 update

* Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
add nand flash support to SXNI855T configuration
fix/extend nand flash support:
- fix 'nand erase' command so does not erase bad blocks
- fix 'nand write' command so does not write to bad blocks
- fix nand_probe() so handles no flash detected properly
- add doc/README.nand
- add .jffs2 and .oob options to nand read/write
- add 'nand bad' command to list bad blocks
- add 'clean' option to 'nand erase' to write JFFS2 clean markers
- make NAND read/write faster

* Patch by Rune Torgersen, 23 May 2003:
Update for MPC8266ADS board


# affae2bf 17-Aug-2002 wdenk <wdenk>

Initial revision