diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-09-30 19:19:51 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-10-14 13:12:30 +0200 |
commit | 7f9d3a00d8d41f2bf9fe35b30cd689b9992e7ff9 (patch) | |
tree | a153526bccec92e298689fa9c5bae5f4606ce4bd /package/base-files/files/lib/functions/system.sh | |
parent | 0a4a0c71937b3251fb9cfc0ccb16b3c41092050b (diff) |
base-files: add helper functions for adding wlan device entries to board.json
These will be used to give WLAN PHYs a specific name based on path specified
in board.json. The platform board.d script can assign a specific order based
on available slots (PCIe slots, WMAC device) and device tree configuration.
This helps with maintaining config compatibility in case the device path
changes due to kernel upgrades.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/base-files/files/lib/functions/system.sh')
-rw-r--r-- | package/base-files/files/lib/functions/system.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 22eb00c515..29de2e5dd6 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -283,3 +283,7 @@ macaddr_canonicalize() { printf "%02x:%02x:%02x:%02x:%02x:%02x" 0x${canon// / 0x} 2>/dev/null } + +dt_is_enabled() { + grep -q okay "/proc/device-tree/$1/status" +} |