Sascha Hauer
97070487fa
net: Implement a new network stack
...
The old network stack has some bad limitations:
- network commands are required to call NetLoop() which only returns when
the network layer wants to. Instead we now use a net_poll() function which
returns after handling one packet (or immediately if no packet is
available).
- There can be only one packet handler which makes it impossible to handle
multiple connections
- CamelCaseMakesItHardToRead
The new network stack is implemented as a parallel universe. Currently all
commands still use the old stack. They are converted in subsequent patches.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:16 +02:00
Sascha Hauer
994f95c073
net: remove need for eth_halt/eth_open
...
We used to eth_open/eth_halt the network devices during NetLoopInit
which is called whenever the user enters a network command.
Change this behaviour so that the current network device gets opened
when making it the current one.
With this change it's always possible to send packages and we are able
to implement a new network stack in the next step.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:16 +02:00
Sascha Hauer
42f4ca1c85
put only once used function inline
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
8f0d0f25ed
replace ET_DEBUG with pr_debug
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
426de4405c
remove unused NETCONSOLE stuff
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:31 +01:00
Sascha Hauer
a5f301fb7a
remove unused variable NetBootFileSize
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 08:54:57 +02:00
Sascha Hauer
e2c2954654
make locally used funtion static
...
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-17 08:38:59 +02:00
Sascha Hauer
146f9b6e5b
remove sntp support. Has been broken for long enough
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:19:28 +02:00
Sascha Hauer
4ad31ee437
do not abuse the received packet to send back another packet
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
6289b5a51d
net: remove unnecessary if
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
faa61661cf
only the ping code is interested in the ping ip
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
5619409df6
net: remove dead code
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
4d0670f227
net: cleanup header file
...
move contents of bootp.h to .c file and remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 11:02:15 +02:00
Sascha Hauer
a3a5927110
net: remove switch/case in NetLoop()
...
Instead of having a big switch/case for every protocol, do
the right things in the individual functions before callong
NetLoop().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
8fe37b4e2e
bootp: remove unnecessary counter
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
f787f8fbf7
net: check prerequisites in NetLoopIinit()
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:57:40 +02:00
Sascha Hauer
c227c646e3
return is not a function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:54:14 +02:00
Sascha Hauer
9296260a78
net: split NetLoop in NetLoop and NetLoopInit
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:49:21 +02:00
Sascha Hauer
3487f1ee8e
net: remove unused state NETLOOP_RESTART
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:48:56 +02:00
Sascha Hauer
5e29712041
net: remove NetStartAgain()
...
Do not let the network stack restart itself
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-13 10:48:32 +02:00
Sascha Hauer
2f8df2a003
add a device_d to ethernet devices
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer
3ef59a5467
fix 62e2cd0a68
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-21 16:23:02 +02:00
Sascha Hauer
62e2cd0a68
net: remove redundant assignment
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 17:56:19 +02:00
Sascha Hauer
17ba93e7a0
net: initialize Net* variables unconditionally, not in a big switch/case
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 17:52:31 +02:00
Sascha Hauer
c0d02ffc3d
Fix string_to_ip
...
Use a pointer to an ip address instead of the return value in string_to_ip
and use the return value for error indication only. 0.0.0.0 can be a valid
ip address
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 17:46:47 +02:00
Sascha Hauer
e3f268d52d
net: Coding style changes
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-20 12:30:13 +02:00
Sascha Hauer
59f72431f4
Add missing call to eth_halt()
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-14 08:43:01 +02:00
Sascha Hauer
dabec3a7a1
Merge branch 'master' of git://www.denx.de/git/u-boot-v2
2008-06-02 16:13:14 +02:00
Sascha Hauer
9bf7a4f97f
[net] cleanups:
...
- remove cdp support
- replace CONFIG_BOOTP_MASK with #ifdef CONFIG_...
2008-04-07 11:37:25 +02:00
Sascha Hauer
51965dca86
remove cdp support. Probably not working anymore anyway.
2008-03-31 21:53:13 +02:00
Sascha Hauer
88da79df25
fix typo and indention
2008-03-21 21:25:15 +01:00
Juergen Beisert
2cb737d95d
using a consistent ipaddr parameter all over the place
...
Signed-off-by: Juergen Beisert <jbe@octopus.labnet.pengutronix.de>
2007-11-08 17:06:48 +01:00
sascha
2db56b3031
When printing error messages about network parameters print
...
the network device id with it.
2007-10-18 12:06:50 +02:00
sascha
3c37202662
check if there is an ethernet device set in NetLoop
2007-10-18 11:25:13 +02:00
sascha
a9791f69f7
rename mac parameter to ethaddr
2007-10-18 11:20:15 +02:00
sascha
1b272d80f1
change functions containing 'mac' or 'enet' in its name to 'ethaddr'.
...
change the parameter name for ethernet devices to 'ethaddr' aswell.
2007-10-18 11:17:16 +02:00
Sascha Hauer
6b7fdcb970
Use safe_strncpy() instead of copy_filename(). The shell has already removed
...
quotes, so we don't need this functionality from copy_filename()
2007-09-28 10:47:19 +02:00
Sascha Hauer
0dd68e795e
- putc is now putchar for better standard conformity
...
- make printf return int
2007-09-21 09:09:06 +02:00
Sascha Hauer
70a338bc27
Use unsigned char * for mac address. Otherwise (s)printf interpets
...
parts of the mac address as negative numbers and gives wrong
results.
2007-09-11 10:20:16 +02:00
Sascha Hauer
e304e16056
svn_rev_580
2007-07-05 18:02:07 +02:00
Sascha Hauer
fa668fe184
svn_rev_502
...
complete multiple console support
2007-07-05 18:01:59 +02:00
Sascha Hauer
fe2d505d4d
svn_rev_481
...
make more char * const, fix compiler warnings
2007-07-05 18:01:58 +02:00
Sascha Hauer
7baa6289fe
svn_rev_469
...
- make some more char * const
- dev_add_parameter -> dev_add_param
2007-07-05 18:01:56 +02:00
Sascha Hauer
e6a048eb57
svn_rev_405
...
add 0x for hex value in $filesize, remove $fileaddr
2007-07-05 18:01:50 +02:00
Sascha Hauer
36d28cc44d
svn_rev_314
...
remove volatile from variables
2007-07-05 18:01:42 +02:00
Sascha Hauer
f1871033f1
svn_rev_279
...
add include
2007-07-05 18:01:39 +02:00
Sascha Hauer
ad89ab9122
svn_rev_265
...
reverted last patch
2007-07-05 18:01:38 +02:00
Sascha Hauer
b5abad1213
svn_rev_229
...
remove unused label
2007-07-05 18:01:35 +02:00
Sascha Hauer
8dcc816ba9
svn_rev_227
...
fix parameter handling
2007-07-05 18:01:34 +02:00
Sascha Hauer
259fbf0a54
svn_rev_197
...
add string_to_enet_addr()/enet_addr_to_string()
2007-07-05 18:01:32 +02:00