2018-08-10 |
net: eth: Make use of ETH_ALEN
...
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Andrey Smirnov
authored
on 9 Aug 2018
Sascha Hauer
committed
on 10 Aug 2018
|
2017-12-15 |
net: Add linuxdevname property
...
When you have a static network environment but more than one network
device on your machine it is necessary to provide the <device> parameter
to the ip parameter at kernel cmd line.
The device name assigned by Linux cannot in general be predicted as it
depends on driver bind order.
This patch introduces a new property linux.devname to eth devices.
The value is added to bootargs per interface and can be changed in
env/network/INTF
Based on patch by Gavin Schenk <g.schenk@eckelmann.de>.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Dec 2017
|
2017-12-14 |
net: Provide new way to configure network devices
...
This provides a new way to configure network interfaces based
on nvvars. A network interface can now be configured with variables
in the nv.dev.<ethname>.* namespace. There is a new network device
parameter "mode" which specifies the mode used to obtain IP settings.
The mode can be "dhcp", "static" or "disabled":
nv.dev.eth0.mode=dhcp
(ipaddr, netmask are ignored in this setting)
nv.dev.eth0.mode=static
nv.dev.eth0.ipaddr=192.168.0.17
nv.dev.eth0.netmask=255.255.0.0
nv.dev.eth0.mode=disabled
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Dec 2017
|
net: remove "current" network device
...
Now that we can do routing we no longer need a "current"
network device. Remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Dec 2017
|
2017-12-01 |
net: Use a single gateway
...
There is not much point in having a network device specific
gateway. If barebox really is part of such a complicated network
in which it needs multiple gateways, then we probably need a
real routing table. Until this happens, a single gateway should
be enough.
This introduces global.net.gateway which holds the gateway ip. The
previously used device specific <ethx>.gateway variables still exist,
but are only aliases for the single gateway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 1 Dec 2017
|
net: introduce global.net.server
...
The server to use is independent of the network device, there is
not much point to make the server specific to a network device.
This introduces global.net.server as the serverip which is
used as standard NFS/tftp server. The previously used eth
device specific parameters still exist, but are only aliases
for the global single variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 1 Dec 2017
|
2016-09-22 |
net: add linux.bootarg parameter from ifup call
...
This sets a `ip=dhcp` or
`ip=<clientip>:<serverip>:<gatewayip>:<netmaskip>::<iface>:` bootarg for
the network device upon execution of 'ifup'. This is the only point
where we can distinguish between a static ip and a dhcp-based network
setup and thus set a valid bootarg options as it will be required for
nfs boot, for example.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Enrico Jorns
authored
on 19 Sep 2016
Sascha Hauer
committed
on 22 Sep 2016
|
2016-07-14 |
net: eth: add name to struct eth_device
...
Using dev_name often is not a good idea since it's a statically
allocated string which gets overwritten by later calls to dev_name.
Add a devname string to struct eth_device to have the name available
for later use.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Jul 2016
|
net: introduce for_each_netdev iterator
...
for_each_netdev is nicer to read. Also export the list of network
devices since it will be used by code outside of net/eth.c in later
patches.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Jul 2016
|
net: eth: open correct edev in eth_check_open
...
eth_check_open gets the network device to check as parameter, so
use it rather than using eth_current. Currently both are the same,
so this currently does not fix anything.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Jul 2016
|
2015-11-20 |
net: eth: Remove ethaddr_param
...
commit d00db554 introduce ethaddr_param. But it is not initialized, so
devinfo fails to show the mac. Remove it and use edev->ethaddr.
Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Jan Remmet
authored
on 19 Nov 2015
Sascha Hauer
committed
on 20 Nov 2015
|
2015-10-22 |
net: eth: Fixup OF tree with registered MAC addresses too
...
The eth code registers an OF tree fixup that looks for any nodes in
the Linux oftree that match eth devices loaded in barebox and sets the
mac-address property in those nodes. The purpose is to pass MAC
addresses to the Linux kernel for drivers that expect the MAC address
to be in the device tree.
If barebox does not have a driver for the network device, either
because it has been disabled or because one does not exist, then the
OF tree will not be fixed up to include a MAC address.
The eth code also has a list of MAC addresses which board code has
registered, usually done when it reads the address from an EEPROM or
on-chip memory. If an eth device is created later in the boot, it
will look here for an address.
The registered MAC address list is not used for the OF tree fix up,
and this patch changes that. This way barebox can place a MAC address
in the device-tree without needing a driver for the network device.
Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Trent Piepho
authored
on 21 Oct 2015
Sascha Hauer
committed
on 22 Oct 2015
|
net: eth: Refactor OF tree fixup of one node into new function
...
Code that fixes up one node with a new MAC address is refactored into
a new function that eth_of_fixup() calls in a loop.
Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Trent Piepho
authored
on 21 Oct 2015
Sascha Hauer
committed
on 22 Oct 2015
|
2015-08-06 |
Merge branch 'for-next/net'
Sascha Hauer
committed
on 6 Aug 2015
|
2015-07-28 |
net: make eth_register_ethaddr work on registered network devices
...
When eth_register_ethaddr is called after the device has been registered
it should work aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Jul 2015
|
2015-07-23 |
net: eth_send: Allow to use multiple network interfaces at once
...
The commit
commit be0404c
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date: Wed May 14 16:08:04 2014 +0200
net: Allow to use multiple network interfaces at once
changes the eth_send() function:
- return eth_current->send(eth_current, packet, length);
+ return edev->send(eth_current, packet, length);
But we have to change the both eth_current occurrences to edev here!
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Antony Pavlov
authored
on 20 Jul 2015
Sascha Hauer
committed
on 23 Jul 2015
|
2015-06-26 |
net: eth: Do not rely on CONFIG_PARAMETER to be enabled
...
register_preset_mac_address only works when CONFIG_PARAMETER
is enabled because otherwise dev_set_param is a no-op. Add a
function to set the MAC address explicitly without the need
of CONFIG_PARAMETER and use it where appropriate.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jun 2015
|
2015-04-28 |
eth: halt active ethernet device on unregister
...
When an active ethernet device is unregistered it should
be halted to quiesce the device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Apr 2015
|
2014-09-17 |
net: Call edev->recv with correct eth_device
...
edev->recv has to be called with edev as argument, not eth_current.
This fixes networking when multiple network devices are used and the
current one is switched during runtime.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Sep 2014
|
2014-05-15 |
net: take eth id from devicetree alias
...
If the devicetree has an alias for the ethernet device, then use
it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 May 2014
|
net: Allow to use multiple network interfaces at once
...
In barebox network packets always go out at the current ethernet
device and are expected to be received from the current interface.
This has some side effects. When for example an NFS is mounted when
one interface is active and the interface is changed afterwards the
NFS packets leave the new interface, but the NFS server won't be
reachable there.
Instead of changing the whole network traffic to the current ethernet
interface we now initialize a network connection with the current
network interface, but then the connection will continue to use that
interface even when the current interface is changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 May 2014
|
2014-04-04 |
param: Add dev_add_param_mac
...
This adds a convenience function to register a MAC address device
parameter. The only current user is converted to use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 Apr 2014
|
2014-03-07 |
Merge branch 'for-next/nfs'
...
Conflicts:
defaultenv/defaultenv-2-base/bin/ifup
Sascha Hauer
committed
on 7 Mar 2014
|
Merge branch 'for-next/mtd'
...
Conflicts:
drivers/mtd/core.c
net/eth.c
Sascha Hauer
committed
on 7 Mar 2014
|
net: constify eth_get_byname argument
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 7 Mar 2014
|
2014-02-13 |
device: remove parameters when unregistering a device
...
Otherwise we loose memory on each device_unregister. The ethernet
code used to do this before calling unregister_device. This can
now be removed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Feb 2014
|
2014-02-10 |
remove redundant NULL check on free
...
free() already checks the pointer to be non
NULL. No need to do it again.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 7 Feb 2014
Sascha Hauer
committed
on 10 Feb 2014
|
2013-11-08 |
treewide: Add missing includes
...
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Nov 2013
|
2013-11-06 |
of: Add a context pointer to fixup functions
...
If drivers want to fixup their specific instance they need some context
to know which instance they have to fixup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Nov 2013
|
2013-09-05 |
net, of: fixup MAC address by alias
...
If a network device has not been registered from the devicetree, we may
still find it by its alias in the devicetree. This way also platform based
network devices can obtain a valid MAC address in the devicetree.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Renaud Barbier
authored
on 4 Sep 2013
Sascha Hauer
committed
on 5 Sep 2013
|