[OpenWrt-Devel] [PATCH] ath79: add support for ZyXEL NWA1123-NI
openwrt.dev at krtzbrtz.org
Mon Oct 28 16:17:50 EDT 2019
>> ### Regarding the cal-data of the pcie-wifi (AR9382):
>> It seems to me it has some kind of EEPROM, from OEM-BootLog:
>> wmac-wifi: "Using Cal data from Flash 0xbfff0000"
> Note that you are currently using art 0x1000, so 0xff1000 inside flash?!
ART-Partition starts at 0xff0000 in flash. Cal-data starts at 0xff1000
if i got it right.
OEM-Firmware uses OpenWrt but proprietary Atheros-Drivers, to be honest
i don't know what they really do, but i guess they use a offset of
0x1000 from start of art for cal-data?
# OEM-Firmware, art (MAC-Addr changed):
/ # hexdump /dev/mtd7
0000000 0030 ab11 20e1 ffff ffff ffff ffff ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
0001000 0202 0011 2233 4455 0030 3a62 323a 6463
>> How shall we proceed with this? Keep the current solution (with the risk
>> that some users maybe end up with wrong MAC-addresses)? Or extend
>> mtd_get_mac_ascii with an option for white-space as a field separator
>> (or create a new function) and set the MAC address in
>> /etc/board.d/02_network + /etc/hotplug.d/firmware/10-ath9k-eeprom?
> Thanks for the extensive answer.
> I'm not 100 % convinced about it, but to me using the strings seems to be the most proper solution in this context.
> I'm a little surprised about your strings output. As I understand it, the separator is determined by the strings function, and not by the data read (I'm not an expert.)?
> Maybe they use some special space characters in the data which can be converted by tr "X" "\n" or some other simple solution?
From man-page ("normal" strings, not the BusyBox):
"strings prints the printable character sequences that are at least 4
characters long (or the number given with the options below) and are
followed by an unprintable character."
In the case of for example u-boot-env the separation between the various
"key=value" is 0x00, which is "Null" and not a printable character.
In the case of the mib0-partition it uses normal white space (0x20) as
separator (=printable), that's why mtd_get_mac_ascii does not give the
But it works with replacing the space with newline:
tr ' ' '\n'
What if we set the MAC-Addresses manually in the u-boot-env and take
them from there? (uboot-env needs to be changed anyway for setting the
new address for bootm; so at the moment it is just an other step for the
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel