From 8a479719fdda5be30a58304eea8066c95f42f428 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 12 Feb 2017 12:00:01 +0100 Subject: [PATCH] Make MAC related commands configurable --- u-boot/common/cmd_custom.c | 5 +++-- u-boot/include/configs/qca9k_common.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/u-boot/common/cmd_custom.c b/u-boot/common/cmd_custom.c index a9e7efa..cfefe1a 100644 --- a/u-boot/common/cmd_custom.c +++ b/u-boot/common/cmd_custom.c @@ -18,7 +18,8 @@ extern void qca_sys_clocks(u32 *cpu_clk, u32 *ddr_clk, u32 *ahb_clk, u32 *spi_clk, u32 *ref_clk); -#if defined(OFFSET_MAC_ADDRESS) +#if defined(CONFIG_CMD_MAC) &&\ + defined(OFFSET_MAC_ADDRESS) /* * Show MAC address(es) */ @@ -115,7 +116,7 @@ int do_set_mac(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]){ U_BOOT_CMD(setmac, 2, 0, do_set_mac, "save new MAC address in FLASH\n", "xx:xx:xx:xx:xx:xx\n\t- change MAC address stored in FLASH (xx - value in hex format)\n"); -#endif /* if defined(OFFSET_MAC_ADDRESS) */ +#endif /* if defined(CONFIG_CMD_MAC) && defined(OFFSET_MAC_ADDRESS) */ #if defined(OFFSET_ROUTER_MODEL) /* diff --git a/u-boot/include/configs/qca9k_common.h b/u-boot/include/configs/qca9k_common.h index 49c0903..7601454 100644 --- a/u-boot/include/configs/qca9k_common.h +++ b/u-boot/include/configs/qca9k_common.h @@ -114,6 +114,7 @@ #define CONFIG_CMD_ITEST #define CONFIG_CMD_LED #define CONFIG_CMD_LOADB +#define CONFIG_CMD_MAC #define CONFIG_CMD_MEMORY #define CONFIG_CMD_NET #define CONFIG_CMD_PING -- 2.25.1