aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/features_linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-02-08 08:47:37 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-02-12 18:09:14 +0100
commit98682e5e2aefc9aad61354f4f3ac93be96002a2a (patch)
tree04d0977ddcf677cc32fe7c8376e79765058406be /pkg/host/features_linux.go
parent394d4bf77bc71747a74968f49ef153a8c9ff0cd4 (diff)
sys/linux: add ieee802154 descriptions
Diffstat (limited to 'pkg/host/features_linux.go')
-rw-r--r--pkg/host/features_linux.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/host/features_linux.go b/pkg/host/features_linux.go
index fc925c00c..5c45bdcc1 100644
--- a/pkg/host/features_linux.go
+++ b/pkg/host/features_linux.go
@@ -33,6 +33,7 @@ func init() {
checkFeature[FeatureUSBEmulation] = checkUSBEmulation
checkFeature[FeatureVhciInjection] = checkVhciInjection
checkFeature[FeatureWifiEmulation] = checkWifiEmulation
+ checkFeature[Feature802154Emulation] = check802154Emulation
}
func checkCoverage() string {
@@ -233,6 +234,13 @@ func checkWifiEmulation() string {
return requireKernel(4, 17)
}
+func check802154Emulation() string {
+ if err := osutil.IsAccessible("/sys/bus/platform/devices/mac802154_hwsim"); err != nil {
+ return err.Error()
+ }
+ return ""
+}
+
func requireKernel(x, y int) string {
info := new(unix.Utsname)
if err := unix.Uname(info); err != nil {