diff options
Diffstat (limited to 'target/linux/ath79/base-files/etc')
-rw-r--r-- | target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration new file mode 100644 index 0000000000..b86db0dbcc --- /dev/null +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration @@ -0,0 +1,32 @@ +#!/bin/sh + +WMAC_PATH_CHANGED=0 + +. /lib/functions.sh + +migrate_wmac_path() { + local section="$1" + local path + + config_get path ${section} path + case ${path} in + "platform/qca955x_wmac") + path="platform/ahb/ahb:apb/18100000.wmac" + WMAC_PATH_CHANGED=1 + ;; + *) + return 0 + ;; + esac + + uci set wireless.${section}.path=${path} +} + +[ "${ACTION}" = "add" ] && { + [ ! -e /etc/config/wireless ] && return 0 + + config_load wireless + config_foreach migrate_wmac_path wifi-device + + [ "${WMAC_PATH_CHANGED}" = "1" ] && uci commit wireless +} |