diff options
author | Pavel Roskin <proski@gnu.org> | 2006-04-17 15:36:43 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 19:20:22 (GMT) |
commit | dac322e39a2b82871cf514c9a533f24a1b4c7e19 (patch) | |
tree | e64f39191f63e8c0dba6304890ad71b756e02990 /drivers | |
parent | 6b426e785cb81e53dc2fc4dcf997661472b470ef (diff) | |
download | linux-fsl-qoriq-dac322e39a2b82871cf514c9a533f24a1b4c7e19.tar.xz |
[PATCH] Fix crash on big-endian systems during scan
The original code was doing arithmetics on a little-endian value.
Reported by Stelios Koroneos <stelios@stelioscellar.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 8b37e82..8399de5 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c @@ -1860,7 +1860,7 @@ static char * __prism2_translate_scan(local_info_t *local, memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWFREQ; if (scan) { - chan = scan->chid; + chan = le16_to_cpu(scan->chid); } else if (bss) { chan = bss->chan; } else { @@ -1868,7 +1868,7 @@ static char * __prism2_translate_scan(local_info_t *local, } if (chan > 0) { - iwe.u.freq.m = freq_list[le16_to_cpu(chan - 1)] * 100000; + iwe.u.freq.m = freq_list[chan - 1] * 100000; iwe.u.freq.e = 1; current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); |