Commit Graph

242 Commits

Author SHA1 Message Date
dyoung
1131c0f5f6 Forget the tcpdump $Header$. 2003-12-08 04:48:58 +00:00
dyoung
4232da0fda Diagnostics: complain if packet decapsulation fails. 2003-12-07 05:34:22 +00:00
dyoung
2e4c586701 Oops. Make it compile with 'options IEEE80211_DEBUG'. 2003-12-07 05:29:39 +00:00
dyoung
00c2f586dc Get/set fragmentation threshold. DTRT when the RTS threshold is
set.
2003-12-07 05:23:12 +00:00
dyoung
9270de9dc4 Updates to 802.11 radiotap. The _DB_ flags were used everywhere to
denote a signed dBm Rx power, so rename them to _DBM_ and change
the signedness.  Add new _DB_ flags for unsigned Rx power measured
from an arbitrary reference.

Try to synchronize net80211/ieee80211_radiotap.h with my tcpdump
sources (which public tcpdump has not seen, yet) and with FreeBSD.
2003-12-07 04:49:17 +00:00
dyoung
23d8f48692 Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
2003-11-16 09:02:42 +00:00
dyoung
85f84a3155 Cosmetic: get rid of an indent level in ieee80211_find_txnode by
changing an if () ... else to an if () return.
2003-11-02 01:29:05 +00:00
dyoung
22f9e4aae7 On the output path, save a power-saving station's ieee80211_node
in the mbuf's rcvif field so that the driver can get at it.
2003-11-02 00:17:27 +00:00
dyoung
3ed4d1ac9f Add ieee80211_find_rxnode and its helper ieee80211_needs_rxnode.
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.
2003-10-29 21:50:57 +00:00
mycroft
c41a3efdb2 Eliminate bogus initializer. 2003-10-27 17:11:19 +00:00
dyoung
9c65c69cd6 Support data-rate adaptation loosely based on the paper "Link
Adaptation Strategy for IEEE 802.11 WLAN via Received Signal Strength
Measurement" by Javier del Prado Pavon and Sunghyun Choi. This
module should provide faster adaptation and higher throughput than
Lucent's rate-adaptation scheme.

Individual drivers need to be modified to use this module. Patches
for wi(4) are forthcoming.
2003-10-26 07:56:41 +00:00
christos
2017bf9a94 Fix uninitialized variable warning 2003-10-25 18:31:59 +00:00
mycroft
f336bf5b29 Do that replacement in one more place. 2003-10-25 03:18:37 +00:00
mycroft
3ebaf267f3 Replace a constant with a symbol. 2003-10-25 01:17:39 +00:00
dyoung
38a484b2d0 In the input path, do not discard management frames belonging to
a different BSS, because that keeps drivers like atw from detecting
ad hoc beacons with the same SSID but different BSSID for the
purpose of IBSS merges.

This should be revisited: maybe drivers should check for beacons
before handing packets up with ieee80211_input(). However, this
restores the atw(4) to working like it did with the old 802.11
layer, and it *is* nice to re-use the 802.11 layer's packet-decode
& -dispatch code (i.e., the ic_recv_mgmt callback).
2003-10-23 06:30:32 +00:00
itojun
e0c9ee7f93 print "association failed" message only if IFF_DEBUG 2003-10-18 05:06:43 +00:00
onoe
ba543e3743 Do not update SSID by beacon, because hidden SSID implementation is vary.
ex. 0-length, single space, 0x00 with correct length.
So, we don't update SSID in node table by beacon, but always update by
Probe Response.
2003-10-18 03:33:51 +00:00
matt
f90b1121c4 bpfattach/bpfdetach need to be protected with NBPFILTER > 0 2003-10-16 22:25:00 +00:00
dyoung
db0e43b296 Add WEP shared-key authentication. 2003-10-15 11:43:51 +00:00
itojun
5752b1f9ee add __attribute__((__format__)) to if_printf 2003-10-15 08:13:28 +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
0fc2b8e13f Add missing pktattr declaration. Should compile w/ ALTQ, now. 2003-10-14 23:02:52 +00:00
dyoung
193ac59e63 Fix PR 23146 (sys/net80211/ intergration break WEP/power management
function) from FUKAUMI Naoki.
2003-10-13 20:05:09 +00:00
dyoung
762441ba29 Install header files for the new 802.11 layer. 2003-10-13 04:29:31 +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
60dad7c3fe * Add support for frequency-hopping PHY mode.
* Do not enable debugging by default w/ IEEE80211_DEBUG.

* Add Kevin Lahey's power-saving support from the old 802.11 layer
2003-10-13 04:27:40 +00:00
dyoung
b8e804e8d2 Add Kevin Lahey's power-saving support from the old 802.11 layer
Spelling fix: s/unmatch/mismatch/g
2003-10-13 04:25:26 +00:00
dyoung
91ca08d44e Add Kevin Lahey's power-saving support from the old 802.11 layer 2003-10-13 04:23:56 +00:00
dyoung
031c73f68c Even more changes to the new 802.11 layer:
* Add Kevin Lahey's power-saving support from the old 802.11 layer
* Add a FHPARMS or DSPARMS info element to probe responses and beacons
  as appropriate.
2003-10-13 04:22:55 +00:00
dyoung
730331d557 More changes to the new 802.11 layer:
* 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.
2003-10-13 04:20:23 +00:00
dyoung
56126d8a7e Revive constant IEEE80211_CHAN_ANY for ioctls. 2003-10-13 04:16:59 +00:00
dyoung
6cac03ae0e Adapt ieee80211_ioctl.[ch] to suit NetBSD. NetBSD and FreeBSD have
the least in common here, so I have not concerned myself with
compatibility.
2003-09-28 02:40:14 +00:00
dyoung
c059ea0028 More NetBSD-FreeBSD compatibility changes in the pattern
#ifdef __FreeBSD__
	/* FreeBSDism */
#else
	/* NetBSDism */
#endif

An important and non-obvious change is in ieee80211_mgmt_output,

#ifdef __FreeBSD__
        KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null"));
#endif

Because NetBSD mbufs are not bzero'd like FreeBSD's, we cannot
count on rcvif == NULL.
2003-09-28 02:35:20 +00:00
dyoung
847c5ca1c6 More changes following this pattern:
#ifdef __FreeBSD__
	/* FreeBSD-ism */
#else
	/* NetBSD-ism */
#endif
2003-09-23 16:03:46 +00:00
dyoung
20a915d375 Put FreeBSDisms in #ifdef __FreeBSD__, and add the equivalent
NetBSDisms.
2003-09-23 16:01:21 +00:00
dyoung
608fc21500 Make ieee80211_unref_node compile.
#ifdef __FreeBSD__ a lot of lines, and put the NetBSDisms into the #else
half.

Add ieee80211_node_{dec,inc}ref to ieee80211_node.h.
2003-09-23 15:59:09 +00:00
dyoung
1c4de65baa Make if_printf more nearly match FreeBSD's, and make it compile.
Remove ieee80211_node_{dec,inc}ref (they go to ieee80211_node.h).
2003-09-23 15:57:25 +00:00
dyoung
6e8d0b71c8 Insert RCSIDs. 2003-09-14 01:14:54 +00:00
dyoung
50fa2c1f44 Complete merge. 2003-09-07 04:10:39 +00:00
dyoung
76b1cd5bf9 Bring net80211/ sources up-to-date with FreeBSD.
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-09-07 04:05:33 +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