From 184087f4f16357c539df106e3f5971e7daabbdc9 Mon Sep 17 00:00:00 2001 From: Adrian Panella Date: Tue, 21 Jun 2016 11:12:26 -0500 Subject: ipq806x: enable ieee80211 phy hotplug and patch macaddress Calibration data for QCA99x0 in this device has bogus macaddress. The data cannot be modified directly, as it breaks checksum control. Instead change the macaddress from phy add hotplug event. Signed-off-by: Adrian Panella --- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac (limited to 'target') diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac new file mode 100644 index 0000000000..1ae4352686 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -0,0 +1,23 @@ +#!/bin/ash + +[ "$ACTION" == "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/ipq806x.sh +. /lib/functions/system.sh + +board=$(ipq806x_board_name) + +case "$board" in + c2600) + echo $(macaddr_add $(mtd_get_mac_binary default-mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress + ;; + ea8500) + echo $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) $(($PHYNBR + 1)) ) > /sys${DEVPATH}/macaddress + ;; + *) + ;; +esac -- cgit v1.2.3