diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2008-01-16 09:55:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:05 -0500 |
commit | dac10a9f286c75cffa75c7ec8b05d566a6ece95e (patch) | |
tree | 6b05b6427ec90091f8059de653708eec4a493639 /drivers/net/wireless | |
parent | 4365929d176b47a78d10aca0d1dee2afdfcbe4f2 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/hostcmd.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 16 |
4 files changed, 25 insertions, 20 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) | |||
60 | goto out; | 60 | goto out; |
61 | 61 | ||
62 | priv->fwcapinfo = le32_to_cpu(cmd.fwcapinfo); | 62 | priv->fwcapinfo = le32_to_cpu(cmd.fwcapinfo); |
63 | memcpy(priv->fwreleasenumber, cmd.fwreleasenumber, 4); | ||
64 | 63 | ||
65 | lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n", | 64 | /* The firmware release is in an interesting format: the patch |
66 | priv->fwreleasenumber[2], priv->fwreleasenumber[1], | 65 | * level is in the most significant nibble ... so fix that: */ |
67 | priv->fwreleasenumber[0], priv->fwreleasenumber[3]); | 66 | priv->fwrelease = le32_to_cpu(cmd.fwrelease); |
68 | lbs_deb_cmd("GET_HW_SPEC: MAC addr %s\n", | 67 | priv->fwrelease = (priv->fwrelease << 8) | |
69 | print_mac(mac, cmd.permanentaddr)); | 68 | (priv->fwrelease >> 24 & 0xff); |
69 | |||
70 | /* Some firmware capabilities: | ||
71 | * CF card firmware 5.0.16p0: cap 0x00000303 | ||
72 | * USB dongle firmware 5.110.17p2: cap 0x00000303 | ||
73 | */ | ||
74 | printk("libertas: %s, fw %u.%u.%up%u, cap 0x%08x\n", | ||
75 | print_mac(mac, cmd.permanentaddr), | ||
76 | priv->fwrelease >> 24 & 0xff, | ||
77 | priv->fwrelease >> 16 & 0xff, | ||
78 | priv->fwrelease >> 8 & 0xff, | ||
79 | priv->fwrelease & 0xff, | ||
80 | priv->fwcapinfo); | ||
70 | lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n", | 81 | lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n", |
71 | cmd.hwifversion, cmd.version); | 82 | cmd.hwifversion, cmd.version); |
72 | 83 | ||
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index c1c9733c5f9e..58d7ef6b5ff5 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -161,7 +161,7 @@ struct lbs_private { | |||
161 | 161 | ||
162 | /** Wlan adapter data structure*/ | 162 | /** Wlan adapter data structure*/ |
163 | /** STATUS variables */ | 163 | /** STATUS variables */ |
164 | u8 fwreleasenumber[4]; | 164 | u32 fwrelease; |
165 | u32 fwcapinfo; | 165 | u32 fwcapinfo; |
166 | /* protected with big lock */ | 166 | /* protected with big lock */ |
167 | 167 | ||
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h index be325eda6a4b..d35b015b6657 100644 --- a/drivers/net/wireless/libertas/hostcmd.h +++ b/drivers/net/wireless/libertas/hostcmd.h | |||
@@ -136,8 +136,8 @@ struct cmd_ds_get_hw_spec { | |||
136 | /* Number of antenna used */ | 136 | /* Number of antenna used */ |
137 | __le16 nr_antenna; | 137 | __le16 nr_antenna; |
138 | 138 | ||
139 | /* FW release number, example 1,2,3,4 = 3.2.1p4 */ | 139 | /* FW release number, example 0x01030304 = 2.3.4p1 */ |
140 | u8 fwreleasenumber[4]; | 140 | __le32 fwrelease; |
141 | 141 | ||
142 | /* Base Address of TxPD queue */ | 142 | /* Base Address of TxPD queue */ |
143 | __le32 wcb_base; | 143 | __le32 wcb_base; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 3e8d555ba3a9..e8bfc26b10a4 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -2071,17 +2071,11 @@ void lbs_get_fwversion(struct lbs_private *priv, char *fwversion, int maxlen) | |||
2071 | 2071 | ||
2072 | mutex_lock(&priv->lock); | 2072 | mutex_lock(&priv->lock); |
2073 | 2073 | ||
2074 | if (priv->fwreleasenumber[3] == 0) | 2074 | sprintf(fwver, "%u.%u.%u.p%u", |
2075 | sprintf(fwver, "%u.%u.%u", | 2075 | priv->fwrelease >> 24 & 0xff, |
2076 | priv->fwreleasenumber[2], | 2076 | priv->fwrelease >> 16 & 0xff, |
2077 | priv->fwreleasenumber[1], | 2077 | priv->fwrelease >> 8 & 0xff, |
2078 | priv->fwreleasenumber[0]); | 2078 | priv->fwrelease & 0xff); |
2079 | else | ||
2080 | sprintf(fwver, "%u.%u.%u.p%u", | ||
2081 | priv->fwreleasenumber[2], | ||
2082 | priv->fwreleasenumber[1], | ||
2083 | priv->fwreleasenumber[0], | ||
2084 | priv->fwreleasenumber[3]); | ||
2085 | 2079 | ||
2086 | mutex_unlock(&priv->lock); | 2080 | mutex_unlock(&priv->lock); |
2087 | snprintf(fwversion, maxlen, fwver); | 2081 | snprintf(fwversion, maxlen, fwver); |