Skip to contentSkip to conversation

mt76: mt7603: report firmware version using ethtool

PATCH New Lorenzo Bianconi 1 participant 1 message Apr 27, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Lorenzo Bianconi

author maintainer
#1 lore raw

PATCH 1/1 mt76: mt7603: report firmware version using ethtool

Print fw_ver and build_date members of struct mt7603_fw_trailer similarly to what appears in the output of 'dmesg' when the MCU firmware is loaded.

---
 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c +3 -0
index 57481012ee47..19b66e9aae45 100644
@@ -260,6 +260,9 @@ int mt7603_load_firmware(struct mt7603_dev *dev)
 	mt76_clear(dev, MT_SCH_4, BIT(8));
 
 	dev->mcu_running = true;
+	snprintf(dev->mt76.hw->wiphy->fw_version,
+		 sizeof(dev->mt76.hw->wiphy->fw_version),
+		 "%.10s-%.15s", hdr->fw_ver, hdr->build_date);
 	dev_info(dev->mt76.dev, "firmware init done\n");
 
 out:
Signature · 1 line
2.20.1