mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ethmngr: adapt set port speed to updated ethctl for broadcom
This commit is contained in:
parent
0c7040bab0
commit
17b4588e03
1 changed files with 2 additions and 7 deletions
|
|
@ -84,13 +84,8 @@ set_port_settings() {
|
|||
[ "$duplex" == 0 ] && dplx="HD" || dplx="FD"
|
||||
[ "$autoneg" == "on" ] && media_type="auto" || media_type="$speed$dplx"
|
||||
|
||||
phycrossbar="$(ethctl $ifname phy-crossbar | head -1)"
|
||||
crossbartype="$(echo $phycrossbar | awk '{print$2$3}')"
|
||||
# Take only the last PHY Endpoint (non-Serdes) into account as Serdes port number precedes
|
||||
[ "$crossbartype" == "oncrossbar" ] && pyhendpoint="$(echo $phycrossbar | awk '{print$NF}')"
|
||||
|
||||
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
|
||||
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
|
||||
phycaps="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Speed Capabilities' | awk '{print$NF}')"
|
||||
numofcaps="$(echo $phycaps | tr ':' ' ' | wc -w)"
|
||||
|
||||
# Reset the port before setting new params
|
||||
reset_port $ifname
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue