From: Adrian Schmutzler Date: Sat, 5 Jun 2021 21:54:37 +0000 (+0200) Subject: treewide: remove "+" sign for increment with macaddr_add X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6f648ed7e639060902df1d652fedd176f4aa9f98;p=openwrt%2Fstaging%2Fjow.git treewide: remove "+" sign for increment with macaddr_add Many people appear to use an unneeded "+" prefix for the increment when calculating a MAC address with macaddr_add. Since this is not required and used inconsistently [*], just remove it. [*] As a funny side-fact, copy-pasting has led to almost all hotplug.d files using the "+", while nearly all of the 02_network files are not using it. Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 08d9e017a7..62f2f1e8b4 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -40,7 +40,7 @@ case "$FIRMWARE" in engenius,ecb1200|\ engenius,ecb1750) caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) +1) + ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1) ;; engenius,epg5000|\ iodata,wn-ac1167dgr|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index a7986a98ec..b7cb2da8cd 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -15,7 +15,7 @@ case "$FIRMWARE" in engenius,enstationac-v1|\ glinet,gl-x750) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2) ;; avm,fritz1750e|\ avm,fritzdvbc) @@ -79,15 +79,15 @@ case "$FIRMWARE" in sitecom,wlr-7100|\ zyxel,nbg6616) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1) ;; engenius,ews511ap) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 1) ;; glinet,gl-ar750) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1) ;; nec,wg800hp) caldata_extract "art" 0x5000 0x844 @@ -103,11 +103,11 @@ case "$FIRMWARE" in openmesh,mr1750-v1|\ openmesh,mr1750-v2) caldata_extract "ART" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 16) ;; openmesh,om5p-ac-v2) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) + ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 16) ;; qihoo,c301) caldata_extract "radiocfg" 0x5000 0x844 @@ -130,22 +130,22 @@ case "$FIRMWARE" in ;; tplink,archer-d50-v1) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfile 0xf100) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfile 0xf100) 2) ;; tplink,archer-d7-v1|\ tplink,archer-d7b-v1) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) 2) ;; tplink,eap245-v1|\ tplink,re450-v2|\ tplink,re450-v3) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1) ;; tplink,re350k-v1) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 2) ;; tplink,re355-v1|\ tplink,re450-v1) @@ -154,7 +154,7 @@ case "$FIRMWARE" in ;; tplink,tl-wpa8630-v1) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) 1) ;; esac ;; @@ -162,7 +162,7 @@ case "$FIRMWARE" in case $board in sitecom,wlr-8100) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1) ;; esac ;; @@ -180,7 +180,7 @@ case "$FIRMWARE" in comfast,cf-ew72|\ comfast,cf-wr752ac-v1) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin @@ -237,13 +237,13 @@ case "$FIRMWARE" in tplink,tl-wpa8630p-v2.0-eu|\ tplink,tl-wpa8630p-v2.1-eu) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; tplink,eap245-v3) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1) ;; yuncore,a782|\ yuncore,xd4200) diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 7ef6fdbe0f..d9425d4437 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -26,10 +26,10 @@ case "$FIRMWARE" in mikrotik,routerboard-lhg-2nd|\ mikrotik,routerboard-sxt-5nd-r2|\ mikrotik,routerboard-wapr-2nd) - caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +1) + caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 1) ;; mikrotik,routerboard-wap-g-5hact2hnd) - caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +2) + caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 2) ;; *) caldata_die "board $board is not supported yet" diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index d5fd3db24d..f8cc8f1a2b 100644 --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -16,11 +16,11 @@ case "$FIRMWARE" in glinet,gl-ar750s-nor|\ glinet,gl-ar750s-nor-nand) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1) ;; zyxel,nbg6716) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1) ;; esac ;; diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 42cb295496..87876ad844 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -12,7 +12,7 @@ case "$FIRMWARE" in meraki,mr33) caldata_extract_ubi "ART" 0x9000 0x844 caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844 - ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +1) + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 1) ;; esac ;; @@ -128,7 +128,7 @@ case "$FIRMWARE" in ;; engenius,ens620ext) caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) ;; linksys,ea8300 |\ linksys,mr8300) @@ -138,7 +138,7 @@ case "$FIRMWARE" in meraki,mr33) caldata_extract_ubi "ART" 0x1000 0x2f20 caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2) + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 2) ;; mikrotik,hap-ac2) wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data" @@ -180,7 +180,7 @@ case "$FIRMWARE" in aruba,ap-303h |\ aruba,ap-365) caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) 1) ;; asus,map-ac2200) caldata_extract_ubi "Factory" 0x5000 0x2f20 @@ -233,15 +233,15 @@ case "$FIRMWARE" in ;; engenius,emd1) caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) 1) ;; engenius,emr3500) caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) 1) ;; engenius,ens620ext) caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 3) ;; linksys,ea8300 |\ linksys,mr8300) @@ -251,7 +251,7 @@ case "$FIRMWARE" in meraki,mr33) caldata_extract_ubi "ART" 0x5000 0x2f20 caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3) + ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 3) ;; mikrotik,hap-ac2|\ mikrotik,sxtsq-5-ac) @@ -266,7 +266,7 @@ case "$FIRMWARE" in ;; netgear,wac510) caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) +16) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) 16) ;; zyxel,nbg6617 |\ zyxel,wre6606) diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 0d606c75b5..51ba7071e7 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -4,8 +4,8 @@ preinit_set_mac_address() { case $(board_name) in asus,map-ac2200) base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) - ip link set dev eth0 address $(macaddr_add "$base_mac" +1) - ip link set dev eth1 address $(macaddr_add "$base_mac" +3) + ip link set dev eth0 address $(macaddr_add "$base_mac" 1) + ip link set dev eth1 address $(macaddr_add "$base_mac" 3) ;; ezviz,cs-w3-wd1200g-eup) ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6) @@ -13,13 +13,13 @@ preinit_set_mac_address() { ;; engenius,eap2200) base_mac=$(cat /sys/class/net/eth0/address) - ip link set dev eth1 address $(macaddr_add "${base_mac}" +1) + ip link set dev eth1 address $(macaddr_add "$base_mac" 1) ;; linksys,ea8300|\ linksys,mr8300) base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ip link set dev eth0 address "${base_mac}" - ip link set dev eth1 address $(macaddr_add "${base_mac}" 1) + ip link set dev eth0 address "$base_mac" + ip link set dev eth1 address $(macaddr_add "$base_mac" 1) ;; meraki,mr33) mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) @@ -27,8 +27,8 @@ preinit_set_mac_address() { ;; zyxel,nbg6617) base_mac=$(cat /sys/class/net/eth0/address) - ip link set dev eth0 address $(macaddr_add "$base_mac" +2) - ip link set dev eth1 address $(macaddr_add "$base_mac" +3) + ip link set dev eth0 address $(macaddr_add "$base_mac" 2) + ip link set dev eth1 address $(macaddr_add "$base_mac" 3) esac } diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 5592590d52..d2bdf034b7 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -33,7 +33,7 @@ case "$FIRMWARE" in linksys,ea7500-v1 |\ linksys,ea8500) caldata_extract "art" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1) ;; nec,wg2600hp |\ nec,wg2600hp3) @@ -44,7 +44,7 @@ case "$FIRMWARE" in netgear,r7500v2 |\ netgear,r7800) caldata_extract "art" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) 1) ;; tplink,ad7200 |\ tplink,c2600) @@ -58,11 +58,11 @@ case "$FIRMWARE" in zyxel,nbg6817) if [ -b "$(find_mtd_part 0:art)" ]; then caldata_extract "0:art" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1) else # XXX: drop upper case after kernel v5.4 is gone (qcom-smem) caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) 1) fi ;; esac @@ -85,7 +85,7 @@ case "$FIRMWARE" in linksys,ea7500-v1 |\ linksys,ea8500) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 2) ;; nec,wg2600hp |\ nec,wg2600hp3) @@ -96,7 +96,7 @@ case "$FIRMWARE" in netgear,r7500v2 |\ netgear,r7800) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) 2) ;; tplink,ad7200 |\ tplink,c2600) diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 4202187d4f..c555aa2c12 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -10,7 +10,7 @@ case "$FIRMWARE" in case $board in bt,homehub-v5a) caldata_extract_ubi "caldata" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 3) ;; *) caldata_die "board $board is not supported yet" diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 03664b3fd3..09d26f7f85 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -29,7 +29,7 @@ case "$FIRMWARE" in ;; bt,homehub-v5a) caldata_extract_ubi "caldata" 0x1000 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +2) 0x10c + ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 2) 0x10c ;; tplink,tdw8970|\ tplink,tdw8980) diff --git a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 9aea4eed64..98bb9af694 100644 --- a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -39,11 +39,11 @@ case "$FIRMWARE" in ;; bt,homehub-v3a) caldata_extract_swap "art-copy" 0x0 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) 0x10c + ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 0x10c ;; netgear,dgn3500|netgear,dgn3500b) caldata_extract "calibration" 0xf000 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) 0x20c + ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 0x20c ;; avm,fritz7312|avm,fritz7320) caldata_extract "urlader" 0x985 0x1000 diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless index 2039aeaf1b..f9526e3d86 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless @@ -17,8 +17,8 @@ linksys,wrt1900acs|\ linksys,wrt3200acm|\ linksys,wrt32x) SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p') - WIFIMAC2G=$(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) - WIFIMAC5G=$(macaddr_add $WIFIMAC2G +1) + WIFIMAC2G=$(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1) + WIFIMAC5G=$(macaddr_add $WIFIMAC2G 1) case "$SKU" in AP) REGD=CN diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network index f5e88cc148..8371913f8a 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -33,7 +33,7 @@ rockchip_setup_macs() case "$board" in friendlyarm,nanopi-r2s) wan_mac=$(nanopi_r2s_generate_mac) - lan_mac=$(macaddr_add "$wan_mac" +1) + lan_mac=$(macaddr_add "$wan_mac" 1) ;; esac