diff options
-rw-r--r-- | target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration (renamed from target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration) | 26 |
1 files changed, 20 insertions, 6 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-wifi-migration index b051daf98c..b1824303e6 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wmac-migration +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration @@ -1,22 +1,36 @@ #!/bin/sh -WMAC_PATH_CHANGED=0 +WIFI_PATH_CHANGED=0 . /lib/functions.sh -migrate_wmac_path() { +migrate_wifi_path() { local section="$1" local path config_get path ${section} path case ${path} in + "pci0000:01/0000:01:00.0") + board=$(board_name) + + case "$board" in + tplink,archer-c7-v1|\ + tplink,archer-c7-v2) + path="pci0000:00/0000:00:00.0" + WIFI_PATH_CHANGED=1 + ;; + *) + return 0 + ;; + esac + ;; "platform/qca955x_wmac") path="platform/ahb/ahb:apb/18100000.wmac" - WMAC_PATH_CHANGED=1 + WIFI_PATH_CHANGED=1 ;; "platform/ar933x_wmac") path="platform/ahb/18100000.wmac" - WMAC_PATH_CHANGED=1 + WIFI_PATH_CHANGED=1 ;; *) return 0 @@ -30,7 +44,7 @@ migrate_wmac_path() { [ ! -e /etc/config/wireless ] && return 0 config_load wireless - config_foreach migrate_wmac_path wifi-device + config_foreach migrate_wifi_path wifi-device - [ "${WMAC_PATH_CHANGED}" = "1" ] && uci commit wireless + [ "${WIFI_PATH_CHANGED}" = "1" ] && uci commit wireless } |