2019-03-13 16:44:22 +00:00
|
|
|
#!/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
|
|
|
|
;;
|
2018-12-16 01:22:45 +00:00
|
|
|
"platform/ar933x_wmac")
|
|
|
|
path="platform/ahb/18100000.wmac"
|
|
|
|
WMAC_PATH_CHANGED=1
|
|
|
|
;;
|
2019-03-13 16:44:22 +00:00
|
|
|
*)
|
|
|
|
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
|
|
|
|
}
|