fbnic: Update FW link mode values to represent actual link modes

Make it so that the enum we use for the FW values represents actual link
modes that will be normally advertised by a link partner.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://patch.msgid.link/175028446893.625704.10103673858068429312.stgit@ahduyck-xeon-server.home.arpa
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Alexander Duyck 2025-06-18 15:07:48 -07:00 committed by Paolo Abeni
parent f663a1abf3
commit 0853d8521b
2 changed files with 8 additions and 8 deletions

View File

@ -155,10 +155,10 @@ enum {
};
enum {
FBNIC_FW_LINK_SPEED_25R1 = 1,
FBNIC_FW_LINK_SPEED_50R2 = 2,
FBNIC_FW_LINK_SPEED_50R1 = 3,
FBNIC_FW_LINK_SPEED_100R2 = 4,
FBNIC_FW_LINK_MODE_25CR = 1,
FBNIC_FW_LINK_MODE_50CR2 = 2,
FBNIC_FW_LINK_MODE_50CR = 3,
FBNIC_FW_LINK_MODE_100CR2 = 4,
};
enum {

View File

@ -544,17 +544,17 @@ static void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec)
{
/* Retrieve default speed from FW */
switch (fbd->fw_cap.link_speed) {
case FBNIC_FW_LINK_SPEED_25R1:
case FBNIC_FW_LINK_MODE_25CR:
*aui = FBNIC_AUI_25GAUI;
break;
case FBNIC_FW_LINK_SPEED_50R2:
case FBNIC_FW_LINK_MODE_50CR2:
*aui = FBNIC_AUI_LAUI2;
break;
case FBNIC_FW_LINK_SPEED_50R1:
case FBNIC_FW_LINK_MODE_50CR:
*aui = FBNIC_AUI_50GAUI1;
*fec = FBNIC_FEC_RS;
return;
case FBNIC_FW_LINK_SPEED_100R2:
case FBNIC_FW_LINK_MODE_100CR2:
*aui = FBNIC_AUI_100GAUI2;
*fec = FBNIC_FEC_RS;
return;