firmware/src/packages/fff/fff-network/files/lib/functions/fff/cpuport
Fabian Bläse 55d03264d0 fff-network: use DSA network configuration for devices with DSA drivers
Some devices had to be disabled starting with OpenWrt 21.02 due to their
new DSA switch drivers.

As support for DSA configuration has since been added to fff-network,
this makes use of this configuration for devices with DSA drivers.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
2021-08-05 17:49:44 +02:00

46 lines
836 B
Plaintext

# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright 2019 Adrian Schmutzler
get_cpu_port() {
local BOARD=$(uci get board.model.name)
local CPUPORT
case "$BOARD" in
tplink,archer-c50-v3|\
tplink,archer-c50-v4|\
tplink,tl-wr1043nd-v2|\
tplink,tl-wr1043nd-v3|\
tplink,tl-wr841n-v13)
CPUPORT="6t"
;;
netgear,r6220|\
tplink,cpe210-v2|\
tplink,cpe210-v3|\
tplink,tl-mr3020-v1|\
tplink,tl-wa850re-v1|\
tplink,tl-wa860re-v1|\
tplink,tl-wa901nd-v2|\
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,edgerouter-x|\
ubnt,edgerouter-x-sfp|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-loco-m-xw|\
ubnt,nanostation-m|\
ubnt,picostation-m|\
ubnt,unifi|\
ubnt,unifiac-mesh)
CPUPORT=""
;;
tplink,tl-wr1043nd-v1)
CPUPORT="5t"
;;
*)
CPUPORT="0t"
;;
esac
echo "$CPUPORT"
}