rt2x00: update fw version info in wiphy struct
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jul 2010 17:50:39 +0000 (13:50 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Aug 2010 18:39:45 +0000 (14:39 -0400)
This makes the information available through ethtool...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
drivers/net/wireless/rt2x00/rt2x00firmware.c

index b818a43c4672733792295f2dec5163137e860ce4..f0e1eb72befc0abff02c5f7e2f33d8d610c70cdd 100644 (file)
@@ -63,6 +63,9 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev)
 
        INFO(rt2x00dev, "Firmware detected - version: %d.%d.\n",
             fw->data[fw->size - 4], fw->data[fw->size - 3]);
+       snprintf(rt2x00dev->hw->wiphy->fw_version,
+                       sizeof(rt2x00dev->hw->wiphy->fw_version), "%d.%d",
+                       fw->data[fw->size - 4], fw->data[fw->size - 3]);
 
        retval = rt2x00dev->ops->lib->check_firmware(rt2x00dev, fw->data, fw->size);
        switch (retval) {