treewide: convert MAC address location offsets to hexadecimal
[openwrt/staging/mkresin.git] / target / linux / gemini / base-files / lib / preinit / 05_set_ether_mac_gemini
index e387b3c72e4f72481c21c12b43f95c098d2791f8..3712975fa8be0a12e9f5917690a84f5005188d10 100644 (file)
@@ -17,7 +17,7 @@ set_ether_mac() {
                if [ -n "$part" ]; then
                        DEVID="$(dd if=$part bs=1 skip=119508 count=7 2>/dev/null)"
                        if [ "$DEVID" = "dns-313" ]; then
-                               MAC1="$(mtd_get_mac_binary RedBoot 119540)"
+                               MAC1="$(mtd_get_mac_binary RedBoot 0x1d2f4)"
                                ip link set eth0 address "$MAC1" 2>/dev/null
                                return 0
                        fi
@@ -30,8 +30,8 @@ set_ether_mac() {
                if [ -n "$part" ] ; then
                        DEVID="$(dd if=$part bs=1 skip=81516 count=7 2>/dev/null)"
                        if [ "$DEVID" = "ILI9322" ] ; then
-                               MAC1=$(mtd_get_mac_binary RedBoot 95040)
-                               MAC2=$(mtd_get_mac_binary RedBoot 95046)
+                               MAC1=$(mtd_get_mac_binary RedBoot 0x17340)
+                               MAC2=$(mtd_get_mac_binary RedBoot 0x17346)
                                ip link set eth0 address "$MAC1" 2>/dev/null
                                ip link set eth1 address "$MAC2" 2>/dev/null
                                return 0