3 # This must run before 10-wifi-detect
6 [ "${ACTION}" = "add" ] ||
return
14 local cfg
="$1" to
="$2"
16 config_get path
"$cfg" path
18 [ "$path" = "$to" ] && PATH_EXISTS
=true
23 local cfg
="$1" from
="$2" to
="$3"
25 config_get path
"$cfg" path
27 [ "$path" = "$from" ] ||
return
29 uci
set "wireless.${cfg}.path=${to}"
32 logger
-t wifi-migrate
"Updated path of wireless.${cfg} from '${from}' to '${to}'"
37 local from
="$1" to
="$2"
41 # Check if there is already a section with the target path: In this case, the system
42 # was already upgraded to a version without this migration script before; better bail out,
43 # as we can't be sure we don't break more than we fix.
45 config_foreach check_radio wifi-device
"$to"
46 $PATH_EXISTS && return
48 config_foreach do_migrate_radio wifi-device
"$from" "$to"
52 WIRELESS_CHANGED
=false
54 case "$(board_name)" in
55 arcadyan
,we420223-99|\
56 beeline
,smartbox-flash|\
58 migrate_radio
'1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
59 migrate_radio
'1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0+1'
64 migrate_radio
'1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
67 migrate_radio
'1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
68 migrate_radio
'1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
73 $WIRELESS_CHANGED && uci commit wireless