diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 7 | ||||
-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 | 19 |
4 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index e31d595e4753..9385df52d7a2 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -168,10 +168,11 @@ static int wlan_ret_get_hw_spec(wlan_private * priv, | |||
168 | 168 | ||
169 | adapter->fwcapinfo = le32_to_cpu(hwspec->fwcapinfo); | 169 | adapter->fwcapinfo = le32_to_cpu(hwspec->fwcapinfo); |
170 | 170 | ||
171 | adapter->fwreleasenumber = le32_to_cpu(hwspec->fwreleasenumber); | 171 | memcpy(adapter->fwreleasenumber, hwspec->fwreleasenumber, 4); |
172 | 172 | ||
173 | lbs_deb_cmd("GET_HW_SPEC: FWReleaseVersion- 0x%X\n", | 173 | lbs_deb_cmd("GET_HW_SPEC: FWReleaseVersion- %u.%u.%u.p%u\n", |
174 | adapter->fwreleasenumber); | 174 | adapter->fwreleasenumber[2], adapter->fwreleasenumber[1], |
175 | adapter->fwreleasenumber[0], adapter->fwreleasenumber[3]); | ||
175 | lbs_deb_cmd("GET_HW_SPEC: Permanent addr- %2x:%2x:%2x:%2x:%2x:%2x\n", | 176 | lbs_deb_cmd("GET_HW_SPEC: Permanent addr- %2x:%2x:%2x:%2x:%2x:%2x\n", |
176 | hwspec->permanentaddr[0], hwspec->permanentaddr[1], | 177 | hwspec->permanentaddr[0], hwspec->permanentaddr[1], |
177 | hwspec->permanentaddr[2], hwspec->permanentaddr[3], | 178 | hwspec->permanentaddr[2], hwspec->permanentaddr[3], |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 797a1249bcaf..91ac744ab9bc 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -205,7 +205,7 @@ struct assoc_request { | |||
205 | /** Wlan adapter data structure*/ | 205 | /** Wlan adapter data structure*/ |
206 | struct _wlan_adapter { | 206 | struct _wlan_adapter { |
207 | /** STATUS variables */ | 207 | /** STATUS variables */ |
208 | u32 fwreleasenumber; | 208 | u8 fwreleasenumber[4]; |
209 | u32 fwcapinfo; | 209 | u32 fwcapinfo; |
210 | /* protected with big lock */ | 210 | /* protected with big lock */ |
211 | 211 | ||
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h index 204d9d53aba8..dc66cf525339 100644 --- a/drivers/net/wireless/libertas/hostcmd.h +++ b/drivers/net/wireless/libertas/hostcmd.h | |||
@@ -165,8 +165,8 @@ struct cmd_ds_get_hw_spec { | |||
165 | /* Number of antenna used */ | 165 | /* Number of antenna used */ |
166 | __le16 nr_antenna; | 166 | __le16 nr_antenna; |
167 | 167 | ||
168 | /* FW release number, example 0x1234=1.2.3.4 */ | 168 | /* FW release number, example 1,2,3,4 = 3.2.1p4 */ |
169 | __le32 fwreleasenumber; | 169 | u8 fwreleasenumber[4]; |
170 | 170 | ||
171 | /* Base Address of TxPD queue */ | 171 | /* Base Address of TxPD queue */ |
172 | __le32 wcb_base; | 172 | __le32 wcb_base; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 1abb4bcecc66..5b7e5f257d62 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -2297,22 +2297,23 @@ static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info, | |||
2297 | 2297 | ||
2298 | void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) | 2298 | void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) |
2299 | { | 2299 | { |
2300 | union { | ||
2301 | u32 l; | ||
2302 | u8 c[4]; | ||
2303 | } ver; | ||
2304 | char fwver[32]; | 2300 | char fwver[32]; |
2305 | 2301 | ||
2306 | mutex_lock(&adapter->lock); | 2302 | mutex_lock(&adapter->lock); |
2307 | ver.l = adapter->fwreleasenumber; | ||
2308 | mutex_unlock(&adapter->lock); | ||
2309 | 2303 | ||
2310 | if (ver.c[3] == 0) | 2304 | if (adapter->fwreleasenumber[3] == 0) |
2311 | sprintf(fwver, "%u.%u.%u", ver.c[2], ver.c[1], ver.c[0]); | 2305 | sprintf(fwver, "%u.%u.%u", |
2306 | adapter->fwreleasenumber[2], | ||
2307 | adapter->fwreleasenumber[1], | ||
2308 | adapter->fwreleasenumber[0]); | ||
2312 | else | 2309 | else |
2313 | sprintf(fwver, "%u.%u.%u.p%u", | 2310 | sprintf(fwver, "%u.%u.%u.p%u", |
2314 | ver.c[2], ver.c[1], ver.c[0], ver.c[3]); | 2311 | adapter->fwreleasenumber[2], |
2312 | adapter->fwreleasenumber[1], | ||
2313 | adapter->fwreleasenumber[0], | ||
2314 | adapter->fwreleasenumber[3]); | ||
2315 | 2315 | ||
2316 | mutex_unlock(&adapter->lock); | ||
2316 | snprintf(fwversion, maxlen, fwver); | 2317 | snprintf(fwversion, maxlen, fwver); |
2317 | } | 2318 | } |
2318 | 2319 | ||