openwrt/target/linux/ramips
Mikhail Zhilkin ecd8f7e294
ramips: get MAC addr from the encrypted partition (WG4хх223)
This commit resolves #10062. Adds decryption of the Arcadyan WG4xx223
configuration partition (board_data)to get base MAC address from it.
As a result, after this change the hack with saving MAC addressees to
u-boot-env before installation of OpenWrt is no longer necessary.

This is necessary for the following devices:
- Beeline Smartbox Flash (Arcadyan WG443223)
- MTS WG430223 (Arcadyan WG430223)

Example:
+----------------+-------------------+------------------------+
|                |    MTS WG430223   | Beeline Smartbox Flash |
+----------------+-------------------+------------------------+
| base mac (mtd) | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06      |
| label          | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:09      |
| LAN            | A4:xx:xx:51:xx:F6 | 30:xx:xx:51:xx:09      |
| WAN            | A4:xx:xx:51:xx:F4 | 30:xx:xx:51:xx:06      |
| WLAN_2g        | A4:xx:xx:51:xx:F5 | 30:xx:xx:51:xx:07      |
| WLAN_5g        | A6:xx:xx:21:xx:F5 | 32:xx:xx:41:xx:07      |
+----------------+-------------------+------------------------+

Collected statistic shows that the 2-4th bits of the 7th byte of the
WLAN_5g MAC are the constant (see #10062 for more details):
- Beeline Smartbox Flash - 100
- MTS WG430223 - 010

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit a6b0d08060)
2022-08-19 14:44:44 +02:00
..
base-files/etc ramips: remove model name from LED labels 2020-10-02 14:51:57 +02:00
dts ramips: create new dtsi for Arcadyan routers 2022-08-16 15:59:52 +02:00
files/drivers ramips: aw9523: add can_sleep flag for GPIO chip 2021-12-29 03:43:03 +01:00
image ramips: get MAC addr from the encrypted partition (WG4хх223) 2022-08-19 14:44:44 +02:00
mt76x8 ramips: Add Xiaomi Mi Router 4A 100M International 2022-08-09 21:22:41 +02:00
mt7620 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
mt7621 ramips: get MAC addr from the encrypted partition (WG4хх223) 2022-08-19 14:44:44 +02:00
patches-5.10 kernel: bump 5.10 to 5.10.134 2022-07-30 17:22:16 +02:00
rt288x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
rt305x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
rt3883 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
Makefile ramips: switch to kernel 5.10 2021-12-13 19:36:52 +01:00
modules.mk ramips: rename mtk-hsdma to hsdma-mt7621 2021-03-04 23:43:02 -10:00