[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IEEE80211_IOC_STA_STATS broken?
David Young wrote:
If someone could tell me what I'm doing wrong or it's it's a
NetBSD-4.99.73 bug I'd appreciate it.
Apparently, i_data has to point at a STA's MAC address:
error = copyin(ireq->i_data, macaddr, IEEE80211_ADDR_LEN);
if (error != 0)
ni = ieee80211_find_node(&ic->ic_sta, macaddr);
if (ni == NULL)
return EINVAL; /* XXX */
Instead of EINVAL, it should return ENOENT, IMO.
Also, I suggest pointing i_data at an ieee80211req_sta_stats.
OK, it works a little better now.
It things it works, but from the looks of it the data returned is
garbage. Attached is the program, here is the output.
SIOCG80211: Operation not permitted
$ sudo ./x
0 0 0
The last 3 numbers are data length, frequency and rssi.
1) Why is superuser required to obtain such simple information such as
rssi of the AP associated to?
2) What is going wrong? It's quite hard as I can find no sample code for
this ioctl and I don't understand much kernel code.
3) Is there an easier way to do this?
This is purely to try and get the wavelan panel plugin on XFCE working
with my iwi0 card.
Main Index |
Thread Index |