Skip to content

Commit 1aca8b2

Browse files
ahduyckNipaLocal
authored andcommitted
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 <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 2b24887 commit 1aca8b2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/net/ethernet/meta/fbnic/fbnic_fw.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ enum {
155155
};
156156

157157
enum {
158-
FBNIC_FW_LINK_SPEED_25R1 = 1,
159-
FBNIC_FW_LINK_SPEED_50R2 = 2,
160-
FBNIC_FW_LINK_SPEED_50R1 = 3,
161-
FBNIC_FW_LINK_SPEED_100R2 = 4,
158+
FBNIC_FW_LINK_MODE_25CR = 1,
159+
FBNIC_FW_LINK_MODE_50CR2 = 2,
160+
FBNIC_FW_LINK_MODE_50CR = 3,
161+
FBNIC_FW_LINK_MODE_100CR2 = 4,
162162
};
163163

164164
enum {

drivers/net/ethernet/meta/fbnic/fbnic_mac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,17 +544,17 @@ static void fbnic_mac_get_fw_settings(struct fbnic_dev *fbd, u8 *aui, u8 *fec)
544544
{
545545
/* Retrieve default speed from FW */
546546
switch (fbd->fw_cap.link_speed) {
547-
case FBNIC_FW_LINK_SPEED_25R1:
547+
case FBNIC_FW_LINK_MODE_25CR:
548548
*aui = FBNIC_AUI_25GAUI;
549549
break;
550-
case FBNIC_FW_LINK_SPEED_50R2:
550+
case FBNIC_FW_LINK_MODE_50CR2:
551551
*aui = FBNIC_AUI_LAUI2;
552552
break;
553-
case FBNIC_FW_LINK_SPEED_50R1:
553+
case FBNIC_FW_LINK_MODE_50CR:
554554
*aui = FBNIC_AUI_50GAUI1;
555555
*fec = FBNIC_FEC_RS;
556556
return;
557-
case FBNIC_FW_LINK_SPEED_100R2:
557+
case FBNIC_FW_LINK_MODE_100CR2:
558558
*aui = FBNIC_AUI_100GAUI2;
559559
*fec = FBNIC_FEC_RS;
560560
return;

0 commit comments

Comments
 (0)