Skip to content

Commit

Permalink
fix build failure due to SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE
Browse files Browse the repository at this point in the history
Signed-off-by: Dante Su <dante.su@broadcom.com>
  • Loading branch information
ds952811 committed May 19, 2022
1 parent b0bee3e commit 09a9b33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,11 @@ void PortsOrch::initPortCapLinkTraining(Port &port)
sai_status_t status;
sai_attribute_t attr;

#ifdef SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE
attr.id = SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE;
#else
attr.id = SAI_PORT_ATTR_SUPPORTED_AUTO_NEG_MODE;
#endif
status = sai_port_api->set_port_attribute(port.m_port_id, &attr);
if (status == SAI_STATUS_SUCCESS)
{
Expand Down

0 comments on commit 09a9b33

Please sign in to comment.