aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-09-30 19:32:50 +0200
committerFelix Fietkau <nbd@nbd.name>2022-10-14 13:13:49 +0200
commit34054e4c0635c5820cdab69f3d3979075b4e8795 (patch)
tree12aaf6c5441a39a8685f33e9a0eb47a69edd3301 /target/linux/mediatek
parenta7ca1b2314cee3cd1d9ee28c7852b6d73258e229 (diff)
downloadupstream-34054e4c0635c5820cdab69f3d3979075b4e8795.tar.gz
upstream-34054e4c0635c5820cdab69f3d3979075b4e8795.tar.bz2
upstream-34054e4c0635c5820cdab69f3d3979075b4e8795.zip
mediatek: fill wlan device entries in board.json on mt7622
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/mediatek')
-rw-r--r--target/linux/mediatek/mt7622/base-files/etc/board.d/02_network12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
index e76792164d..7781fcd435 100644
--- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
@@ -34,6 +34,17 @@ mediatek_setup_interfaces()
esac
}
+DEV_PATH_WMAC=platform/18000000.wmac
+DEV_PATH_PCIE0=1a143000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0
+DEV_PATH_PCIE1=1a145000.pcie/pci0001:00/0001:00:01.0/0001:01:00.0
+
+mediatek_setup_wlan()
+{
+ dt_is_enabled wmac@18000000 && ucidef_add_wlan $DEV_PATH_WMAC
+ dt_is_enabled pcie@1a143000 && ucidef_add_wlan $DEV_PATH_PCIE0
+ dt_is_enabled pcie@1a145000 && ucidef_add_wlan $DEV_PATH_PCIE1
+}
+
mediatek_setup_macs()
{
local board="$1"
@@ -60,6 +71,7 @@ board_config_update
board=$(board_name)
mediatek_setup_interfaces $board
mediatek_setup_macs $board
+mediatek_setup_wlan $board
board_config_flush
exit 0