summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dc2114x.c1
-rw-r--r--drivers/net/mscc_eswitch/jr2_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/luton_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/ocelot_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/serval_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/servalt_switch.c1
-rw-r--r--drivers/net/netconsole.c11
-rw-r--r--drivers/net/pfe_eth/pfe_firmware.c1
-rw-r--r--drivers/net/phy/phy.c2
9 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 7c0665faa8e..8fa549280aa 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -3,6 +3,7 @@
#include <asm/io.h>
#include <cpu_func.h>
#include <dm.h>
+#include <env.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index 925888e0765..f0404209116 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -222,7 +222,6 @@
#define CPU_PORT 53
#define IFH_LEN 7
#define JR2_BUF_CELL_SZ 60
-#define ETH_ALEN 6
#define PGID_BROADCAST 510
#define PGID_UNICAST 511
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index 1c584373b8b..be78afc3f79 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -132,7 +132,6 @@
#define CPU_PORT 26
#define INTERNAL_PORT_MSK 0xFFFFFF
#define IFH_LEN 2
-#define ETH_ALEN 6
#define PGID_BROADCAST 28
#define PGID_UNICAST 29
#define PGID_SRC 80
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index 30bb4b5bad8..b7a8b60587d 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -126,7 +126,6 @@
#define CPU_PORT 11
#define INTERNAL_PORT_MSK 0x2FF
#define IFH_LEN 4
-#define ETH_ALEN 6
#define PGID_BROADCAST 13
#define PGID_UNICAST 14
#define PGID_SRC 80
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index 8eab41df99a..02f197aa339 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -111,7 +111,6 @@
#define CPU_PORT 11
#define INTERNAL_PORT_MSK 0xFF
#define IFH_LEN 4
-#define ETH_ALEN 6
#define PGID_BROADCAST 13
#define PGID_UNICAST 14
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index 61547d7933e..4b073c0781e 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -88,7 +88,6 @@
#define MAC_VID 0
#define CPU_PORT 11
#define IFH_LEN 7
-#define ETH_ALEN 6
#define PGID_BROADCAST 50
#define PGID_UNICAST 51
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 1943de8ba73..c2ce4a80d12 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -61,8 +61,8 @@ static int is_broadcast(struct in_addr ip)
/* update only when the environment has changed */
if (env_changed_id != env_id) {
- netmask = env_get_ip("netmask");
- our_ip = env_get_ip("ipaddr");
+ netmask = string_to_ip(env_get("netmask"));
+ our_ip = string_to_ip(env_get("ipaddr"));
env_changed_id = env_id;
}
@@ -81,11 +81,12 @@ static int refresh_settings_from_env(void)
/* update only when the environment has changed */
if (env_changed_id != env_id) {
- if (env_get("ncip")) {
- nc_ip = env_get_ip("ncip");
+ char *tmp = env_get("ncip");
+ if (tmp) {
+ nc_ip = string_to_ip(tmp);
if (!nc_ip.s_addr)
return -1; /* ncip is 0.0.0.0 */
- p = strchr(env_get("ncip"), ':');
+ p = strchr(tmp, ':');
if (p != NULL) {
nc_out_port = dectoul(p + 1, NULL);
nc_in_port = nc_out_port;
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index da4f2ca42a5..b821fb17a1d 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <dm/device-internal.h>
+#include <env.h>
#include <image.h>
#include <log.h>
#include <malloc.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 716a1d46111..e6fed8c41d7 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -839,8 +839,6 @@ struct phy_device *phy_find_by_mask(struct mii_dev *bus, uint phy_mask)
static void phy_connect_dev(struct phy_device *phydev, struct udevice *dev,
phy_interface_t interface)
{
- /* Soft Reset the PHY */
- phy_reset(phydev);
if (phydev->dev && phydev->dev != dev) {
printf("%s:%d is connected to %s. Reconnecting to %s\n",
phydev->bus->name, phydev->addr,