Make MAC related commands configurable
authorPiotr Dymacz <pepe2k@gmail.com>
Sun, 12 Feb 2017 11:00:01 +0000 (12:00 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 12 Feb 2017 11:00:01 +0000 (12:00 +0100)
u-boot/common/cmd_custom.c
u-boot/include/configs/qca9k_common.h

index a9e7efa7f9bdf814fa5be81192b44e72ec5d43eb..cfefe1a6f603b5806f4457c9eea3f952685a144c 100644 (file)
@@ -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)
 /*
index 49c09034402da563cb2294ca128a193d15df2ac3..7601454e6b111884f0df22aa76d31144642c95ab 100644 (file)
 #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