diff options
author | Weijie Gao <hackpascal@gmail.com> | 2018-06-13 21:14:49 +0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-18 18:21:16 +0200 |
commit | 97c5cbc496e9cf8139994cd3ea987f4e9c70adbe (patch) | |
tree | 8d04f701b5020cc5c10d17826aa522ad08279281 /target/linux/ath79/base-files/etc/hotplug.d/ieee80211 | |
parent | 8f804f42d52e49191429ad1d716e7adb3cd10ceb (diff) | |
download | upstream-97c5cbc496e9cf8139994cd3ea987f4e9c70adbe.tar.gz upstream-97c5cbc496e9cf8139994cd3ea987f4e9c70adbe.tar.bz2 upstream-97c5cbc496e9cf8139994cd3ea987f4e9c70adbe.zip |
ath79: add support for Phicomm K2T
This patch adds dts for qca956x and also support for Phicomm K2T
The qca965x.dtsi adds nearly all the necessary components.
Both ath9k AHB and PCIe worked well.
The Phicomm K2T uses MTD partition 'config' to store the mac addresses in
JSON format. To extract these fields correctly, a script is introduced:
/lib/functions/k2t.sh
This script provides a helper function to extract mac addresses, and is used
in three places.
Hardware spec of Phicomm K2T:
CPU: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337
WiFi 5.8GHz: QCA9886
Flash instruction:
Apply sysupgrade.bin via serial console:
tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Diffstat (limited to 'target/linux/ath79/base-files/etc/hotplug.d/ieee80211')
-rw-r--r-- | target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac new file mode 100644 index 0000000000..59c58f9c67 --- /dev/null +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -0,0 +1,24 @@ +#!/bin/ash + +[ "$ACTION" == "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh +. /lib/functions/k2t.sh + +board=$(board_name) + +case "$board" in + phicomm,k2t) + # The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address + [ "$PHYNBR" -eq 1 ] && \ + echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress + ;; + *) + ;; +esac + |