ath79: Consistently label info partition
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 5 Jun 2019 13:17:01 +0000 (15:17 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Mon, 10 Jun 2019 09:25:41 +0000 (11:25 +0200)
The info/product-info partition, which frequently contains MAC
adresses, is typically assigned the 'info' alias in DTS, but
then labelled with 'info', 'product-info' or 'config'.

This leads to different aliases if used for setting MAC adresses
in DTS compared to when using e.g. mtd_get_mac_binary. Occationally,
also multiple switch-case entries are used just because of different
labelling.

This patch relabels those partitions in ath79 to consistently use
'info'.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n-v5.dts
target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts

index b68cf5742b2fc8409ce5a869014bead4f2a18489..a2cd0ac3a6bba546caef9810df6a090b4c47fc52 100755 (executable)
@@ -330,17 +330,11 @@ ath79_setup_macs()
                lan_mac=$(macaddr_setbit_la "$wan_mac")
                ;;
        tplink,archer-a7-v5|\
-       tplink,archer-c7-v5)
-               base_mac=$(mtd_get_mac_binary info 8)
-               wan_mac=$(macaddr_add "$base_mac" 1)
-               ;;
-       tplink,archer-c7-v4)
-               base_mac=$(mtd_get_mac_binary config 8)
-               wan_mac=$(macaddr_add "$base_mac" 1)
-               ;;
+       tplink,archer-c7-v4|\
+       tplink,archer-c7-v5|\
        tplink,tl-wr1043nd-v4|\
        tplink,tl-wr1043n-v5)
-               base_mac=$(mtd_get_mac_binary product-info 8)
+               base_mac=$(mtd_get_mac_binary info 8)
                wan_mac=$(macaddr_add "$base_mac" 1)
                ;;
        tplink,tl-wr941-v2|\
index a1cf05b05c2447b59052df31c55a386344aeeda4..aad8428b4adac69516eaab5fe65ec7d17bf124e7 100644 (file)
@@ -92,7 +92,7 @@
                        };
 
                        info: partition@30000 {
-                               label = "product-info";
+                               label = "info";
                                reg = <0x030000 0x10000>;
                                read-only;
                        };
index ebc9177a39d552bf87066468f9f68ea3d1d5b576..17f07baffdf80ed9ecbc4e56ec5bdc9919491525 100644 (file)
                        };
 
                        info: partition@7e0000 {
-                               label = "product-info";
+                               label = "info";
                                reg = <0x7e0000 0x010000>;
                                read-only;
                        };
index b278c9304b9afc290a9457278f3dbab684028c22..24588d8216727e0508e0ec64a7a6c2b5c9cdfa51 100644 (file)
                        };
 
                        info: partition@f00000 {
-                               label = "config";
+                               label = "info";
                                reg = <0xf00000 0x0f0000>;
                                read-only;
                        };
index ad55a55e560897b85589a075b2b256a9c7080e7c..36e5ef81db7da8bc8b0733faf7d6e3887548b2be 100644 (file)
                        };
 
                        info: partition@610000 {
-                               label = "product-info";
+                               label = "info";
                                reg = <0x610000 0x020000>;
                                read-only;
                        };
index d983498b6ae1cf810f98d5d94f1ff9f739a3061f..9702da4a34535d57e76228a8d1dae971972d8eaf 100644 (file)
@@ -41,7 +41,7 @@
                        };
 
                        info: partition@f00000 {
-                               label = "product-info";
+                               label = "info";
                                reg = <0xf00000 0x020000>;
                                read-only;
                        };
index 07361ea2d230e8f37980c847f9740b3390c9d923..ffe5e0a603e60c691afd3ec3ddffaec840f5f7bf 100644 (file)
@@ -46,7 +46,7 @@
                        };
 
                        info: partition@f50000 {
-                               label = "product-info";
+                               label = "info";
                                reg = <0xf50000 0x020000>;
                                read-only;
                        };