Lines Matching +full:current +full:- +full:speed

2 # SPDX-License-Identifier: GPL-2.0
57 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 0))
59 for speed in "${speeds_arr[@]}"; do
61 ethtool_set $h1 speed $speed autoneg off
62 ethtool_set $h2 speed $speed autoneg off
67 check_err $? "speed $speed autoneg off"
68 log_test "force of same speed autoneg off"
69 log_info "speed = $speed"
72 ethtool -s $h2 autoneg on
73 ethtool -s $h1 autoneg on
82 local -a speeds_arr=($(different_speeds_get $h1 $h2 0 0))
86 ethtool_set $h1 speed $speed1 autoneg off
87 ethtool_set $h2 speed $speed2 autoneg off
96 ethtool -s $h2 autoneg on
97 ethtool -s $h1 autoneg on
102 # Test that when one device is forced to a speed supported by both
105 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 1))
107 for speed in "${speeds_arr[@]}"; do
109 ethtool_set $h1 speed $speed autoneg off
114 check_err $? "h1-speed=$speed autoneg off, h2 autoneg on"
116 log_info "force speed = $speed"
119 ethtool -s $h1 autoneg on
124 local speed=$1; shift
126 local shift_size=${speed_values[$speed]}
127 speed=$((0x1 << $"shift_size"))
128 printf "%#x" "$speed"
137 local -a speeds_arr=($(common_speeds_get $dev1 $dev2 0 $adver))
142 local -a speeds_mode_arr=($(common_speeds_get $dev1 $dev2 1 $adver))
144 for speed in ${speeds_mode_arr[@]}; do
145 if [[ $speed != $speed_to_remove* ]]; then
146 speed=$(hex_speed_value_get $speed)
148 $speed))
159 # The function returns the hex number that is composed by OR-ing all
160 # the modes corresponding to the provided speed.
167 for speed in ${supported_speeds[@]}; do
168 if [[ $speed == $speed_without_mode* ]]; then
169 speed=$(hex_speed_value_get $speed)
171 $speed))
183 # advertises a specific speed (but all modes of this speed), the links
195 local -a speeds_arr_without_mode=($(common_speeds_get $h1 $h2 0 1))
196 # Check only speeds that h1 advertised. Remove the first speed.
198 local -a speeds_arr_with_mode=($(common_speeds_get $h1 $h2 1 1))
215 ethtool -s $h2 autoneg on
216 ethtool -s $h1 autoneg on
222 # chooses the highest speed. This test checks configuration without
233 log_test "check highest speed"
237 local -a speeds_arr=($(common_speeds_get $h1 $h2 0 1))
240 for current in ${speeds_arr[@]}; do
241 if [[ $current -gt $max_speed ]]; then
242 max_speed=$current
248 chosen_speed=$(ethtool $h1 | grep 'Speed:')
250 chosen_speed=${chosen_speed#*"Speed: "}
252 check_err $? "h1 advertise $speed_to_advertise, h2 sync to speed $chosen_speed"
254 log_test "check highest speed"
256 ethtool -s $h2 autoneg on
257 ethtool -s $h1 autoneg on
266 local -a speeds=($(different_speeds_get $h1 $h2 1 1))
285 ethtool -s $h2 autoneg on
286 ethtool -s $h1 autoneg on
294 declare -gA speed_values