aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)Author
2009-06-15A VLAN tagged DHCP request/discover is 4 bytes shortNorbert van Bolhuis
The problem is that BOOTP_SIZE uses ETHER_HDR_SIZE which is 14 bytes. If sending a VLAN tagged frame (when env variable vlan is set) this should be VLAN_ETHER_HDR_SIZE=18 which is what NetSetEther returns. Signed-off-by: Norbert van Bolhuis <nvbolhuis@aimvalley.nl> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15Remove support for non-CONFIG_NET_MULTI on PPC4xx EMACBen Warren
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15Switched davinci_emac Ethernet driver to use newer APIBen Warren
Added CONFIG_NET_MULTI to all Davinci boards Removed all calls to Davinci network driver from board code Added cpu_eth_init() to cpu/arm926ejs/cpu.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-05-15netloop: updates for NetLoopHeiko Schocher
Fix some issues introduced from commit: 2f70c49e5b9813635ad73666aa30f304c7fdeda9 suggested by Mike Frysinger. - added some comment for the env_id variable in common_cmd_nvedit.c - moved some variables in fn scope instead of file scope - NetInitLoop now static void Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-04-28Replace __attribute references with __attribute__Peter Tyser
__attribute__ follows gcc's documented syntax and is generally more common than __attribute. This change is only asthetic and should not affect functionality. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-19NetLoop initialization bugMichael Zaidman
The patch fixes the bug of partial initialization of global network parameters. Upon u-boot's start up the first ping command causes a failure of the consequent TFTP command. It happens in the recently added mechanism of the NetLoop initialization where initialization of global network parameters is separated in the NetInitLoop routine which is called per env_id change. Thus, ping request will initialize the network parameters necessary for ping operation only, afterwards the env_changed_id will be set to the env_id that will prevent all following initialization requests from other protocols. The problem is that the initialized by ping subset of network parameters is not sufficient for other protocols and particularly for TFTP which requires the NetServerIp also. Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-03-20net: get mac address from environment and use eth util funcsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20net: new utility functions for working with enetaddr'sMike Frysinger
Declare new utility functions for converting between the environment variables (eth*addr) and the binary MAC address representation. This way we can unify all the random places that already do this kind of thing. The functions in question: eth_parse_enetaddr - "..." -> {...} eth_getenv_enetaddr - env -> {...} eth_setenv_enetaddr - {...} -> env Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20convert print_IPaddr() to %pI4Mike Frysinger
Now that our printf functions support the %pI4 modifier like the kernel, let's drop the inflexible print_IPaddr() function and covert over to the %pI4 modifier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
2009-02-22netloop: speed up NetLoopHeiko Schocher
NetLoop polls every cycle with getenv some environment variables. This is horribly slow, especially when the environment is big. This patch reads only the environment variables in NetLoop, when they were changed. Also moved the init part of the NetLoop function in a seperate function. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-16Add eth_get_dev_by_indexAndy Fleming
This allows code to iterate through the ethernet devices Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-09net/sntp.c: move ifdef into Makefile COBJS-$(...)Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-01-28Fix IP alignment problemOlav Morken
This patch removes volatile from: volatile IP_t *ip = (IP_t *)xip; Due to a bug, avr32-gcc will assume that ip is aligned on a word boundary when using volatile, which causes an exception since xip isn't aligned on a word boundary. Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com> Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com> Signed-off-by: Olav Morken <olavmrk@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-09Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk
2008-12-06Update U-Boot's build timestamp on every compilePeter Tyser
Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-04net: Fix TftpStart() ip:filename bugPeter Tyser
The TftpStart() function modifies the 'BootFile' string when 'BootFile' contains both an IP address and filename (eg 1.2.3.4:/path/file). This causes subsequent calls to TftpStart to incorrectly parse the TFTP filename and server IP address to use. For example: => tftp 0x100000 10.52.0.62:/home/ptyser/non_existant Speed: 100, half duplex Using eTSEC1 device TFTP from server 10.52.0.62; our IP address is 10.52.253.79 ^^^^^^^^^^ CORRECT Filename '/home/ptyser/non_existant'. ^^^^^^^^^^^^^^^^^^^^^^^^^ CORRECT Load address: 0x100000 Loading: * TFTP error: 'File not found' (1) Starting again eTSEC2: No link. Speed: 100, half duplex Using eTSEC1 device TFTP from server 10.52.0.33; our IP address is 10.52.253.79 ^^^^^^^^^^ WRONG Filename '10.52.0.62'. ^^^^^^^^^^ WRONG Load address: 0x100000 Loading: * TFTP error: 'File not found' (1) Starting again TftpStart() was modified to not modify the 'BootFile' string. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04net: Add additional IP fragmentation checkPeter Tyser
Ignore IP packets which have the "more fragments" flag bit set. This flag indicates the IP packet is fragmented and must be ignored by U-Boot. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04net: Define IP flag field valuesPeter Tyser
These defines were pulled from the "Add simple IP/UDP fragmentation support" patch from Frank Haverkamp <haver@vnet.ibm.com>. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09Moved initialization of PPC4xx EMAC to cpu_eth_init()Ben Warren
Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Stefan Roese <sr@denx.de>
2008-11-09Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMACBen Warren
All in-tree IBM/AMCC PPC4xx boards using the EMAC get this new CONFIG Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Stefan Roese <sr@denx.de>
2008-11-09Moved initialization of MPC8XX SCC to cpu_eth_init()Ben Warren
Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09Moved initialization of MPC8220 FEC to cpu_eth_init()Ben Warren
Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09Moved initialization of QE Ethernet controller to cpu_eth_init()Ben Warren
Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09Moved initialization of FCC Ethernet controller to cpu_eth_initBen Warren
Affected boards: Several MPC8xx boards Several MPC8260/MPC8272 boards Several MPC85xx boards Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09net: Move initialization of Au1x00 SoC ethernet MAC to cpu_eth_initShinya Kuribayashi
This patch will move au1x00_eth_initialize from net/eth.c to cpu_eth_init as a part of ongoing eth_initialize cleanup work. The function ret value is also fixed as it should be negative on fail. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09Moved initialization of IXP4XX_NPE Ethernet controller to cpu_eth_init()Ben Warren
Also, removed the driver initialization from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18net: Make TFTP server timeout configurableBartlomiej Sieka
There are two aspects of a TFTP transfer involving timeouts: 1. timeout waiting for initial server reply after sending RRQ 2. timeouts while transferring actual data from the server Since the upcoming auto-update feature attempts a TFTP download during each boot, it is undesirable to have a long delay when the TFTP server is not available. Thus, this commit makes the server timeout (1.) configurable by two global variables: TftpRRQTimeoutMSecs TftpRRQTimeoutCountMax TftpRRQTimeoutMSecs overrides default timeout when trying to connect to a TFTP server, TftpRRQTimeoutCountMax overrides default number of connection retries. The total delay when trying to download a file from a non-existing TFTP server is TftpRRQTimeoutMSecs x TftpRRQTimeoutCountMax milliseconds. Timeouts during file transfers (2.) are unaffected. Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18net: express the first argument to NetSetTimeout() in millisecondsBartlomiej Sieka
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>
2008-10-18Adds two more ethernet interface to 83xxrichardretanubun
Added as a convenience for other platforms that uses MPC8360 (has 8 UCC). Six eth interface is chosen because the platform I am using combines UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Don't tftp to unknown flashJochen Friedrich
If a board has a variable number of flash banks, there are empty entries in flash_info[] and CFG_DIRECT_FLASH_TFTP is set, tftp boot fails with "Outside available Flash". This patch skips flash banks with unknown flash ids. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of EEPRO100 Ethernet controller to board_eth_init()Ben Warren
Affected boards: db64360 db64460 katmai taihu taishan yucca cpc45 cpu87 eXalion elppc debris kvme080 mpc8315erdb integratorap ixdp425 oxc pm826 pm828 pm854 pm856 ppmc7xx sc3 sc520_spunk sorcery tqm8272 tqm85xx utx8245 Removed initialization of the driver from net/eth.c Also, wrapped contents of pci_eth_init() by CONFIG_PCI. Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of TULIP Ethernet controller to board_eth_init()Ben Warren
Affected boards: cu824 bab7xx adciop dasa_sim mousse mpc8540eval musenki mvblue pcippc2/pcippc6 sbc8240 stxssa Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of E1000 Ethernet controller to board_eth_init()Ben Warren
Affected boards: ap1000 mvbc_p PM854 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of plb2800 Ethernet driver to board_eth_initBen Warren
Affected boards: purple Removed initialization of controller from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of MPC5xxx_FEC Ethernet driver to CPU directoryBen Warren
Modified board_eth_init() functions of boards that have this FEC in addition to other Ethernet controllers. Affected boards: bc3450 icecube mvbc_p o2dnt pm520 total5200 tq5200 Removed initialization of controller from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of MPC512x_FEC Ethernet driver to CPU directoryBen Warren
Added a cpu_eth_init() function to MPC512x CPU directory and removed code from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of IncaIP Ethernet controller to board_eth_initBen Warren
Affected boards: IncaIP Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of 3COM Ethernet controller (AmigaOne) to board_eth_init()Ben Warren
Affected boards: AmigaOneG3SE Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of GT6426x Ethernet controller to board_eth_init()Ben Warren
Affected boards: EVB64260 P3G4 ZUMA Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of PCNET Ethernet controller to board_eth_init()Ben Warren
Affected boards: PN62 sc520_cdp Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of NATSEMI Ethernet controller to board_eth_init()Ben Warren
Affected boards: a3000 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of NS8382X Ethernet controller to board_eth_init()Ben Warren
Affected boards: bc3450 cpci5200 mecp5200 pf2000 icecube o2dnt pm520 sandpoint8245 total5200 tqm5200 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of TSI108 Ethernet controller to board_eth_init()Ben Warren
Affected boards: mpc7448hpc2 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of RTL8139 Ethernet controller to board_eth_init()Ben Warren
Affected boards: hidden_dragon MPC8544DS MPC8610HPCN R2DPLUS TB0229 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of RTL8169 Ethernet controller to board_eth_init()Ben Warren
Affected boards: linkstation r7780mp Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02Moved initialization of Ethernet controllers on Atmel AT91 to board_eth_init()Ben Warren
Removed at91sam9_eth_initialize() from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-08-31davinci: fix remaining dm644x_ethJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-31ARM DaVinci: Changing function names for EMAC driverSandeep Paulraj
DM644x is just one of a series of DaVinci chips that use the EMAC driver. By replacing all the function names that start with dm644x_* to davinci_* we make these function more portable. I have tested this change on my EVM. DM6467 is another DaVinci SOC which uses the EMAC driver and i will be sending patches that add DaVinci DM6467 support to the list soon. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2008-08-26Fix bogus error message in the DHCP handlerRemy Bohmer
The DHCP handler has 1 state that is not listed in this case, causing a failure message when there is actually no failure. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>