sfp: force higher rate SFP modules to 10G

sds: validate mode before touching anything

Signed-off-by: João Silva <jgc3silva@gmail.com>
This commit is contained in:
João Silva committed 2026-10-20 19:05:25 +01:00
1 parent 0faceab1d0
commit 620edafd62
2 files changed
+17 -13

No files matched your search

+2 -1
View File
@@ -59,8 +59,9 @@ static inline uint8_t sfp_rate_to_sds_config(uint8_t rate)
return SDS_1000BX_FIBER;
if (rate >= 0x19 && rate <= 0x20) // Ethernet 2.5 GBit
return SDS_HSG;
if (rate >= 0x62 && rate < 0x70)
if (rate >= 0x62 /* && rate < 0x70 */) // Force higher rates to 10G (e.g., 25G, 50G)
return SDS_10GR;
return 0xff;
}