mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
mapagent: invent branch for logan driver handling
Logan driver assumes that ra/rai interface names are used. It's the same for all platforms.
This commit is contained in:
parent
369fc0d4bb
commit
fbd8f64c40
1 changed files with 38 additions and 34 deletions
|
|
@ -10,6 +10,11 @@ network_mode="$(fw_printenv -n netmode)" # default is layer3
|
||||||
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
|
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
|
||||||
disable_mlo="$(fw_printenv -n disable_mlo)"
|
disable_mlo="$(fw_printenv -n disable_mlo)"
|
||||||
|
|
||||||
|
is_logan() {
|
||||||
|
[ -d /sys/module/mt_wifi ] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
is_airoha() {
|
is_airoha() {
|
||||||
[ -f /proc/device-tree/compatible ] || return
|
[ -f /proc/device-tree/compatible ] || return
|
||||||
strings /proc/device-tree/compatible | grep -qE '^(econet,|airoha,)'; return
|
strings /proc/device-tree/compatible | grep -qE '^(econet,|airoha,)'; return
|
||||||
|
|
@ -67,45 +72,44 @@ generate_multiap_config() {
|
||||||
device="$dev"
|
device="$dev"
|
||||||
|
|
||||||
ifprefix_radio=""
|
ifprefix_radio=""
|
||||||
if is_airoha; then
|
if is_logan; then
|
||||||
|
uci set mapagent.agent.mld_prefix="bss"
|
||||||
|
ifname_sta=""
|
||||||
|
case "$band" in
|
||||||
|
2g)
|
||||||
|
ifprefix="ra%"
|
||||||
|
ifname="ra0"
|
||||||
|
ifname_bh="ra1"
|
||||||
|
ifname_sta="apcli0"
|
||||||
|
;;
|
||||||
|
5g)
|
||||||
|
ifprefix="rai%"
|
||||||
|
ifname="rai0"
|
||||||
|
ifname_bh="rai1"
|
||||||
|
ifname_sta="apclii0"
|
||||||
|
;;
|
||||||
|
6g)
|
||||||
|
ifprefix="rax%"
|
||||||
|
ifname="rax0"
|
||||||
|
ifname_bh="rax1"
|
||||||
|
ifname_sta="apclix0"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
ifprefix_radio="${ifprefix}"
|
||||||
|
if [ "${network_mode}" == "extender" ]; then
|
||||||
|
ifname="${ifname_sta}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "$disable_mlo" == "1" ] || {
|
||||||
|
uci set wireless.$dev.mlo="1"
|
||||||
|
uci set wireless.$dev.mlo_capable="1"
|
||||||
|
}
|
||||||
|
elif is_airoha; then
|
||||||
if [ -d "/sys/module/mt76" ]; then
|
if [ -d "/sys/module/mt76" ]; then
|
||||||
ifprefix="wlan%_%"
|
ifprefix="wlan%_%"
|
||||||
ifname="wlan${devidx}_0"
|
ifname="wlan${devidx}_0"
|
||||||
ifname_bh="wlan${devidx}_1"
|
ifname_bh="wlan${devidx}_1"
|
||||||
else
|
|
||||||
uci set mapagent.agent.mld_prefix="bss"
|
|
||||||
ifname_sta=""
|
|
||||||
case "$band" in
|
|
||||||
2g)
|
|
||||||
ifprefix="ra%"
|
|
||||||
ifname="ra0"
|
|
||||||
ifname_bh="ra1"
|
|
||||||
ifname_sta="apcli0"
|
|
||||||
;;
|
|
||||||
5g)
|
|
||||||
ifprefix="rai%"
|
|
||||||
ifname="rai0"
|
|
||||||
ifname_bh="rai1"
|
|
||||||
ifname_sta="apclii0"
|
|
||||||
;;
|
|
||||||
6g)
|
|
||||||
ifprefix="rax%"
|
|
||||||
ifname="rax0"
|
|
||||||
ifname_bh="rax1"
|
|
||||||
ifname_sta="apclix0"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
ifprefix_radio="${ifprefix}"
|
|
||||||
if [ "${network_mode}" == "extender" ]; then
|
|
||||||
ifname="${ifname_sta}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ "$disable_mlo" == "1" ] || {
|
|
||||||
uci set wireless.$dev.mlo="1"
|
|
||||||
uci set wireless.$dev.mlo_capable="1"
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uci set wireless.$dev.channels="$channels"
|
uci set wireless.$dev.channels="$channels"
|
||||||
uci commit wireless
|
uci commit wireless
|
||||||
elif is_broadcom; then
|
elif is_broadcom; then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue