Commit fd1e959e91d2b0b2e853d09dd9167dfff18a616c
Committed by
Tom Rini
1 parent
018f530323
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()
Rename this function for consistency with env_set(). Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 58 changed files with 83 additions and 83 deletions Side-by-side Diff
- arch/arm/mach-davinci/misc.c
- arch/arm/mach-omap2/utils.c
- board/BuR/common/common.c
- board/CZ.NIC/turris_omnia/turris_omnia.c
- board/LaCie/net2big_v2/net2big_v2.c
- board/LaCie/netspace_v2/netspace_v2.c
- board/amlogic/odroid-c2/odroid-c2.c
- board/atmel/sama5d2_xplained/sama5d2_xplained.c
- board/birdland/bav335x/board.c
- board/bosch/shc/board.c
- board/compulab/cl-som-am57x/eth.c
- board/compulab/cm_fx6/cm_fx6.c
- board/compulab/cm_t335/cm_t335.c
- board/compulab/cm_t35/cm_t35.c
- board/compulab/cm_t3517/cm_t3517.c
- board/compulab/cm_t54/cm_t54.c
- board/davinci/da8xxevm/da850evm.c
- board/gateworks/gw_ventana/gw_ventana.c
- board/grinn/chiliboard/board.c
- board/gumstix/pepper/board.c
- board/isee/igep003x/board.c
- board/kosagi/novena/novena.c
- board/logicpd/zoom1/zoom1.c
- board/phytec/pcm051/board.c
- board/raspberrypi/rpi/rpi.c
- board/renesas/blanche/blanche.c
- board/rockchip/tinker_rk3288/tinker-rk3288.c
- board/samtec/vining_2000/vining_2000.c
- board/samtec/vining_fpga/socfpga.c
- board/siemens/common/factoryset.c
- board/siemens/pxm2/board.c
- board/silica/pengwyn/board.c
- board/spear/common/spr_misc.c
- board/sunxi/board.c
- board/tcl/sl50/board.c
- board/technologic/ts4800/ts4800.c
- board/theobroma-systems/puma_rk3399/puma-rk3399.c
- board/ti/am335x/board.c
- board/ti/am43xx/board.c
- board/ti/am57xx/board.c
- board/ti/common/board_detect.c
- board/ti/dra7xx/evm.c
- board/ti/evm/evm.c
- board/ti/ti814x/evm.c
- board/ti/ti816x/evm.c
- board/timll/devkit8000/devkit8000.c
- board/toradex/common/tdx-common.c
- board/vscom/baltos/board.c
- doc/README.enetaddr
- drivers/net/fec_mxc.c
- drivers/net/lan91c96.c
- drivers/net/ne2000_base.c
- drivers/usb/gadget/ether.c
- include/net.h
- net/eth-uclass.c
- net/eth_common.c
- net/eth_internal.h
- net/eth_legacy.c
arch/arm/mach-davinci/misc.c
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | debug("### Setting environment from EEPROM MAC address = " |
100 | 100 | "\"%pM\"\n", |
101 | 101 | env_enetaddr); |
102 | - ret = !eth_setenv_enetaddr("ethaddr", rom_enetaddr); | |
102 | + ret = !eth_env_set_enetaddr("ethaddr", rom_enetaddr); | |
103 | 103 | } |
104 | 104 | if (!ret) |
105 | 105 | printf("Failed to set mac address from EEPROM: %d\n", ret); |
arch/arm/mach-omap2/utils.c
board/BuR/common/common.c
board/CZ.NIC/turris_omnia/turris_omnia.c
... | ... | @@ -515,17 +515,17 @@ |
515 | 515 | mac[5] = mac1[3]; |
516 | 516 | |
517 | 517 | if (is_valid_ethaddr(mac)) |
518 | - eth_setenv_enetaddr("ethaddr", mac); | |
518 | + eth_env_set_enetaddr("ethaddr", mac); | |
519 | 519 | |
520 | 520 | increment_mac(mac); |
521 | 521 | |
522 | 522 | if (is_valid_ethaddr(mac)) |
523 | - eth_setenv_enetaddr("eth1addr", mac); | |
523 | + eth_env_set_enetaddr("eth1addr", mac); | |
524 | 524 | |
525 | 525 | increment_mac(mac); |
526 | 526 | |
527 | 527 | if (is_valid_ethaddr(mac)) |
528 | - eth_setenv_enetaddr("eth2addr", mac); | |
528 | + eth_env_set_enetaddr("eth2addr", mac); | |
529 | 529 | |
530 | 530 | out: |
531 | 531 | #endif |
board/LaCie/net2big_v2/net2big_v2.c
board/LaCie/netspace_v2/netspace_v2.c
board/amlogic/odroid-c2/odroid-c2.c
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | len = meson_sm_read_efuse(EFUSE_MAC_OFFSET, |
49 | 49 | mac_addr, EFUSE_MAC_SIZE); |
50 | 50 | if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) |
51 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
51 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
52 | 52 | } |
53 | 53 | |
54 | 54 | if (!getenv("serial#")) { |
board/atmel/sama5d2_xplained/sama5d2_xplained.c
board/birdland/bav335x/board.c
board/bosch/shc/board.c
... | ... | @@ -460,7 +460,7 @@ |
460 | 460 | #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
461 | 461 | if (shc_eeprom_valid) |
462 | 462 | if (is_valid_ethaddr(header.mac_addr)) |
463 | - eth_setenv_enetaddr("ethaddr", header.mac_addr); | |
463 | + eth_env_set_enetaddr("ethaddr", header.mac_addr); | |
464 | 464 | #endif |
465 | 465 | |
466 | 466 | return 0; |
... | ... | @@ -549,7 +549,7 @@ |
549 | 549 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
550 | 550 | |
551 | 551 | if (is_valid_ethaddr(mac_addr)) |
552 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
552 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
553 | 553 | } |
554 | 554 | |
555 | 555 | writel(MII_MODE_ENABLE, &cdev->miisel); |
... | ... | @@ -565,7 +565,7 @@ |
565 | 565 | #if defined(CONFIG_USB_ETHER) && \ |
566 | 566 | (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT)) |
567 | 567 | if (is_valid_ethaddr(mac_addr)) |
568 | - eth_setenv_enetaddr("usbnet_devaddr", mac_addr); | |
568 | + eth_env_set_enetaddr("usbnet_devaddr", mac_addr); | |
569 | 569 | |
570 | 570 | rv = usb_eth_initialize(bis); |
571 | 571 | if (rv < 0) |
board/compulab/cl-som-am57x/eth.c
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | if (!is_valid_ethaddr(enetaddr)) |
108 | 108 | return -1; |
109 | 109 | |
110 | - ret = eth_setenv_enetaddr(env_name, enetaddr); | |
110 | + ret = eth_env_set_enetaddr(env_name, enetaddr); | |
111 | 111 | if (ret) |
112 | 112 | printf("cl-som-am57x: Failed to set Eth port %d MAC address\n", |
113 | 113 | port_num); |
board/compulab/cm_fx6/cm_fx6.c
board/compulab/cm_t335/cm_t335.c
board/compulab/cm_t35/cm_t35.c
board/compulab/cm_t3517/cm_t3517.c
board/compulab/cm_t54/cm_t54.c
board/davinci/da8xxevm/da850evm.c
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | if (!enetaddr_found) { |
148 | 148 | if (!spi_mac_read) { |
149 | 149 | if (is_valid_ethaddr(buff)) { |
150 | - if (eth_setenv_enetaddr("ethaddr", buff)) { | |
150 | + if (eth_env_set_enetaddr("ethaddr", buff)) { | |
151 | 151 | printf("Warning: Failed to " |
152 | 152 | "set MAC address from SPI flash\n"); |
153 | 153 | } |
board/gateworks/gw_ventana/gw_ventana.c
... | ... | @@ -771,11 +771,11 @@ |
771 | 771 | /* initialize env from EEPROM */ |
772 | 772 | if (test_bit(EECONFIG_ETH0, info->config) && |
773 | 773 | !getenv("ethaddr")) { |
774 | - eth_setenv_enetaddr("ethaddr", info->mac0); | |
774 | + eth_env_set_enetaddr("ethaddr", info->mac0); | |
775 | 775 | } |
776 | 776 | if (test_bit(EECONFIG_ETH1, info->config) && |
777 | 777 | !getenv("eth1addr")) { |
778 | - eth_setenv_enetaddr("eth1addr", info->mac1); | |
778 | + eth_env_set_enetaddr("eth1addr", info->mac1); | |
779 | 779 | } |
780 | 780 | |
781 | 781 | /* board serial-number */ |
board/grinn/chiliboard/board.c
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
131 | 131 | |
132 | 132 | if (is_valid_ethaddr(mac_addr)) |
133 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
133 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
134 | 134 | } |
135 | 135 | |
136 | 136 | mac_lo = readl(&cdev->macid1l); |
... | ... | @@ -144,7 +144,7 @@ |
144 | 144 | |
145 | 145 | if (!getenv("eth1addr")) { |
146 | 146 | if (is_valid_ethaddr(mac_addr)) |
147 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
147 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
148 | 148 | } |
149 | 149 | #endif |
150 | 150 |
board/gumstix/pepper/board.c
... | ... | @@ -250,7 +250,7 @@ |
250 | 250 | mac_addr[4] = mac_lo & 0xFF; |
251 | 251 | mac_addr[5] = (mac_lo & 0xFF00) >> 8; |
252 | 252 | if (is_valid_ethaddr(mac_addr)) |
253 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
253 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
254 | 254 | } |
255 | 255 | |
256 | 256 | writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel); |
board/isee/igep003x/board.c
... | ... | @@ -275,7 +275,7 @@ |
275 | 275 | mac_addr[4] = mac_lo & 0xFF; |
276 | 276 | mac_addr[5] = (mac_lo & 0xFF00) >> 8; |
277 | 277 | if (is_valid_ethaddr(mac_addr)) |
278 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
278 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
279 | 279 | } |
280 | 280 | |
281 | 281 | writel((GMII1_SEL_RMII | RMII1_IO_CLK_EN), |
board/kosagi/novena/novena.c
board/logicpd/zoom1/zoom1.c
... | ... | @@ -133,7 +133,7 @@ |
133 | 133 | if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { |
134 | 134 | dev = eth_get_dev_by_index(0); |
135 | 135 | if (dev) { |
136 | - eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
136 | + eth_env_set_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
137 | 137 | } else { |
138 | 138 | printf("zoom1: Couldn't get eth device\n"); |
139 | 139 | rc = -1; |
board/phytec/pcm051/board.c
board/raspberrypi/rpi/rpi.c
... | ... | @@ -300,7 +300,7 @@ |
300 | 300 | return; |
301 | 301 | } |
302 | 302 | |
303 | - eth_setenv_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac); | |
303 | + eth_env_set_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac); | |
304 | 304 | |
305 | 305 | if (!getenv("ethaddr")) |
306 | 306 | env_set("ethaddr", getenv("usbethaddr")); |
board/renesas/blanche/blanche.c
... | ... | @@ -421,7 +421,7 @@ |
421 | 421 | if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { |
422 | 422 | dev = eth_get_dev_by_index(0); |
423 | 423 | if (dev) { |
424 | - eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
424 | + eth_env_set_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
425 | 425 | } else { |
426 | 426 | printf("blanche: Couldn't get eth device\n"); |
427 | 427 | rc = -1; |
board/rockchip/tinker_rk3288/tinker-rk3288.c
board/samtec/vining_2000/vining_2000.c
... | ... | @@ -132,7 +132,7 @@ |
132 | 132 | /* just to get secound mac address */ |
133 | 133 | imx_get_mac_from_fuse(1, eth1addr); |
134 | 134 | if (!getenv("eth1addr") && is_valid_ethaddr(eth1addr)) |
135 | - eth_setenv_enetaddr("eth1addr", eth1addr); | |
135 | + eth_env_set_enetaddr("eth1addr", eth1addr); | |
136 | 136 | |
137 | 137 | imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads)); |
138 | 138 |
board/samtec/vining_fpga/socfpga.c
board/siemens/common/factoryset.c
board/siemens/pxm2/board.c
... | ... | @@ -225,7 +225,7 @@ |
225 | 225 | if (!is_valid_ethaddr(factory_dat.mac)) |
226 | 226 | printf("Error: no valid mac address\n"); |
227 | 227 | else |
228 | - eth_setenv_enetaddr("ethaddr", factory_dat.mac); | |
228 | + eth_env_set_enetaddr("ethaddr", factory_dat.mac); | |
229 | 229 | #endif /* #ifdef CONFIG_FACTORYSET */ |
230 | 230 | |
231 | 231 | /* Set rgmii mode and enable rmii clock to be sourced from chip */ |
board/silica/pengwyn/board.c
board/spear/common/spr_misc.c
board/sunxi/board.c
board/tcl/sl50/board.c
... | ... | @@ -326,7 +326,7 @@ |
326 | 326 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
327 | 327 | |
328 | 328 | if (is_valid_ethaddr(mac_addr)) |
329 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
329 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
330 | 330 | } |
331 | 331 | |
332 | 332 | #ifdef CONFIG_DRIVER_TI_CPSW |
... | ... | @@ -342,7 +342,7 @@ |
342 | 342 | |
343 | 343 | if (!getenv("eth1addr")) { |
344 | 344 | if (is_valid_ethaddr(mac_addr)) |
345 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
345 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
346 | 346 | } |
347 | 347 | |
348 | 348 | |
... | ... | @@ -373,7 +373,7 @@ |
373 | 373 | #if defined(CONFIG_USB_ETHER) && \ |
374 | 374 | (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT)) |
375 | 375 | if (is_valid_ether_addr(mac_addr)) |
376 | - eth_setenv_enetaddr("usbnet_devaddr", mac_addr); | |
376 | + eth_env_set_enetaddr("usbnet_devaddr", mac_addr); | |
377 | 377 | |
378 | 378 | rv = usb_eth_initialize(bis); |
379 | 379 | if (rv < 0) |
board/technologic/ts4800/ts4800.c
board/theobroma-systems/puma_rk3399/puma-rk3399.c
... | ... | @@ -89,7 +89,7 @@ |
89 | 89 | /* Make this a valid MAC address and set it */ |
90 | 90 | mac_addr[0] &= 0xfe; /* clear multicast bit */ |
91 | 91 | mac_addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ |
92 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
92 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
93 | 93 | #endif |
94 | 94 | |
95 | 95 | return; |
board/ti/am335x/board.c
... | ... | @@ -749,7 +749,7 @@ |
749 | 749 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
750 | 750 | |
751 | 751 | if (is_valid_ethaddr(mac_addr)) |
752 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
752 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
753 | 753 | } |
754 | 754 | |
755 | 755 | mac_lo = readl(&cdev->macid1l); |
... | ... | @@ -763,7 +763,7 @@ |
763 | 763 | |
764 | 764 | if (!getenv("eth1addr")) { |
765 | 765 | if (is_valid_ethaddr(mac_addr)) |
766 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
766 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
767 | 767 | } |
768 | 768 | #endif |
769 | 769 | |
... | ... | @@ -908,7 +908,7 @@ |
908 | 908 | #if defined(CONFIG_USB_ETHER) && \ |
909 | 909 | (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT)) |
910 | 910 | if (is_valid_ethaddr(mac_addr)) |
911 | - eth_setenv_enetaddr("usbnet_devaddr", mac_addr); | |
911 | + eth_env_set_enetaddr("usbnet_devaddr", mac_addr); | |
912 | 912 | |
913 | 913 | rv = usb_eth_initialize(bis); |
914 | 914 | if (rv < 0) |
board/ti/am43xx/board.c
... | ... | @@ -794,7 +794,7 @@ |
794 | 794 | if (!getenv("ethaddr")) { |
795 | 795 | puts("<ethaddr> not set. Validating first E-fuse MAC\n"); |
796 | 796 | if (is_valid_ethaddr(mac_addr)) |
797 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
797 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
798 | 798 | } |
799 | 799 | |
800 | 800 | mac_lo = readl(&cdev->macid1l); |
... | ... | @@ -808,7 +808,7 @@ |
808 | 808 | |
809 | 809 | if (!getenv("eth1addr")) { |
810 | 810 | if (is_valid_ethaddr(mac_addr)) |
811 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
811 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
812 | 812 | } |
813 | 813 | |
814 | 814 | if (board_is_eposevm()) { |
board/ti/am57xx/board.c
... | ... | @@ -937,7 +937,7 @@ |
937 | 937 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
938 | 938 | |
939 | 939 | if (is_valid_ethaddr(mac_addr)) |
940 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
940 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
941 | 941 | } |
942 | 942 | |
943 | 943 | mac_lo = readl((*ctrl)->control_core_mac_id_1_lo); |
... | ... | @@ -951,7 +951,7 @@ |
951 | 951 | |
952 | 952 | if (!getenv("eth1addr")) { |
953 | 953 | if (is_valid_ethaddr(mac_addr)) |
954 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
954 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
955 | 955 | } |
956 | 956 | |
957 | 957 | ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33); |
... | ... | @@ -986,9 +986,9 @@ |
986 | 986 | for (i = 0; i < num_macs; i++) { |
987 | 987 | u64_to_mac(mac1 + i, mac_addr); |
988 | 988 | if (is_valid_ethaddr(mac_addr)) { |
989 | - eth_setenv_enetaddr_by_index("eth", | |
990 | - i + 2, | |
991 | - mac_addr); | |
989 | + eth_env_set_enetaddr_by_index("eth", | |
990 | + i + 2, | |
991 | + mac_addr); | |
992 | 992 | } |
993 | 993 | } |
994 | 994 | } |
board/ti/common/board_detect.c
... | ... | @@ -451,8 +451,8 @@ |
451 | 451 | for (i = 0; i < num_macs; i++) { |
452 | 452 | u64_to_mac(mac1 + i, mac_addr); |
453 | 453 | if (is_valid_ethaddr(mac_addr)) { |
454 | - eth_setenv_enetaddr_by_index("eth", i + index, | |
455 | - mac_addr); | |
454 | + eth_env_set_enetaddr_by_index("eth", i + index, | |
455 | + mac_addr); | |
456 | 456 | } |
457 | 457 | } |
458 | 458 | } |
board/ti/dra7xx/evm.c
... | ... | @@ -897,7 +897,7 @@ |
897 | 897 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |
898 | 898 | |
899 | 899 | if (is_valid_ethaddr(mac_addr)) |
900 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
900 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
901 | 901 | } |
902 | 902 | |
903 | 903 | mac_lo = readl((*ctrl)->control_core_mac_id_1_lo); |
... | ... | @@ -911,7 +911,7 @@ |
911 | 911 | |
912 | 912 | if (!getenv("eth1addr")) { |
913 | 913 | if (is_valid_ethaddr(mac_addr)) |
914 | - eth_setenv_enetaddr("eth1addr", mac_addr); | |
914 | + eth_env_set_enetaddr("eth1addr", mac_addr); | |
915 | 915 | } |
916 | 916 | |
917 | 917 | ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33); |
board/ti/evm/evm.c
... | ... | @@ -300,7 +300,7 @@ |
300 | 300 | if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { |
301 | 301 | dev = eth_get_dev_by_index(0); |
302 | 302 | if (dev) { |
303 | - eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
303 | + eth_env_set_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); | |
304 | 304 | } else { |
305 | 305 | printf("omap3evm: Couldn't get eth device\n"); |
306 | 306 | rc = -1; |
board/ti/ti814x/evm.c
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 | mac_addr[5] = (mac_lo & 0xFF00) >> 8; |
180 | 180 | |
181 | 181 | if (is_valid_ethaddr(mac_addr)) |
182 | - eth_setenv_enetaddr("ethaddr", mac_addr); | |
182 | + eth_env_set_enetaddr("ethaddr", mac_addr); | |
183 | 183 | else |
184 | 184 | printf("Unable to read MAC address. Set <ethaddr>\n"); |
185 | 185 | } |
board/ti/ti816x/evm.c
board/timll/devkit8000/devkit8000.c
... | ... | @@ -111,7 +111,7 @@ |
111 | 111 | enetaddr[3] = (die_id_0 & 0x00ff0000) >> 16; |
112 | 112 | enetaddr[4] = (die_id_0 & 0x0000ff00) >> 8; |
113 | 113 | enetaddr[5] = (die_id_0 & 0x000000ff); |
114 | - eth_setenv_enetaddr("ethaddr", enetaddr); | |
114 | + eth_env_set_enetaddr("ethaddr", enetaddr); | |
115 | 115 | } |
116 | 116 | #endif |
117 | 117 |
board/toradex/common/tdx-common.c
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | * set the one from config block if not |
88 | 88 | */ |
89 | 89 | if (!eth_getenv_enetaddr("ethaddr", ethaddr)) |
90 | - eth_setenv_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); | |
90 | + eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr); | |
91 | 91 | |
92 | 92 | #ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR |
93 | 93 | if (!eth_getenv_enetaddr("eth1addr", ethaddr)) { |
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | */ |
98 | 98 | memcpy(ethaddr, &tdx_eth_addr, 6); |
99 | 99 | ethaddr[3] += 0x10; |
100 | - eth_setenv_enetaddr("eth1addr", ethaddr); | |
100 | + eth_env_set_enetaddr("eth1addr", ethaddr); | |
101 | 101 | } |
102 | 102 | #endif |
103 | 103 |
board/vscom/baltos/board.c
doc/README.enetaddr
... | ... | @@ -98,12 +98,12 @@ |
98 | 98 | } |
99 | 99 | /* enetaddr is now set to the value stored in the ethaddr env var */ |
100 | 100 | |
101 | - * int eth_setenv_enetaddr(char *name, const uchar *enetaddr); | |
101 | + * int eth_env_set_enetaddr(char *name, const uchar *enetaddr); | |
102 | 102 | |
103 | 103 | Store the MAC address into the named environment variable. The return value is |
104 | 104 | the same as the env_set() function. |
105 | 105 | uchar enetaddr[6] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; |
106 | -eth_setenv_enetaddr("ethaddr", enetaddr); | |
106 | +eth_env_set_enetaddr("ethaddr", enetaddr); | |
107 | 107 | /* the "ethaddr" env var should now be set to "00:11:22:33:44:55" */ |
108 | 108 | |
109 | 109 | * the %pM format modifier |
drivers/net/fec_mxc.c
drivers/net/lan91c96.c
drivers/net/ne2000_base.c
... | ... | @@ -723,7 +723,7 @@ |
723 | 723 | * returns -1 due to eth_getenv_enetaddr_by_index() failing, |
724 | 724 | * and this causes "Warning: failed to set MAC address", and |
725 | 725 | * cmd_bdinfo has no ethaddr value which it can show: */ |
726 | - eth_setenv_enetaddr("ethaddr", dev->enetaddr); | |
726 | + eth_env_set_enetaddr("ethaddr", dev->enetaddr); | |
727 | 727 | } |
728 | 728 | return 0; |
729 | 729 | } |
drivers/usb/gadget/ether.c
include/net.h
... | ... | @@ -240,10 +240,10 @@ |
240 | 240 | int eth_get_dev_index(void); /* get the device index */ |
241 | 241 | void eth_parse_enetaddr(const char *addr, uchar *enetaddr); |
242 | 242 | int eth_getenv_enetaddr(const char *name, uchar *enetaddr); |
243 | -int eth_setenv_enetaddr(const char *name, const uchar *enetaddr); | |
243 | +int eth_env_set_enetaddr(const char *name, const uchar *enetaddr); | |
244 | 244 | |
245 | 245 | /** |
246 | - * eth_setenv_enetaddr_by_index() - set the MAC address environment variable | |
246 | + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable | |
247 | 247 | * |
248 | 248 | * This sets up an environment variable with the given MAC address (@enetaddr). |
249 | 249 | * The environment variable to be set is defined by <@base_name><@index>addr. |
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | * @enetaddr: Pointer to MAC address to put into the variable |
256 | 256 | * @return 0 if OK, other value on error |
257 | 257 | */ |
258 | -int eth_setenv_enetaddr_by_index(const char *base_name, int index, | |
258 | +int eth_env_set_enetaddr_by_index(const char *base_name, int index, | |
259 | 259 | uchar *enetaddr); |
260 | 260 | |
261 | 261 |
net/eth-uclass.c
... | ... | @@ -510,7 +510,7 @@ |
510 | 510 | /* Override the ROM MAC address */ |
511 | 511 | memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN); |
512 | 512 | } else if (is_valid_ethaddr(pdata->enetaddr)) { |
513 | - eth_setenv_enetaddr_by_index("eth", dev->seq, pdata->enetaddr); | |
513 | + eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr); | |
514 | 514 | printf("\nWarning: %s using MAC address from ROM\n", |
515 | 515 | dev->name); |
516 | 516 | } else if (is_zero_ethaddr(pdata->enetaddr) || |
net/eth_common.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | return is_valid_ethaddr(enetaddr); |
31 | 31 | } |
32 | 32 | |
33 | -int eth_setenv_enetaddr(const char *name, const uchar *enetaddr) | |
33 | +int eth_env_set_enetaddr(const char *name, const uchar *enetaddr) | |
34 | 34 | { |
35 | 35 | char buf[ARP_HLEN_ASCII + 1]; |
36 | 36 | |
37 | 37 | |
... | ... | @@ -50,12 +50,12 @@ |
50 | 50 | return eth_getenv_enetaddr(enetvar, enetaddr); |
51 | 51 | } |
52 | 52 | |
53 | -int eth_setenv_enetaddr_by_index(const char *base_name, int index, | |
53 | +int eth_env_set_enetaddr_by_index(const char *base_name, int index, | |
54 | 54 | uchar *enetaddr) |
55 | 55 | { |
56 | 56 | char enetvar[32]; |
57 | 57 | sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index); |
58 | - return eth_setenv_enetaddr(enetvar, enetaddr); | |
58 | + return eth_env_set_enetaddr(enetvar, enetaddr); | |
59 | 59 | } |
60 | 60 | |
61 | 61 | void eth_common_init(void) |
net/eth_internal.h
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | void eth_common_init(void); |
14 | 14 | |
15 | 15 | /** |
16 | - * eth_setenv_enetaddr_by_index() - set the MAC address environment variable | |
16 | + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable | |
17 | 17 | * |
18 | 18 | * This sets up an environment variable with the given MAC address (@enetaddr). |
19 | 19 | * The environment variable to be set is defined by <@base_name><@index>addr. |
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | * @enetaddr: Pointer to MAC address to put into the variable |
26 | 26 | * @return 0 if OK, other value on error |
27 | 27 | */ |
28 | -int eth_setenv_enetaddr_by_index(const char *base_name, int index, | |
28 | +int eth_env_set_enetaddr_by_index(const char *base_name, int index, | |
29 | 29 | uchar *enetaddr); |
30 | 30 | |
31 | 31 | int eth_mac_skip(int index); |
net/eth_legacy.c
... | ... | @@ -152,8 +152,8 @@ |
152 | 152 | |
153 | 153 | memcpy(dev->enetaddr, env_enetaddr, ARP_HLEN); |
154 | 154 | } else if (is_valid_ethaddr(dev->enetaddr)) { |
155 | - eth_setenv_enetaddr_by_index(base_name, eth_number, | |
156 | - dev->enetaddr); | |
155 | + eth_env_set_enetaddr_by_index(base_name, eth_number, | |
156 | + dev->enetaddr); | |
157 | 157 | } else if (is_zero_ethaddr(dev->enetaddr)) { |
158 | 158 | #ifdef CONFIG_NET_RANDOM_ETHADDR |
159 | 159 | net_random_ethaddr(dev->enetaddr); |