X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Fhostap%2Fhostap_ioctl.c;fp=drivers%2Fnet%2Fwireless%2Fhostap%2Fhostap_ioctl.c;h=f3e0ce1ee037937a0c950e3b0c59b58b00b4d4bc;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=8399de581893f32412f12684af602959421db50c;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 8399de581..f3e0ce1ee 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 = le16_to_cpu(scan->chid); + chan = 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[chan - 1] * 100000; + iwe.u.freq.m = freq_list[le16_to_cpu(chan - 1)] * 100000; iwe.u.freq.e = 1; current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); @@ -3358,6 +3358,10 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev, if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { if (!sta_ptr) local->tx_keyidx = i; + else if (i) { + ret = -EINVAL; + goto done; + } }