- 19 4月, 2015 5 次提交
-
-
由 Joe Hershberger 提交于
This value is not used by the network stack and is available in the global data, so stop passing it around. For the one legacy function that still expects it (init op on old Ethernet drivers) pass in the global pointer version directly to avoid changing that interface. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org> (Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
-
由 Joe Hershberger 提交于
On some archs masking the parameter is inefficient, so don't use u8. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Move some things around and organize things so that the driver model implementation will fit in more easily. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Many of the functions in net.h were preceded extern needlessly. Removing them to limit the number of checkpatch.pl complaints. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
The current implementation exposes the eth_device struct to code that needs to access the MAC address. Add a wrapper function for this to abstract away the pointer for this operation. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 25 3月, 2015 1 次提交
-
-
由 Bin Meng 提交于
Some ethernet drivers use their own version of ethernet FCS length macro which is really common. We define ETH_FCS_LEN in net.h and replace those custom versions in various places. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 13 2月, 2015 1 次提交
-
-
由 Simon Glass 提交于
Drop the old checksum functions in favour of the new ones. Signed-off-by: NSimon Glass <sjg@chromium.org> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 24 1月, 2015 1 次提交
-
-
由 Simon Glass 提交于
Move the checksum code out into its own file so it can be used elsewhere. Also use a new version which supports a length which is not a multiple of 2 and add a new function to add two checksums. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 15 1月, 2015 1 次提交
-
-
由 Michal Simek 提交于
Use phys_addr_t instead of int for addresses. Addresses can't be < 0. Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
-
- 10 10月, 2014 1 次提交
-
-
由 Wolfgang Denk 提交于
A number of network related files were imported from the LiMon project; these contain a somewhat unclear license statement: Copyright 1994 - 2000 Neil Russell. (See License) I analyzed the source code of LiMon v1.4.2 which was used for this import. It does not contain any "License" file, but the top level directory contains a file "COPYING", which turns out to be GPL v2 of June 1991. So it is legitimate to conclude that the LiMon derived files are also to be released under GPLv2. Mark them as such. Signed-off-by: NWolfgang Denk <wd@denx.de>
-
- 13 5月, 2014 1 次提交
-
-
由 Masahiro Yamada 提交于
Some functions in include/net.h are ported from include/linux/etherdevice.h of Linux Kernel. For ex. is_zero_ether_addr() is_multicast_ether_addr() is_broadcast_ether_addr() is_valid_ether_addr(); So, we should use the same function name as that of Linux Kernel, eth_rand_addr(), for consistency. Besides, eth_rand_addr() has been implemented as an inline function. So it should not be surrounded by #ifdef CONFIG_RANDOM_MACADDR. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 23 11月, 2013 1 次提交
-
-
由 Claudiu Manoil 提交于
This fixes the following compiler warnings when activating CONFIG_MCAST_TFTP: tsec.c: In function 'tsec_mcast_addr': tsec.c:130:2: warning: passing argument 2 of 'ether_crc' makes pointer from integer without a cast [enabled by default] In file included from /work/u-boot-net/include/common.h:874:0, from tsec.c:15: /work/u-boot-net/include/net.h:189:5: note: expected 'const unsigned char *' but argument is of type 'u8' tsec.c: In function 'tsec_initialize': tsec.c:646:13: warning: assignment from incompatible pointer type [enabled by default] eth.c: In function 'eth_mcast_join': eth.c:358:2: warning: passing argument 2 of 'eth_current->mcast' makes integer from pointer without a cast [enabled by default] eth.c:358:2: note: expected 'u32' but argument is of type 'u8 *' In the eth_mcast_join() implementation, eth_current->mcast() takes a u8 pointer to the multicast mac address and not a ip address value as implied by its prototype. Fix parameter type mismatch for tsec_macst_addr() (tsec.c): ether_crc() takes a u8 pointer not a u8 value. mcast() is given a u8 pointer to the multicats mac address. Update parameter type for the rest of mcast() instances. Signed-off-by: NClaudiu Manoil <claudiu.manoil@freescale.com> Patch: 278989
-
- 20 8月, 2013 1 次提交
-
-
由 Jeroen Hofstee 提交于
The __* keywords are reserved. On FreeBSD __unused evaluates to the attribute unused, causing a compilation failure. Just use unused instead. Signed-off-by: NJeroen Hofstee <jeroen@myspectrum.nl> cc: joe.hershberger@gmail.com
-
- 25 6月, 2013 1 次提交
-
-
由 Kim Phillips 提交于
for use with sparse. Signed-off-by: NKim Phillips <kim.phillips@freescale.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
-
- 05 6月, 2013 1 次提交
-
-
由 Simon Glass 提交于
This function should be declared in net.h. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 05 11月, 2012 1 次提交
-
-
由 Kim Phillips 提交于
bootp.c:44:14: warning: symbol 'dhcp_state' was not declared. Should it be static? bootp.c:45:15: warning: symbol 'dhcp_leasetime' was not declared. Should it be static? bootp.c:46:10: warning: symbol 'NetDHCPServerIP' was not declared. Should it be static? arp.c:30:17: warning: symbol 'NetArpWaitReplyIP' was not declared. Should it be static? arp.c:37:16: warning: symbol 'NetArpTxPacket' was not declared. Should it be static? arp.c:38:17: warning: symbol 'NetArpPacketBuf' was not declared. Should it be static? atheros.c:33:19: warning: symbol 'AR8021_driver' was not declared. Should it be static? net.c:183:7: warning: symbol 'PktBuf' was not declared. Should it be static? net.c:159:21: warning: symbol 'net_state' was not declared. Should it be static? ping.c:73:6: warning: symbol 'ping_start' was not declared. Should it be static? ping.c:82:13: warning: symbol 'ping_receive' was not declared. Should it be static? tftp.c:53:7: warning: symbol 'TftpRRQTimeoutMSecs' was not declared. Should it be static? tftp.c:54:5: warning: symbol 'TftpRRQTimeoutCountMax' was not declared. Should it be static? eth.c:125:19: warning: symbol 'eth_current' was not declared. Should it be static? Note: in the ping.c fix, commit a36b12f9 "net: Move PING out of net.c" mistakenly carried the ifdef CMD_PING clause from when it was necessary to avoid warnings when it was embedded in net.c. Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
-
- 25 9月, 2012 2 次提交
-
-
由 Joe Hershberger 提交于
Check the incoming packets' source IP address... if ncip isn't set to a broadcast address, only listen to the client at ncip. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Previously u-boot would initialize the network interface for every network operation and then shut it down again. This makes sense for most operations where the network in not known to be needed soon after the operation is complete. In the case of netconsole, it will use the network for every interaction with the shell or every printf. This means that the network is being reinitialized very often. On many devices, this intialization is very slow. This patch checks for consecutive netconsole actions and leaves the ethernet hardware initialized between them. It will still behave the same old way for all other network operations and any time another network operation happens between netconsole operations. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by: NStefano Babic <sbabic@denx.de>
-
- 07 7月, 2012 1 次提交
-
-
由 Michael Walle 提交于
Add new function eth_random_enetaddr() to generate a locally administered ethernet address. Signed-off-by: NMichael Walle <michael@walle.cc> Acked-by: NJoe Hershberger <joe.hershberger@gmail.com>
-
- 24 5月, 2012 21 次提交
-
-
由 Joe Hershberger 提交于
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: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Code based on networking/zcip.c in busybox commit 8531d76a15890c2c535908ce888b2e2aed35b172 Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Use the NetArpTxPacket for the ARP packet, not to hold what used to be in NetTxPacket. This saves a copy and makes the code easier to understand. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
A new non-static function net_init() will initialize buffers and read from the environment. Only update from the env on each entry to NetLoop(). Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
When the network is VLAN or SNAP, net_update_ether() will preserve the original Ethernet packet header and simply replace the src and dest MACs and the protocol Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Call a built-in dummy if none is registered... don't require protocols to register a handler (eliminating dummies) NetConsole now uses the ARP handler when waiting on arp (instead of needing a #define hack in arp.c) Clear handlers at the end of net loop Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Changes to NetState now go through an accessor function called net_set_state() Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Use this entry-point consistently across the net/ code Use a static inline function to preserve code size Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
ICMP (ping) was reimplementing IP header code... it now shares code. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org> Acked-by: NMike Frysinger <vapier@gentoo.org>
-
由 Joe Hershberger 提交于
Use field names and sizes when accessing ARP packets Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Make the comment more accurate about the header including SNAP Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
This name more explicitly claims that it does not include the header size Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Remove typedef and lower-case name Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Remove typedef and lower-case letters Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Eliminate the typedef and remove capital letters Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Separate the Ethernet header from the 802 header. Base the size constants on the structs. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Add a structure that only contains IP header fields to be used by functions that don't need UDP Rename IP_HDR_SIZE_NO_UDP to IP_HDR_SIZE Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
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: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Separate this functionality out of the net.c behemoth Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org> Acked-by: NMike Frysinger <vapier@gentoo.org>
-
由 Joe Hershberger 提交于
Checking for CDP packets should be encapsulated, not copied code. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Separate this functionality out of the net.c behemoth Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-