Commit a8c03bba authored by Adam Wujek's avatar Adam Wujek 💬

userspace/libwr: add TX Wavelength to sfp's eeprom dump

To be used by a tool wrs_sfp_dump
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 908b3d93
......@@ -280,7 +280,6 @@ void shw_sfp_print_header(struct shw_sfp_header *head)
printf("Identifier: %02X\n", head->id);
printf("Extended Identifier: %02X\n", head->ext_id);
printf("Connector: %02X\n", head->connector);
printf("Connector: %02X\n", head->connector);
printf("Tranciever: %016llX\n", ((uint64_t *) head->transciever)[0]);
printf("Encoding: %02x\n", head->encoding);
printf("Nominal Bit Rate: %d Megabits/s\n", head->br_nom * 100);
......@@ -303,6 +302,8 @@ void shw_sfp_print_header(struct shw_sfp_header *head)
for (i = 0; i < 4; i++)
printf("%c", head->vendor_rev[i]);
printf("\n");
printf("TX Wavelength: %d\n", (head->tx_wavelength[0] << 8)
+ head->tx_wavelength[1]);
printf("Options: %04X\n", ((uint16_t *) head->options)[0]);
printf("Bitrate (MAX): %02X\n", head->br_max);
printf("Bitrate (MIN): %02X\n", head->br_min);
......
......@@ -70,7 +70,8 @@ struct shw_sfp_header {
uint8_t vendor_oui[3];
uint8_t vendor_pn[16];
uint8_t vendor_rev[4];
uint8_t reserved4[3];
uint8_t tx_wavelength[2];
uint8_t reserved4;
uint8_t cc_base;
/* extended ID fields start here */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment