From f9b4134ba6df19055c2f8f768cad8fb67b302802 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thibaut=20VAR=C3=88NE?= Date: Tue, 18 Aug 2020 18:08:17 +0200 Subject: [PATCH] hook new way --- .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 74aea555fd..601e236e12 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -130,7 +130,9 @@ case "$FIRMWARE" in ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2) ;; mikrotik,hap-ac2) - caldata_sysfsload_from_file "/sys/firmware/mikrotik/hard_config/wlan_data" 0x0 0x2f20 + wdata="/sys/firmware/mikrotik/hard_config/wlan_data" + ( [ -f "$wdata" ] && caldata_sysfsload_from_file "$wdata" 0x0 0x2f20 ) || \ + ( [ -d "$wdata" ] && caldata_sysfsload_from_file "$wdata/data_0" 0x0 0x2f20 ) ;; netgear,ex6100v2 |\ netgear,ex6150v2) @@ -228,7 +230,9 @@ case "$FIRMWARE" in ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3) ;; mikrotik,hap-ac2) - caldata_sysfsload_from_file "/sys/firmware/mikrotik/hard_config/wlan_data" 0x8000 0x2f20 + wdata="/sys/firmware/mikrotik/hard_config/wlan_data" + ( [ -f "$wdata" ] && caldata_sysfsload_from_file "$wdata" 0x8000 0x2f20 ) || \ + ( [ -d "$wdata" ] && caldata_sysfsload_from_file "$wdata/data_2" 0x0 0x2f20 ) ;; netgear,ex6100v2 |\ netgear,ex6150v2) -- 2.30.2