Commit Graph

113 Commits

Author SHA1 Message Date
Sam Leffler
4ef04d32f3 when ssid suppression is enabled don't respond to probe requests
unless our ssid is specified
2005-01-22 20:31:22 +00:00
Sam Leffler
e5a96ac7fb be consistent in naming inactivity timers;
net.wlan.X.inact -> net.wlan.X.inact_run
2005-01-22 20:29:23 +00:00
Sam Leffler
a88be5f1ae o replace out-of-line copy of FCS w/ a flag that indicates the
frame includes FCS (requires applications to be updated, but since
  we weren't doing the out-of-line FCS stuff anyway app changes
  were needed already)
o add a flag to indicate padding exists between the 802.11 header and
  the payload (e.g. for Atheros cards)
o diff reducation against netbsd

MFC after:	1 week
2005-01-22 20:12:05 +00:00
Sam Leffler
44acc00dda when a station is timed out for inactivity, remove it from the table
so it isn't considered again
2005-01-20 02:59:21 +00:00
Sam Leffler
ce64703289 explicitly avoid timing out ourself due to inactivity; it
can easily happen if the bss is quiet
2005-01-20 02:54:18 +00:00
Sam Leffler
90d0d0366b fix refcnt leak in adhoc mode: entries in the neighbor table
created due to rx'd frames had an extra reference
2005-01-20 02:53:11 +00:00
Sam Leffler
a84679cd18 remove debug msg from ieee80211_iterate_nodes; it makes logs very noisy
as onoe rate control invokes this once a second
2005-01-18 20:35:39 +00:00
Sam Leffler
29d368a780 avoid possible null pointer deref when refcnt debugging is enabled; the
node may be orphaned

Submitted by:	Tai-hwa Liang
2005-01-18 20:34:22 +00:00
Sam Leffler
96acc1b61c Explicitly ignore ibss merge requests when the node is ic_bss. This can
happen on the first management frame received from a neighbor; we assume
any merge candidate will send more frames and those should be processed
with a suitable table entry.

Stepped on by:	Tai-hwa Liang
2005-01-18 20:30:16 +00:00
Sam Leffler
3fcfbbfa76 Simplify the logic for checking the scan candidates at the end of a scan.
Hold a lock on the table instead of futzing with reference counts which
was potentially dangerous except drivers were quiescent while we did this
so the table contents never changed.  Disable the hack logic for removing
scan candidates with multiple association failures; it's never done the
right thing and will be fixed correctly with background scanning goes in.
2005-01-18 20:21:29 +00:00
Sam Leffler
5784a3714a correct logic that caused beacon frames received in ibss mode to be
discarded when not scanning
2005-01-18 20:07:44 +00:00
Sam Leffler
44c72e4299 move beacon/probe response counting down to after we've decided whether or
not we're going to process the frame; this makes the counters reflect frames
actually processes instead of received (discarded frames were already counted)
2005-01-18 20:04:51 +00:00
Sam Leffler
c75ac46947 when scanning is interrupted reset state so table entries go in the station
table and not the scan table

