are at the end of the node queue. Change the reference-counting
discipline: ni->ni_refcnt indicates how many times net80211 has
granted ni to the driver. Every node in the table with ni_refcnt=0
is eligible to be garbage-collected. The mere presence of a node
in the table does not any longer indicate its auth/assoc state;
nodes have a ni_state variable, now. A sysctl,
net.link.ieee80211.maxnodecache, controls the maximum LRU cache
size.
While I am here, patch ieee80211_find_node_for_beacon to do a "best
match" by bssid/ssid/channel, not a "perfect match." This keeps
net80211 from caching duplicate nodes in the table.
ieee80211_input():
* Do not discard management frames in station mode just because they have
the wrong BSSID.
* Do not discard beacons in station and host-AP mode when not scanning.
* Some minor rearrangement. Update node statistics even if the packet is
rejected.
ieee80211_recv_mgmt():
* Accept probe responses and beacons in station and host-AP even when not
scanning.
* Do not immediately free the node created by a beacon or probe response.
XXX Should I check BSSIDs more carefully in ieee80211_recv_mgmt() --
specifically for ASSOC_RESP, REASSOC_RESP, AUTH, DEAUTH and DISASSOC?
Fix a problem with APs that advertise multiple SSIDs:
Change the footprint of ieee80211_find_node_with_channel() to take a SSID as
well, and, if not empty, compared it with the existing nodes. This causes
us to allocate multiple nodes for the same AP. Without this we were only
leaving one SSID in the node table, which might not be the desired one, and
so the interface would fail to fully initialize. (Reported by he@ with a
Cisco 350 AP.)
Responses. Ad hoc mode uses these entries to track network peers.
This provides passive-scan information for the current channel in
infrastructure mode (XXX really should keep it in a different
table). Host APs will someday use these entries to track APs in
the same ESS for AP-to-AP bridging.
must use a full node for received management frames, or we are unable to
complete association and talk to the client. I could add an
"if mode == HOSTAP" to fix this, but instead I am reverting the change and
remanding it to the person who broke it.
IBSS nodes. Do not send an EXPIRE-type DEAUTH message when IBSS
nodes time-out. This ends the panic that rev 1.25 fixed, but
without a dual-use ieee80211_node_leave.
Abstract some of the node management code into separate functions, and use them
throughout, plugging memory leaks.
Allocate the AID allocation map dynamically.
Change the signature of IEEE80211_DPRINTF() so that it uses a bitmask, and
convert some of the if_printf()s to IEEE80211_DPRINTF()s. XXX I'm using a
global variable at the moment rather than per-interface.
that we create the network with the BSSID preferred by the operator.
[Say the operator set the desired BSSID with 'ifconfig atw0 bssid
02:25:25:75:75:75'. If no such network is found during scanning,
then create the network with that BSSID.]
peer, we have to copy the "master" rate table to the faked-up node's
rate table, or else ath0 will complain, "ath0: bogus xmit rate
0x0". Thank you Konstantin KABASSANOV for reporting this problem.
and off.
Add a sysctl, net.ieee80211.maxinact, for adjusting the node time-out
interval. After net.ieee80211.maxinact seconds of inactivity, an
AP will purge a peer/client-record. Now the client has to reassociate.
802.11 drivers will use ieee80211_find_rxnode to match each received
packet with the ieee80211_node belonging to the sender. The driver
will use the ieee80211_node to track the sender's RSSI and other
statistics for, e.g., rate adaptation.
ieee80211_find_rxnode "fakes-up" missing ieee80211_nodes in IBSS
mode and in ad-hoc demo mode when it is appropriate. See the comments
in the source.
Also add ieee80211_find_txnode, which looks up the ieee80211_node
belonging to a MAC destination. ieee80211_find_txnode will also
fake-up missing nodes in IBSS/ad-hoc demo mode.
In ieee80211_encap, use ieee80211_find_txnode. This fixes the bug
in ad hoc packet-transmission reported by Greg Troxel, Urban Boquist,
and Kurt Schreiner.
* Add Kevin Lahey's power-saving support from the old 802.11 layer
* Add my stop-gap rate-selection routine, ieee80211_get_rate,
from the old 802.11 layer
* Also from the old 802.11 layer: factor ieee80211_match_bss out
of ieee80211_end_scan, since atw(4) uses it for IBSS merges.
striving to keep the diffs short and simple.
* Replace FreeBSDisms (e.g. struct arpcom) with conditionally-compiled
NetBSDism (struct ethercom).
* Add compatibility shims in ieee80211_compat.*: provide NetBSD with
if_printf, for example.
* Convert FreeBSD node mutex uses to generic node critical-section
protection (ieee80211_node_critsect_begin, _end), replace
FreeBSD atomic arithmetic with generic alternative, and implement
generics in NetBSD
* Provide NetBSD-style 802.11 ioctls
* Style nits