aboutsummaryrefslogtreecommitdiff
path: root/shell-completion/bash/ethtool
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-15 09:21:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-15 09:21:25 +0000
commit5460df5c7c35d1ff278150d830c7b9875663cf9d (patch)
treeef508d3284c713a6eb7ffc2e833f537cb8537b7b /shell-completion/bash/ethtool
parentc84d8b937dd22fcb3b7ede1f1c1b971edd05e0de (diff)
parent2cab479e280b8349d3a193a980c68400acb18733 (diff)
downloadethtool-2985eda801a4ea7d56f78a513571c817df9d3688.tar.gz
Snap for 11224086 from 2cab479e280b8349d3a193a980c68400acb18733 to mainline-tzdata5-releaseaml_tz5_341510070aml_tz5_341510050aml_tz5_341510010aml_tz5_341510010
Change-Id: I6a357e8402ecccb37f5f7f53757fe0ed16d74333
Diffstat (limited to 'shell-completion/bash/ethtool')
-rw-r--r--shell-completion/bash/ethtool30
1 files changed, 30 insertions, 0 deletions
diff --git a/shell-completion/bash/ethtool b/shell-completion/bash/ethtool
index 5305559..99c5f6f 100644
--- a/shell-completion/bash/ethtool
+++ b/shell-completion/bash/ethtool
@@ -97,6 +97,7 @@ _ethtool_change()
[speed]=notseen
[wol]=notseen
[xcvr]=notseen
+ [lanes]=notseen
)
local -A msgtypes=(
@@ -175,6 +176,9 @@ _ethtool_change()
xcvr)
COMPREPLY=( $( compgen -W 'internal external' -- "$cur" ) )
return ;;
+ lanes)
+ # Number
+ return ;;
esac
local -a comp_words=()
@@ -250,6 +254,9 @@ _ethtool_coalesce()
[tx-usecs-high]=1
[tx-usecs-irq]=1
[tx-usecs-low]=1
+ [tx-aggr-max-bytes]=1
+ [tx-aggr-max-frames]=1
+ [tx-aggr-time-usecs]=1
)
case "$prev" in
@@ -1133,6 +1140,27 @@ _ethtool_test()
fi
}
+# Completion for ethtool --set-module
+_ethtool_set_module()
+{
+ local -A settings=(
+ [power-mode-policy]=1
+ )
+
+ case "$prev" in
+ power-mode-policy)
+ COMPREPLY=( $( compgen -W 'high auto' -- "$cur" ) )
+ return ;;
+ esac
+
+ # Remove settings which have been seen
+ local word
+ for word in "${words[@]:3:${#words[@]}-4}"; do
+ unset "settings[$word]"
+ done
+
+ COMPREPLY=( $( compgen -W "${!settings[*]}" -- "$cur" ) )
+}
# Complete any ethtool command
_ethtool()
@@ -1185,6 +1213,8 @@ _ethtool()
[--show-time-stamping]=devname
[--statistics]=devname
[--test]=test
+ [--set-module]=set_module
+ [--show-module]=devname
)
local -A other_funcs=(
[--config-ntuple]=config_nfc