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|\
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)
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
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
;;
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)
;;
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
;;
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
;;
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
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)
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"
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
;;
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
;;
;;
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)
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"
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
;;
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)
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)
;;
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)
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)
;;
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)
;;
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
}
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)
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)
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
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)
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)
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"
;;
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)
;;
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
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
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