提交 dac322e3 编写于 作者: P Pavel Roskin 提交者: John W. Linville

[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: NPavel Roskin <proski@gnu.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 6b426e78
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册