diff options
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 19 |
1 files changed, 10 insertions, 9 deletions
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 | ||