mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
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 <ianchi74@outlook.com>
This commit is contained in:
parent
f97ad870e1
commit
184087f4f1
@ -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
|
Loading…
Reference in New Issue
Block a user