Do not show non-ascii Transceiver field in SFP module description

This commit is contained in:
logicog
2025-12-07 10:59:39 +01:00
parent fccafe8059
commit 32b5539670
3 changed files with 13 additions and 8 deletions
+3
View File
@@ -906,7 +906,10 @@ static inline uint8_t sfp_rate_to_sds_config(register uint8_t rate)
void sfp_print_info(uint8_t sfp)
{
// This loops over the Vendor-name, Vendor OUI, Vendor PN and Vendor rev ASCII fields
for (uint8_t i = 20; i < 60; i++) {
if (i >= 36 && i < 40) // Skip Non-ASCII codes
continue;
uint8_t c = sfp_read_reg(sfp, i);
if (c)
write_char(c);