b43: update hw/fw version info in wiphy struct
PATCH 1/1 b43: update hw/fw version info in wiphy struct
This makes the information available through ethtool...
--- drivers/net/wireless/b43/main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/main.c +5 -0
@@ -2280,6 +2280,7 @@ out:static int b43_upload_microcode (struct b43_wldev *dev) { +struct wiphy *wiphy = dev->wl->hw->wiphy;const size_t hdr_len =sizeof (struct b43_fw_header );const __be32 *data;unsigned int i, len;
@@ -2405,6 +2406,10 @@ static int b43_upload_microcode(struct b43_wldev *dev) } } +snprintf (wiphy->fw_version,sizeof (wiphy->fw_version),"%u.%u" , + dev->fw.rev, dev->fw.patch); + wiphy->hw_version = dev->dev->bus->chip_id; +if (b43_is_old_txhdr_format (dev)) {/* We're over the deadline, but we keep support for old fw * until it turns out to be in major conflict with something new. */
Signature · 1 line
1.7.1.1
drivers/net/wireless/b43/main.c static int b43_upload_microcode(struct b43_wldev *dev) · line 2411
Quoted 1 line · John W. Linville
drivers/net/wireless/b43/main.c +1
-0+ wiphy->hw_version = dev->dev->bus->chip_id;
Hm, well. Is hw_version of any use, actually? How does ethtool display it? I guess it does not use BCD (chip_id is BCD encoded).
What about using the wireless-core revision? It is slightly more usable than the chip_id.
Signature · 1 line
Greetings Michael.
PATCH v2 1/1 b43: update hw/fw version info in wiphy struct
This makes the information available through ethtool...
---
v2 -> use coreid for hw_version
drivers/net/wireless/b43/main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/main.c +5 -0
@@ -2280,6 +2280,7 @@ out:static int b43_upload_microcode (struct b43_wldev *dev) { +struct wiphy *wiphy = dev->wl->hw->wiphy;const size_t hdr_len =sizeof (struct b43_fw_header );const __be32 *data;unsigned int i, len;
@@ -2405,6 +2406,10 @@ static int b43_upload_microcode(struct b43_wldev *dev) } } +snprintf (wiphy->fw_version,sizeof (wiphy->fw_version),"%u.%u" , + dev->fw.rev, dev->fw.patch); + wiphy->hw_version = dev->dev->id.coreid; +if (b43_is_old_txhdr_format (dev)) {/* We're over the deadline, but we keep support for old fw * until it turns out to be in major conflict with something new. */
Signature · 1 line
1.7.1.1
Quoted 5 lines · Michael Büsch
drivers/net/wireless/b43/main.c static int b43_upload_microcode(struct b43_wldev *dev) · line 2411
Quoted 1 line · John W. Linville
drivers/net/wireless/b43/main.c +1
-0+ wiphy->hw_version = dev->dev->bus->chip_id;Hm, well. Is
hw_versionof any use, actually? How does ethtool display it? I guess it does not use BCD (chip_idis BCD encoded).
It is available through the ETHTOOL_GREGS ioctl. The userland ethtool app can be extended to interpret the value for a specific driver.
Quoted 2 lines
What about using the wireless-core revision? It is slightly more usable than the
chip_id.
Patch v2 posted...
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.