diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-05-25 23:40:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:45 -0400 |
commit | e5b3d472ad4eaa9013fd9f67f7a1b132f3ec910c (patch) | |
tree | fda7ec7b1f9efa7ac32068a21eb3859e91daec60 /drivers/net/wireless/libertas/wext.c | |
parent | 86760088a7c51ccc263ec3b8039ec9a7400a6d70 (diff) |
[PATCH] libertas: don't byte-swap firmware version number. It's a byte array.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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, void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) { - union { - u32 l; - u8 c[4]; - } ver; char fwver[32]; mutex_lock(&adapter->lock); - ver.l = adapter->fwreleasenumber; - mutex_unlock(&adapter->lock); - if (ver.c[3] == 0) - sprintf(fwver, "%u.%u.%u", ver.c[2], ver.c[1], ver.c[0]); + if (adapter->fwreleasenumber[3] == 0) + sprintf(fwver, "%u.%u.%u", + adapter->fwreleasenumber[2], + adapter->fwreleasenumber[1], + adapter->fwreleasenumber[0]); else sprintf(fwver, "%u.%u.%u.p%u", - ver.c[2], ver.c[1], ver.c[0], ver.c[3]); + adapter->fwreleasenumber[2], + adapter->fwreleasenumber[1], + adapter->fwreleasenumber[0], + adapter->fwreleasenumber[3]); + mutex_unlock(&adapter->lock); snprintf(fwversion, maxlen, fwver); } |