Noticed by:	Tai-hwa Liang
2005-01-18 19:59:40 +00:00
Sam Leffler
98ff62638d do fixed rate check when considering if a scan candidate is suitable so when
it's time to join the bss we can't get an error
2005-01-18 19:52:36 +00:00
Sam Leffler
ef92bcdc97 Correct scan candidate selection logic for dual-band devices: prefer
candidate on 5Ghz channel to candidate on 2Ghz channel only when the
rssi are comparable (wasn't considering rssi).
2005-01-01 17:48:27 +00:00
Sam Leffler
db966c8b2b remove netbsd rcsid lines; they are way out of date and we appear to be
diverging too much to make tracking these files worthwhile
2004-12-31 22:44:26 +00:00
Sam Leffler
1f1d781074 bump copyright for 2005 2004-12-31 22:42:38 +00:00
Sam Leffler
2045f69945 fixup inactivity timers:
o ic_inact_auth is a bad name, it's the inactivity threshold
  for being associated but not authorized; use it that way
o reset ni_inact when switching inactivity thresholds to
  minimize the race against the timer (don't want to lock
  for this stuff)
o change the inactivity probe threshold from a one-shot to
  cover a range: when below this threshold but not expired
  send a probe each inactivity interval; should probably
  guard against the interval being turned way down as this
  could cause us to spam the net with probes
2004-12-31 22:05:13 +00:00
Sam Leffler
5e923d2ebd Relearn how WPA keying is supposed to work and fix WPA+WME while
we're at it:
o WPA/802.11i has a unicast key and a group key; in station mode
  everything is sent with the unicast key--we were consulting the
  destination mac address and incorrectly using the group key
o (perpetuate fallback use of the default tx key to maintain
  compatibility with the way wpa_supplicant works)
o correct EAPOL encryption logic to check unicast key instead
  of assuming other state implies this
o move QoS encapsulation up to before enmic work so TKIP has the
  information required to calculate the pseudo-header
o do not do QoS-encapsulation of EAPOL frames as some ap's do the
  wrong thing with such frames (may need to revisit this if ap's
  start dropping non-QoS frames from stations assoc'd with QoS)
o move ieee80211_mbuf_adjust closer to its caller
2004-12-31 21:54:53 +00:00
Sam Leffler
7076eda0b5 disable default use of wme until we can sort out interoperability issues;
users that want it can explicitly enable it
2004-12-31 21:48:15 +00:00
Sam Leffler
a95fa8d386 s/inline/__inline/ 2004-12-31 21:30:42 +00:00
Sam Leffler
736b3dc32e compare pointers against NULL 2004-12-31 21:28:41 +00:00
Sam Leffler
b8fcf54640 make ap mode sta association debug msg as informative as sta mode 2004-12-31 21:27:53 +00:00
Sam Leffler
624a1bdb63 do 11g erp station management in turboG mode too 2004-12-31 21:25:28 +00:00
Sam Leffler
3d07392995 check if the node/station table is already present before creating one; this
can happen on an ibss merge
2004-12-31 21:22:12 +00:00
Sam Leffler
3ea67c5431 include phy mode in scan debug msg 2004-12-31 21:19:59 +00:00
Sam Leffler
380c5fa9ba accept IEEE80211_KEYIX_NONE for a default tx key 2004-12-31 21:13:35 +00:00
Sam Leffler
65e278a877 don't return prematurely from processing a beacon or probe response frame
when associated; this corrects a problem where doing a scan while associated
caused the associated ap to sometimes not be included in the scan set
2004-12-31 21:11:59 +00:00
Sam Leffler
c0fa32ce0b change ieee80211_parse_wmeparams to return a unique value when the ie
is invalid so we can distinguish this from needing a parameter update;
fixes dynamic update of wme parameters
2004-12-31 21:09:43 +00:00
Sam Leffler
6b31278104 remove stray \n from debug msg 2004-12-31 21:05:05 +00:00
Sam Leffler
8116d318fc clear wep bit in 802.11 header after crypto decap so packet
capture doesn't see it
2004-12-31 21:04:05 +00:00
Sam Leffler
da615e957d o add net.wlan.X.driver_caps mib variable for setting the driver capabilities
flags for testing
o debug msg consistency fixups
2004-12-31 21:01:41 +00:00
Sam Leffler
ecca7ea2ee correct pseudo-mic header calculation for QoS frames 2004-12-31 20:59:03 +00:00
Sam Leffler
f287c95b86 whitespace/debug msg fixups 2004-12-31 20:58:06 +00:00
Sam Leffler
dfefa312d9 add ieee80211_hdrspace and ieee80211_anyhdrspace to calculate the space
for an ieee80211 header taking into account padding requirements
2004-12-31 20:56:32 +00:00
Sam Leffler
4e844c9453 correct header length calculations on tx path for QoS-encapsulated frames
when IEEE80211_F_DATAPAD is set (e.g. ath); must use ieee80211_hdrspace
instead of ieee80211_hdrsize
2004-12-31 20:51:41 +00:00
Sam Leffler
7432b7cc84 const'ify ivp reference 2004-12-31 20:44:15 +00:00
Sam Leffler
fc508e8e4f add/fixup debug msgs 2004-12-31 20:42:51 +00:00
Sam Leffler
68f5ddcd2e s/inline/__inline/ 2004-12-31 20:39:41 +00:00
Sam Leffler
8da7b74f9c expose ieee80211_phymode_name for use in debug msgs 2004-12-31 20:38:48 +00:00
Sam Leffler
1034272d55 correct module dependency 2004-12-13 18:26:13 +00:00
Sam Leffler
169b73b33a correct module dependency 2004-12-13 18:12:26 +00:00
Sam Leffler
472f08ca8f cover up the landmine until there's a proper solution 2004-12-13 04:26:36 +00:00
Sam Leffler
db4b31b04c do not clear the global key cache when reaching the INIT state 2004-12-12 05:00:13 +00:00
Sam Leffler
868a7d0eab remove module dependency on rc4; it's not needed any more 2004-12-12 00:28:41 +00:00
Sam Leffler
b8d2606bae fix wep key seting: ENETRESET is the code to return to signal the driver
should push software state to the hardware (was ERESTART which caused the
system call to be retried)

Submitted by:	Tor Egge
2004-12-10 16:35:37 +00:00
Sam Leffler
1657488232 fixup printf arguments for 64-bit machines 2004-12-08 22:34:07 +00:00
Sam Leffler
8a1b9b6ad4 Update 802.11 support; too much new functionality to fully describe
here but it includes completed 802.11g, WPA, 802.11i, 802.1x, WME/WMM,
AP-side power-save, crypto plugin framework, authenticator plugin framework,
and access control plugin frameowrk.
2004-12-08 17:26:47 +00:00
Robert Watson
af5e59bf28 Add a new network interface flag, IFF_NEEDSGIANT, which will allow
device drivers to declare that the ifp->if_start() method implemented
by the driver requires Giant in order to operate correctly.

Add a 'struct task' to 'struct ifnet' that can be used to execute a
deferred ifp->if_start() in the event that if_start needs to be called
in a Giant-free environment.  To do this, introduce if_start(), a
wrapper function for ifp->if_start().  If the interface can run MPSAFE,
it directly dispatches into the interface start routine.  If it can't
run MPSAFE, we're running with debug.mpsafenet != 0, and Giant isn't
currently held, the task is queued to execute in a swi holding Giant
via if_start_deferred().

Modify if_handoff() to use if_start() instead of direct dispatch.
Modify 802.11 to use if_start() instead of direct dispatch.

This is intended to provide increased compatibility for non-MPSAFE
network device drivers in the presence of Giant-free operation via
asynchronous dispatch.  However, this commit does not mark any network
interfaces as IFF_NEEDSGIANT.
2004-07-27 23:20:45 +00:00
Max Laier
02b199f158 Link ALTQ to the build and break with ABI for struct ifnet. Please recompile
your (network) modules as well as any userland that might make sense of
sizeof(struct ifnet).
This does not change the queueing yet. These changes will follow in a
seperate commit. Same with the driver changes, which need case by case
evaluation.

__FreeBSD_version bump will follow.

Tested-by:	(i386)LINT
2004-06-13 17:29:10 +00:00