- 25 1月, 2020 1 次提交
-
-
由 Simon Glass 提交于
This function belongs in the network header file. Move it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 09 12月, 2019 2 次提交
-
-
由 Joe Hershberger 提交于
Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Part of the env cleanup moved this out of the environment code and into the net code. However, this helper is sometimes needed even when the net stack isn't included. Move the helper to lib/net_utils.c like it's similarly-purposed string_to_ip(). Also rename the moved function to similar naming. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NOndrej Jirman <megous@megous.com>
-
- 03 12月, 2019 2 次提交
-
-
由 Simon Glass 提交于
This function relates to networking, so move it out of the common.h header file. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Simon Glass 提交于
Create a new rand.h header file and move functions into it, to reduce the size of common.h Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 05 9月, 2019 1 次提交
-
-
由 Michael Walle 提交于
The net_random_ethaddr() tries to get some entropy from different startup times of a board. The seed is initialized with get_timer() which has only a granularity of milliseconds. We can do better if we use get_ticks() which returns the raw timer ticks. Using this we have a higher chance of getting different values at startup. Signed-off-by: NMichael Walle <michael@walle.cc> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 12 8月, 2019 2 次提交
-
-
由 Simon Glass 提交于
This function fits better with the network subsystem, so move it. Signed-off-by: NSimon Glass <sjg@chromium.org> Suggested-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Simon Glass 提交于
Move env_set() over to the new header file. Acked-by: NJoe Hershberger <joe.hershberger@ni.com> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 19 7月, 2019 1 次提交
-
-
由 Heinrich Schuchardt 提交于
The inline functions net_read_u32() and net_copy_u32() have been created to copy unaligned u32. But this is not obvious to the compiler. GCC 9.1 introduces a check -Werror=address-of-packed-member which leads to a build error on Travis CI: net/bootp.c: In function ‘dhcp_send_request_packet’: net/bootp.c:1011:27: error: taking address of packed member of ‘struct bootp_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 1011 | net_copy_u32(&bp->bp_id, &bp_offer->bp_id); Change the type of the function parameters to void * to avoid the build error. Reported-by: NRamon Fried <rfried.dev@gmail.com> Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 12 4月, 2019 1 次提交
-
-
由 Faiz Abbas 提交于
Add a priv member for eth_pdata for platform specific platform data. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
-
- 25 1月, 2019 2 次提交
-
-
由 Chris Packham 提交于
No mainline board enables CONFIG_MCAST_TFTP and there have been compilation issues with the code for some time. Additionally, it has a potential buffer underrun issue (reported as a side note in CVE-2018-18439). Remove the multicast TFTP code but keep the driver API for the future addition of IPv6. Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Signed-off-by: NChris Packham <judge.packham@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Chris Packham 提交于
ether_crc was added to the core net code in commit 53a5c424 ("multicast tftp: RFC2090") so that other drivers could use it. However the only current user of it is tsec.c so move it there. Signed-off-by: NChris Packham <judge.packham@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 11 10月, 2018 4 次提交
-
-
由 Duncan Hare 提交于
Make it possible to add TCP versions of the same, while reusing IP portions. This patch should not change any behavior. Signed-off-by: NDuncan Hare <DH@Synoia.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Peter originally sent a fix, but it breaks a number of other things. This addresses the original reported issue in a different way. That report was: > U-Boot has 1 common buffer to send Ethernet frames, pointed to by > net_tx_packet. When sending to an IP address without knowing the MAC > address, U-Boot makes an ARP request (using the arp_tx_packet buffer) > to find out the MAC address of the IP addressr. When a matching ARP > reply is received, U-Boot continues sending the frame stored in the > net_tx_packet buffer. > > However, in the mean time, if U-Boot needs to send out any network > packets (e.g. replying ping packets or ARP requests for its own IP > address etc.), it will use the net_tx_packet buffer to prepare the > new packet. Thus this buffer is no longer the original packet meant > to be transmitted after the ARP reply. The original packet will be > lost. This instead uses the ARP tx buffer to send async replies in the case where we are actively waiting for an ARP reply. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NTran Tien Dat <peter.trantiendat@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Joe Hershberger 提交于
This single-sources the state of the ARP. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Bin Meng 提交于
There are plenty of existing drivers that have macros like ETH_ALEN defined in their own source files. Now that we imported the kernel's if_ether.h to U-Boot we can reduce some duplication. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 08 8月, 2018 1 次提交
-
-
由 Pankaj Bansal 提交于
The 16 char ethernet name size is inadequate to hold the name of ethernet name "DPMAC17@rgmii-id", which is a valid name in LX2160AQDS/LX2160ARDB. Therefore, increase the name string size to 20 chars. Reported-by: NIoana Ciornei <ioana.ciornei@nxp.com> Suggested-by: NIoana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: NPankaj Bansal <pankaj.bansal@nxp.com> Reviewed-by: NYork Sun <york.sun@nxp.com>
-
- 27 7月, 2018 2 次提交
-
-
由 Joe Hershberger 提交于
The same basic parsing was implemented in tftp and nfs, so add a helper function to do the work once. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
For net_boot_common, we allow the serverip to be specified as part of the boot file name. For net commands that require serverip, include that source as a valid specification of serverip. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NAlexander Graf <agraf@suse.de>
-
- 03 7月, 2018 2 次提交
-
-
由 Alexander Graf 提交于
We can call commands like dhcp and bootp without arguments or with explicit command line arguments that really should tell the code where to look for files instead. Unfortunately, the current code simply overwrites command line arguments in the dhcp case with dhcp values. This patch allows the code to preserve the command line values if they were set on the command line. That way the semantics are slightly more intuitive. The reason this patch does that by introducing a new variable is that we can not rely on net_boot_file_name[0] being unset, as today it's completely legal to call "dhcp" and afterwards run "tftp" and expect the latter to repeat the same query as before. I would prefer not to break that behavior in case anyone relies on it. Signed-off-by: NAlexander Graf <agraf@suse.de> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Lothar Felten 提交于
Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or time out if no WoL packed is received. If the WoL packet contains a password, it is saved in the environment variable 'wolpassword' using the etherwake format (dot or colon separated decimals). Intended use case: a networked device should boot an alternate image. It's attached to a network on a client site, modifying the DHCP server configuration or setup of a tftp server is not allowed. After power on the device waits a few seconds for a WoL packet. If a packet is received, the device boots the alternate image. Otherwise it boots the default image. This method is a simple way to interact with a system via network even if only the MAC address is known. Tools to send WoL packets are available on all common platforms. Some Ethernet drivers seem to pad the incoming packet. The additional padding bytes might be recognized as Wake-on-LAN password bytes. By default enabled in pengwyn_defconfig. Signed-off-by: NLothar Felten <lothar.felten@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 30 5月, 2018 1 次提交
-
-
由 Alex Kiernan 提交于
Merge UDP fastboot support from AOSP: https://android.googlesource.com/platform/external/u-boot/+/android-o-mr1-iot-preview-8Signed-off-by: NAlex Kiernan <alex.kiernan@gmail.com> Signed-off-by: NAlex Deymo <deymo@google.com> Signed-off-by: NJocelyn Bohr <bohr@google.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 11 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
As part of the main conversion a few files were missed. These files had additional whitespace after the '*' and before the SPDX tag and my previous regex was too strict. This time I did a grep for all SPDX tags and then filtered out anything that matched the correct styles. Fixes: 83d290c5 ("SPDX: Convert all of our single license tags to Linux Kernel style") Reported-by: NHeinrich Schuchardt <xypron.debian@gmx.de> Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 09 4月, 2018 1 次提交
-
-
由 Alex Kiernan 提交于
In order that we can use eth_env_* even when CONFIG_NET isn't set, move these functions to environment code from net code. This fixes failures such as: board/ti/am335x/built-in.o: In function `board_late_init': board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr' u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr' which caters for use cases such as: commit f411b5cc ("board: am335x: Always set eth/eth1addr environment variable") when Ethernet is required in Linux, but not U-Boot. Signed-off-by: NAlex Kiernan <alex.kiernan@gmail.com>
-
- 07 4月, 2018 1 次提交
-
-
由 Jason Kridner 提交于
NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that. Signed-off-by: NJason Kridner <jdk@ti.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: NTom Rini <trini@konsulko.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 16 8月, 2017 3 次提交
-
-
由 Simon Glass 提交于
We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency: getenv_vlan() getenv_bootm_size() getenv_bootm_low() getenv_bootm_mapsize() env_get_default() Suggested-by: NWolfgang Denk <wd@denx.de> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Rename this function for consistency with env_get(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Rename this function for consistency with env_set(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 08 8月, 2017 1 次提交
-
-
由 Denis Pynkin 提交于
PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled by default for '-O2': BOOTP broadcast 1 data abort pc : [<8ff8bb30>] lr : [<00004f1f>] reloc pc : [<17832b30>] lr : [<878abf1f>] sp : 8f558bc0 ip : 00000000 fp : 8ffef5a4 r10: 8ffed248 r9 : 8f558ee0 r8 : 8ffef594 r7 : 0000000e r6 : 8ffed700 r5 : 00000000 r4 : 8ffed74e r3 : 00060101 r2 : 8ffed230 r1 : 8ffed706 r0 : 00000ddd Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ... Core reason is usage of structures for network headers without packed attribute. Reviewed-by: NYauheni Kaliuta <yauheni.kaliuta@redhat.com> Signed-off-by: NDenis Pynkin <denis.pynkin@collabora.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 12 6月, 2017 1 次提交
-
-
由 Heiko Schocher 提交于
There was for long time no activity in the 8xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8xx, so remove it (with a heavy heart, knowing that I remove here the root of U-Boot). Signed-off-by: NHeiko Schocher <hs@denx.de>
-
- 08 2月, 2017 3 次提交
-
-
由 oliver@schinagl.nl 提交于
There are various places where the ethernet device name is defined to several different sizes. Lets add a define and start using it. Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 oliver@schinagl.nl 提交于
In u-boot printf has been extended with the %pM formatter to allow printing of MAC addresses. However buffers that want to store a MAC address cannot safely get the size. Add a define for this case so the string of a MAC address can be reliably obtained. Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 oliver@schinagl.nl 提交于
Commit 674bb249 ("net: cosmetic: Replace magic numbers in arp.c with constants") introduced a nice define to replace the magic value 6 for the ethernet hardware address. Replace more hardcoded instances of 6 which really reference the ARP_HLEN (iow the MAC/Hardware/Ethernet address). Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 10 1月, 2017 1 次提交
-
-
由 Mugunthan V N 提交于
Adopt usb ether gadget and rndis driver to adopt driver model Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
-
- 16 7月, 2016 1 次提交
-
-
由 Robert P. J. Day 提交于
Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca>
-
- 27 5月, 2016 1 次提交
-
-
由 Alexander Graf 提交于
We can now successfully boot EFI applications from disk, but users may want to also run them from a PXE setup. This patch implements rudimentary network support, allowing a payload to send and receive network packets. With this patch, I was able to successfully run grub2 with network access inside of QEMU's -M xlnx-ep108. Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 04 5月, 2016 1 次提交
-
-
由 Stefan Agner 提交于
Ethernet packages with IEEE 802.1Q VLAN support may be up to 1522 bytes long. Increase the default size used to allocate packet storage by 4 bytes. While at it, let git care about history and rewrite the comment to represent the situation today only. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NTom Rini <trini@konsulko.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 04 4月, 2016 1 次提交
-
-
由 Stefan Roese 提交于
This patch adds support for the mvpp2 ethernet controller which is integrated in the Marvell Armada 375 SoC. This port is based on the Linux driver (v4.4), which has been stripped of the in U-Boot unused portions. Tested on the Marvell Armada 375 eval board db-88f6720. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Acked-by: NJoe Hershberger <joe.hershberger@gmail.com>
-
- 27 3月, 2016 1 次提交
-
-
由 Roger Quadros 提交于
Some TI boards (e.g. IDK) have 4 to 6 ethernet ports and this function is handy at board.c to configure the MAC address of the ports. Signed-off-by: NRoger Quadros <rogerq@ti.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 29 1月, 2016 1 次提交
-
-
由 Alexey Brodkin 提交于
This will be used for getting max speed mode of Ethernet interface that a particular MAC supports from Device Tree blob and later being used for phy configuration. Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-