zd1211rw: update fw version info in wiphy struct
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jul 2010 17:58:48 +0000 (13:58 -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>
drivers/net/wireless/zd1211rw/zd_chip.c

index b2af3c549bb39e21010051f55a3eaa21df00a30a..87a95bcfee5735f593489cf52011068f4d92e0e1 100644 (file)
@@ -973,6 +973,7 @@ static void dump_fw_registers(struct zd_chip *chip)
 
 static int print_fw_version(struct zd_chip *chip)
 {
+       struct wiphy *wiphy = zd_chip_to_mac(chip)->hw->wiphy;
        int r;
        u16 version;
 
@@ -982,6 +983,10 @@ static int print_fw_version(struct zd_chip *chip)
                return r;
 
        dev_info(zd_chip_dev(chip),"firmware version %04hx\n", version);
+
+       snprintf(wiphy->fw_version, sizeof(wiphy->fw_version),
+                       "%04hx", version);
+
        return 0;
 }