Commit Graph

32 Commits

Author SHA1 Message Date
dyoung 8abb07d1ac Make the node table into an LRU cache: least-recently used nodes
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.
2004-08-10 00:57:20 +00:00
mycroft 2a134a8f3c Change the basic rate list for 11g to contain just the 11b modes, mimicking the
behavior of other systems.
2004-07-30 17:05:18 +00:00
dyoung 59380646e3 For interoperability with legacy equipment, do not enable short
preamble by default.
2004-07-30 04:32:10 +00:00
dyoung 8205ae2288 Change sysctl range-checking: net.link.ieee80211.debug values are
now 0x0 -> 0xffffffff, not 0 -> 2.
2004-07-30 04:29:52 +00:00
mycroft f526e7326b Cleanup of ieee80211_node from madwifi:
* Don't use ifp pointers; use ieee80211com.
* Implement the locking macros that are used under FreeBSD and Linux.
2004-07-23 10:15:13 +00:00
mycroft 3551583171 Changes from madwifi:
Abstract some of the node management code into separate functions, and use them
throughout, plugging memory leaks.
Allocate the AID allocation map dynamically.
2004-07-23 09:22:15 +00:00
mycroft a02b46e848 More diff reduction; mainly IEEE80211_DPRINTF() stuff. 2004-07-23 08:05:00 +00:00
mycroft f0546001c6 Diff reduction vs. madwifi.
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.
2004-07-23 06:44:55 +00:00
mycroft c3138ef3da IEEE80211_MAX_AID has been renamed to IEEE80211_AID_MAX. 2004-07-23 05:33:41 +00:00
mycroft 427f7b9264 The low-level drivers are not setting the "basic rate" bit in the rateset.
Instead, change *_set11gbasicrate() to *_setbasicrates(), have it operate on
all modes, and call it from *_ifattach().  Also, fix obvious bugs in it (it
had an off-by-one error, at least).
2004-07-22 14:44:17 +00:00
dyoung 9946103dce Add sysctl access to 802.11 node tables, step #2. 2004-07-16 03:02:41 +00:00
dyoung 74d2bb365f Straggler: *really* chain the ieee80211coms. 2004-07-16 02:54:05 +00:00
dyoung d18cdaab4e Chain ieee80211coms together so that the 802.11 sysctls can walk
them all to retrieve their node tables.
2004-07-16 02:36:58 +00:00
dyoung b0ce431f32 Add sysctl(9) descriptions for net.link and net.link.ieee80211. 2004-06-06 05:45:29 +00:00
dyoung 390d3859bf Fix a typo in some #ifdef notdef code. 2004-06-06 05:44:25 +00:00
dyoung 7b92b29893 Improve argument checking. Convert from seconds to some number of
inactivity countdown intervals (currently these are 5 seconds).
2004-06-06 05:43:17 +00:00
dyoung e071e08cc6 Fix for kern/25604: ifconfig wi0 media DS11 panics system.
In ieee80211_chan2mode, do not dereference the marker for "any
channel," IEEE80211_CHAN_ANYC.
2004-06-06 05:28:58 +00:00
atatat 4de3747b89 Sysctl descriptions under net subtree (net.key not done) 2004-05-25 04:33:59 +00:00
dyoung 6263dee43f Undo last: I committed the wrong file. 2004-05-09 09:00:05 +00:00
dyoung dd998d980d In ieee80211_find_rxnode, when we "fake up" a node for an ad hoc
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.
2004-05-09 08:19:21 +00:00
dyoung 998a558a7f Following Andrew Brown's suggestion, move net.ieee80211 to
net.link.ieee80211.  The convention is that nodes directly under
net are protocol families (PF_*).

Also, simplify the sysctl setup for net80211 and rssadapt, following
another suggestion by Andrew.
2004-05-06 07:11:40 +00:00
dyoung fcd7df4334 Add a sysctl, net.ieee80211.debug, for turning debug messages on
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.
2004-05-06 03:07:10 +00:00
dyoung fd6869101d From FreeBSD. Change ieee80211_phymode_name from
a subroutine back to an array.  Rearrange ieee80211_setmode.
Miscellaneous small changes to make our code and FreeBSD's agree.
2004-04-30 23:58:05 +00:00
dyoung 8c117e1a38 NetBSD's KASSERT takes just one argument while FreeBSD's takes two,
so I have added IASSERT(cond, complaint) to the compatibility header
file and s/KASSERT/IASSERT/'d.
2004-01-13 23:37:29 +00:00
dyoung 9280f4b428 Synchronize with FreeBSD sources from 12 Dec 2003. 2003-12-14 09:56:53 +00:00
matt f90b1121c4 bpfattach/bpfdetach need to be protected with NBPFILTER > 0 2003-10-16 22:25:00 +00:00
dyoung f2a9708c75 Do not index arrays using enum constants, since enums can be
re-ordered and extended. Instead, use a switch-statement or a
key->value table with appropriate bounds-checking.
2003-10-14 23:13:44 +00:00
dyoung 8a3890c655 More changes to the new 802.11 layer:
* Add Kevin Lahey's power-saving support from the old 802.11 layer

* Support for frequency-hopping PHYs

    * Add support frequency-hopping PHY mode, IFM_IEEE80211_FH
    * Add channel flags for frequency-hopping
    * Add mode<->media mappings in for FH PHY in ieee80211_media2rate
      and ieee80211_rate2media

* Stop using IFM_MAKEMODE macro since the mode constants
  (e.g., IFM_IEEE80211_11A) are pre-shifted in sys/net/if_media.h

* Add some PLCP constants.
2003-10-13 04:28:35 +00:00
dyoung 20a915d375 Put FreeBSDisms in #ifdef __FreeBSD__, and add the equivalent
NetBSDisms.
2003-09-23 16:01:21 +00:00
dyoung 6e8d0b71c8 Insert RCSIDs. 2003-09-14 01:14:54 +00:00
dyoung cf8438b460 First stab at producing a unified NetBSD/FreeBSD 802.11 layer,
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
2003-09-07 01:22:19 +00:00
dyoung 40e261aa72 Pull in net80211/ from FreeBSD. This contains Sam Leffler's
enhancements to the 802.11 layer, which are necessary for ath(4),
the Atheros-chipset driver.
2003-08-30 21:26:03 +00:00