Allow SIOCSWAVELAN with WI_RID_IFACE_STATS to request
an immediate statistics update.
We might in the future want to have SIOCGWAVELAN with
WI_RID_IFACE_STATS return an error if a statistics gathering is in
progress. Then the caller could request fresh statistics and gather
them when they are done. Instead, we currently just return whatever
statistics are available, which may be up to 60 seconds old.
this partially addresses pr14385.
there is still a byte swapping bug retrieving the
stats structure. Since both the type and the length
are incorrectly swapped, we would timeout while reading
an extra long section (caused by the byteswapped length)
of garbage data.
turning on WI_DEBUG now just reports the unknown info type
which can be seen to be obviously incorrectly swapped
on macppc
pairs. Without this, the interrupt handler will steal the "command completed"
status and wi_cmd will busy loop until it times out.
Add some error output to make failure modes like this more prominent.
This should fix PR 14559.
;
Implement wi_scan into wi.c.
forces if_wi to initiate one round of access point scan.
This code was written by jrb@cs.pdx.edu, modified and bug-fixed by ichiro@netbsd.org
(1) Add an IOCTL to tell the Lucent based cards how often to
do an access point scan. These results are returned by
calling another IOCTL to get the most recent scan data.
This function works with prism2 cards as well, but the
data is returned in a different format, or perhaps it is
data only for the closest access point.
(2) For prism2 cards, add the ability to put it into LAN monitor
mode, where (via BPF) all packets can be received. This
mode works best with "wiconfig wi0 -p 3 -f ?" to put the
card into pseudo-IBSS mode (to keep it from channel-hopping
and scanning for access points) and to set the frequency of
the AP you wish to monitor.
The returned data has a partial wi_frame header (down to the
wi_dat_len field) followed by the raw data of the packet.
I have and will put up on http://www.flame.org/NetBSD/wireless/
some simple utilities which do some perhaps interesting things,
like scan for access points, capture packets, etc.