summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig7
-rw-r--r--cmd/bootefi.c4
-rw-r--r--cmd/mdio.c7
3 files changed, 11 insertions, 7 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 18aac7f7d4..136836d146 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1012,9 +1012,10 @@ endmenu
menu "Network commands"
+if NET
+
config CMD_NET
bool "bootp, tftpboot"
- select NET
default y
help
Network commands.
@@ -1038,11 +1039,13 @@ config CMD_RARP
config CMD_DHCP
bool "dhcp"
+ depends on CMD_NET
help
Boot image via network using DHCP/TFTP protocol
config CMD_PXE
bool "pxe"
+ depends on CMD_NET
select MENU
help
Boot image via network using PXE protocol
@@ -1091,6 +1094,8 @@ config CMD_ETHSW
operations such as enabling / disabling a port and
viewing/maintaining the filtering database (FDB)
+endif
+
endmenu
menu "Misc commands"
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 2106ed9c8c..c17fa2ca23 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -42,7 +42,7 @@ static void efi_init_obj_list(void)
#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
efi_gop_register();
#endif
-#ifdef CONFIG_NET
+#ifdef CONFIG_CMD_NET
efi_net_register();
#endif
#ifdef CONFIG_GENERATE_SMBIOS_TABLE
@@ -450,7 +450,7 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
bootefi_device_path = efi_dp_from_part(desc, part);
} else {
-#ifdef CONFIG_NET
+#ifdef CONFIG_CMD_NET
bootefi_device_path = efi_dp_from_eth();
#endif
}
diff --git a/cmd/mdio.c b/cmd/mdio.c
index 21dc103736..3f11963006 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -14,7 +14,6 @@
#include <miiphy.h>
#include <phy.h>
-
static char last_op[2];
static uint last_data;
static uint last_addr_lo;
@@ -243,13 +242,13 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 'r':
if (pos > 1)
if (extract_reg_range(argv[pos--], &devadlo, &devadhi,
- &reglo, &reghi))
+ &reglo, &reghi))
return -1;
default:
if (pos > 1)
- if (extract_phy_range(&(argv[2]), pos - 1, &bus,
- &phydev, &addrlo, &addrhi))
+ if (extract_phy_range(&argv[2], pos - 1, &bus,
+ &phydev, &addrlo, &addrhi))
return -1;
break;