treewide: remove "+" sign for increment with macaddr_add
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 5 Jun 2021 21:54:37 +0000 (23:54 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 5 Jun 2021 21:54:37 +0000 (23:54 +0200)
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 <freifunk@adrianschmutzler.de>
12 files changed:
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless
target/linux/rockchip/armv8/base-files/etc/board.d/02_network

index 08d9e017a734e29c9b3be4c865e32f109847b4f5..62f2f1e8b49df6013cf48b6bd080bd6d4ea3d268 100644 (file)
@@ -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|\
index a7986a98ecb6f4287dec4f9ea47811d51fb8a46b..b7cb2da8cd97dd4d95fb7470067b28b66c495c0d 100644 (file)
@@ -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)
index 7ef6fdbe0fdb46f3e3f956ad8b39bf35a94fd536..d9425d44379167860a32751a14e0ff55a5739c2e 100644 (file)
@@ -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"
index d5fd3db24d6d14ca8f496a5d2502dbbaf9cfec6d..f8cc8f1a2b720ef29102a5d2c5c61becd49f66e2 100644 (file)
@@ -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
        ;;
index 42cb295496a65387976e90234edbf0ba82e017b8..87876ad844aa6d98eafcdaa47cd3b631069261d4 100644 (file)
@@ -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)
index 0d606c75b5be85d39d7ef7e1c5fd795683fb8611..51ba7071e7674ac16a6756f1155aaac4070bf714 100644 (file)
@@ -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
 }
 
index 5592590d523166db9c0a96c6010f97b2523b254c..d2bdf034b731bfd91b434f576674733b05c07ffe 100644 (file)
@@ -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)
index 4202187d4f75ca3ec83984ace7d8f676fd7b1a58..c555aa2c12c9f9a0050a630c23de56c5f09f54c8 100644 (file)
@@ -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"
index 03664b3fd37b6b75c73eaa30f423f6565c0d0e2b..09d26f7f8539d31fd2f1d433d9df9d5634a2cd5f 100644 (file)
@@ -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)
index 9aea4eed64707d24c73e463fb551bec22178c876..98bb9af6947a298775ff7fa26ac6501c57df8378 100644 (file)
@@ -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
index 2039aeaf1bcc4858e24249cb34d40f39b4d1b87a..f9526e3d8659dd4f1e7577cb2c4b297cef426354 100644 (file)
@@ -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
index f5e88cc14820bd7f2bb825b54ad6b124a5d5360a..8371913f8a296ce2fbade85da3c1456f9c8b0de4 100644 (file)
@@ -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