summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-01-16 15:55:22 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:10:05 -0800
commitdac10a9f286c75cffa75c7ec8b05d566a6ece95e (patch)
tree6b05b6427ec90091f8059de653708eec4a493639 /drivers/net/wireless/libertas/cmd.c
parent4365929d176b47a78d10aca0d1dee2afdfcbe4f2 (diff)
downloadblackbird-op-linux-dac10a9f286c75cffa75c7ec8b05d566a6ece95e.tar.gz
blackbird-op-linux-dac10a9f286c75cffa75c7ec8b05d566a6ece95e.zip
libertas: always show firmware release
Always shows the firmware release. Also converts the firmware release into something that is easily comparable. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 4d06dec6cd46..eab020338fde 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -60,13 +60,24 @@ int lbs_update_hw_spec(struct lbs_private *priv)
goto out;
priv->fwcapinfo = le32_to_cpu(cmd.fwcapinfo);
- memcpy(priv->fwreleasenumber, cmd.fwreleasenumber, 4);
- lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n",
- priv->fwreleasenumber[2], priv->fwreleasenumber[1],
- priv->fwreleasenumber[0], priv->fwreleasenumber[3]);
- lbs_deb_cmd("GET_HW_SPEC: MAC addr %s\n",
- print_mac(mac, cmd.permanentaddr));
+ /* The firmware release is in an interesting format: the patch
+ * level is in the most significant nibble ... so fix that: */
+ priv->fwrelease = le32_to_cpu(cmd.fwrelease);
+ priv->fwrelease = (priv->fwrelease << 8) |
+ (priv->fwrelease >> 24 & 0xff);
+
+ /* Some firmware capabilities:
+ * CF card firmware 5.0.16p0: cap 0x00000303
+ * USB dongle firmware 5.110.17p2: cap 0x00000303
+ */
+ printk("libertas: %s, fw %u.%u.%up%u, cap 0x%08x\n",
+ print_mac(mac, cmd.permanentaddr),
+ priv->fwrelease >> 24 & 0xff,
+ priv->fwrelease >> 16 & 0xff,
+ priv->fwrelease >> 8 & 0xff,
+ priv->fwrelease & 0xff,
+ priv->fwcapinfo);
lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n",
cmd.hwifversion, cmd.version);
OpenPOWER on IntegriCloud