openbsd
16 years agoRemove unused and incomplete vax_bus_t enum, and unused vaxbus_dma_get_tag()
miod [Fri, 15 Aug 2008 22:39:59 +0000 (22:39 +0000)]
Remove unused and incomplete vax_bus_t enum, and unused vaxbus_dma_get_tag()
macro and related function pointers.

16 years agoRename the cpu_dep hook ``steal_pages'' to ``init'', as it serves as an
miod [Fri, 15 Aug 2008 22:38:20 +0000 (22:38 +0000)]
Rename the cpu_dep hook ``steal_pages'' to ``init'', as it serves as an
early initialization routine (to enable caches, etc) while still running
physical, and does not allocate memory anymore.

(The irony in this is that forthcoming KA60 support actually steals pages
 in its init function...)

16 years agohmac.c is needed by softraid crypto now, even on non-wlan machines.
miod [Fri, 15 Aug 2008 19:42:03 +0000 (19:42 +0000)]
hmac.c is needed by softraid crypto now, even on non-wlan machines.

16 years agoPrefer unaligned accesses over copying the rx buffer on all archs that can
naddy [Fri, 15 Aug 2008 15:49:08 +0000 (15:49 +0000)]
Prefer unaligned accesses over copying the rx buffer on all archs that can
handle it, not only i386.  ok brad@

16 years agoAdd resolv.conf(5) option to force lookups by TCP: "options tcp"
djm [Fri, 15 Aug 2008 14:57:19 +0000 (14:57 +0000)]
Add resolv.conf(5) option to force lookups by TCP: "options tcp"

Also Extend "nameserver" declaration syntax to support port
numbers.  To avoid ambiguity these are only parsed when the address
is enclosed in square brackets, e.g. "nameserver [127.0.0.1]:5353"

Together these changes make forwarding DNS over a SSH tunnel very
easy, but unfortunately some programs in ports/ implement their
own resolvers (e.g. firefox). These will need to be modified to
support these options separately.

fixes jsing@ reyk@
ok deraadt@ millert@ krw@ + "I like it" from lots

16 years agoAdd -s option to usage().
jsing [Fri, 15 Aug 2008 14:41:21 +0000 (14:41 +0000)]
Add -s option to usage().

Prompted by jmc@

ok jmc@

16 years agouse new shared HMAC_SHA1 code in crypto/hmac.[ch] rather than local
djm [Fri, 15 Aug 2008 11:18:10 +0000 (11:18 +0000)]
use new shared HMAC_SHA1 code in crypto/hmac.[ch] rather than local
copy; ok hshoexer@

16 years agouse LLC_SNAPFRAMELEN here too.
damien [Fri, 15 Aug 2008 08:15:27 +0000 (08:15 +0000)]
use LLC_SNAPFRAMELEN here too.

16 years agoonly update stats when we actually wrote sth, relevant for -n, ok djm
henning [Thu, 14 Aug 2008 22:29:43 +0000 (22:29 +0000)]
only update stats when we actually wrote sth, relevant for -n, ok djm
From: Pierre Riteau <pierre.riteau@gmail.com>

16 years agoKill the _MCLDEREFERENCE() macro it was only used once and it should be only
claudio [Thu, 14 Aug 2008 19:39:40 +0000 (19:39 +0000)]
Kill the _MCLDEREFERENCE() macro it was only used once and it should be only
used once -- in m_free(). Removed so that people don't get stupid ideas.
OK thib@

16 years agoIf the AML SizeOf() method is called with an object reference it should
jsing [Thu, 14 Aug 2008 17:41:20 +0000 (17:41 +0000)]
If the AML SizeOf() method is called with an object reference it should
return the size of the referenced object. This fixes a panic on the ASUS
eeePC 1000H when attaching the acpiasus(4) driver.

Issue reported and fix tested by robert@

ok marco@

16 years agoAllow the sector size to be specified by the user when configuring a
jsing [Thu, 14 Aug 2008 17:10:29 +0000 (17:10 +0000)]
Allow the sector size to be specified by the user when configuring a
vnd(4) device, via a new -s option to vnconfig/mount_vnd. This allows us
to create disklabels and file systems that are suitable for use on
devices that have a non-512 byte sector size (eg. CDROMs).

With help from krw@ and feedback from pedro@.

ok krw@, pedro@

16 years agoieee80211_derive_pmkid() is not used either
damien [Thu, 14 Aug 2008 16:14:53 +0000 (16:14 +0000)]
ieee80211_derive_pmkid() is not used either

16 years ago#ifdef notyet ieee80211_kdf() as it is not used yet (shrink kernel a bit)
damien [Thu, 14 Aug 2008 16:10:01 +0000 (16:10 +0000)]
#ifdef notyet ieee80211_kdf() as it is not used yet (shrink kernel a bit)

16 years agomove the HostAP bridge code and the delivery of data frames to ether_input
damien [Thu, 14 Aug 2008 16:07:58 +0000 (16:07 +0000)]
move the HostAP bridge code and the delivery of data frames to ether_input
to a separate ieee80211_deliver_data() function.
this will later be called by the A-MSDU deaggregation routine.

16 years agoin ieee80211_input(), call if_start() after enqueuing frames in if_snd
damien [Thu, 14 Aug 2008 16:02:23 +0000 (16:02 +0000)]
in ieee80211_input(), call if_start() after enqueuing frames in if_snd
when acting as an access point instead of having each driver doing the
job.

tested by krw@ (ral AP) and me with several drivers.

16 years agoput ieee80211_dump_pkt() under #ifdef IEEE80211_DEBUG
damien [Thu, 14 Aug 2008 15:51:43 +0000 (15:51 +0000)]
put ieee80211_dump_pkt() under #ifdef IEEE80211_DEBUG

16 years agofix comments suggested by eric@, remove stupid DPRINTF()
ratchov [Thu, 14 Aug 2008 15:25:16 +0000 (15:25 +0000)]
fix comments suggested by eric@, remove stupid DPRINTF()

16 years agoadd missing semicolon; ok mbalmer@, marco@
robert [Thu, 14 Aug 2008 14:31:31 +0000 (14:31 +0000)]
add missing semicolon; ok mbalmer@, marco@

16 years agolet's make this half useful to recover from crashed disks with wrong info.
espie [Thu, 14 Aug 2008 13:06:04 +0000 (13:06 +0000)]
let's make this half useful to recover from crashed disks with wrong info.

16 years agoconvert the last traces of btoc/ctob macros
martin [Thu, 14 Aug 2008 11:41:30 +0000 (11:41 +0000)]
convert the last traces of btoc/ctob macros

ok miod@

16 years agosimplify S definition to just srcdir, since it appears there's no special
espie [Thu, 14 Aug 2008 10:18:34 +0000 (10:18 +0000)]
simplify S definition to just srcdir, since it appears there's no special
case anymore.
Note that you can always override it from the command line if you need it.

after discussion with deraadt@ and tedu@

16 years agoin abuf_rgetblk() the ``start'' pointer may take a value beyond the
ratchov [Thu, 14 Aug 2008 10:02:10 +0000 (10:02 +0000)]
in abuf_rgetblk() the ``start'' pointer may take a value beyond the
end of the buffer because periodic boundary conditions of the FIFO are
not met

ok jakemsr

16 years agomove all device related stuff from aucat.c to a new dev.c file.
ratchov [Thu, 14 Aug 2008 09:58:55 +0000 (09:58 +0000)]
move all device related stuff from aucat.c to a new dev.c file.
The new dev_xxx() routines expose a "high level" self-contained
interface to the device. At initialization, the device is opened
and two chains of aproc structures are created:

 * a playback chain that exposes a (initially) empty mix
   aproc to which the rest of the code can attach new
   streams to be played

 * record chain that exposes a (initially) empty sub aproc
   to which the rest of the code can attach new stream to
   to record

The rest of the code, has just to use dev_attach() routine to
attach streams. While we're at it, add a ``devops'' structure
containing pointers to the device-specific routines. This will
allow later to add support for other type of device than the
Sun API.

Also, write the .wav headers in file_del(), so put all header
related data in the file strucuture. This allows to close() the
file, as soon as wpipe_xxx() aproc terminates. This will be
useful for the server, because it will need to close() descripts
of closed connections immediately.

add mix_pushzero() routine to fill the mixer with silence. It
will be used to avoid the mixer to underrun when there are no
input streams. Since we always have at least one input stream
there's no behaviour change.

ok jakemsr

16 years agoin file.c, before dereferencing pointers to in(), out(), eof(),
ratchov [Thu, 14 Aug 2008 09:48:50 +0000 (09:48 +0000)]
in file.c, before dereferencing pointers to in(), out(), eof(),
hup() routines of the aproc strucure check that the aproc
structure has not desappeared. This never happens currently, but
will be allowed later. No behaviour change.

ok jakemsr

16 years agoadd an "AUTOQUIT" flag to mix and sub aprocs. If the flag is
ratchov [Thu, 14 Aug 2008 09:47:51 +0000 (09:47 +0000)]
add an "AUTOQUIT" flag to mix and sub aprocs. If the flag is
set, the mix aproc will exit once there are no more input
streams, similarly the sub aproc will exit once there are no
more ouput streams. If the flag is not set, the mix aproc will
generate silence, and the sub aproc will drop samples. By
default this flag is set, so no behaviour change.

ok jakemsr

16 years agoadd a bytes counter to abuf structures to count the number of
ratchov [Thu, 14 Aug 2008 09:46:36 +0000 (09:46 +0000)]
add a bytes counter to abuf structures to count the number of
bytes that entered the FIFO. The counter may overflow, so it
should be used with "modulo 2^32" arithmetic. The counter will
be used later to synchronize playback to record. No behaviour
change.

ok jakemsr

16 years agoadd a xxx_done() method to aproc structures, that cleans up just
ratchov [Thu, 14 Aug 2008 09:45:23 +0000 (09:45 +0000)]
add a xxx_done() method to aproc structures, that cleans up just
before free()ing the aproc structure, this is cleaner and will
allow to reuse wpipe_xxx() and rpipe_xxx() when defining new
aprocs. No behaviour change.

ok jakemsr

16 years agomove mix/sub underrun/overrun handling code and data in the
ratchov [Thu, 14 Aug 2008 09:44:15 +0000 (09:44 +0000)]
move mix/sub underrun/overrun handling code and data in the
generic abuf structure, so it can reused. Required for an audio
server. No behaviour change.

ok jakemsr

16 years agofactor code that discards data from abuf strucure into a single
ratchov [Thu, 14 Aug 2008 09:39:16 +0000 (09:39 +0000)]
factor code that discards data from abuf strucure into a single
abuf_rdiscard() routine. Similarly add abuf_wcommit() routine for
writing. The purpose is to stop manupulating FIFO pointers in
various places outiside abuf.c, its too error prone.
No behaviour change.

ok jakemsr

16 years agoMatch libpthread's behavior and make pthread_join(NULL, whatever) fail
guenther [Thu, 14 Aug 2008 05:57:06 +0000 (05:57 +0000)]
Match libpthread's behavior and make pthread_join(NULL, whatever) fail
instead of crashing

ok kurt@
first observed by Jung <moorang at gmail.com>

16 years agoFix 5771/library: in pthread_exit(), delay the call to _sem_post() that
guenther [Thu, 14 Aug 2008 05:20:44 +0000 (05:20 +0000)]
Fix 5771/library: in pthread_exit(), delay the call to _sem_post() that
unblocks the pthread_join() for this thread until the exiting thread is
completely done with its thread structure, as the joining thread will
free it once unblocked.  Also, don't bother to call _sem_post() if the
thread is detached.

ok kurt@

16 years agoIf the initial thread calls pthread_exit(), don't overwrite its thread
guenther [Thu, 14 Aug 2008 05:15:41 +0000 (05:15 +0000)]
If the initial thread calls pthread_exit(), don't overwrite its thread
structure, as the 'tid' member there is used by other parts of
librthread to determine whether the current thread is the initial thread

16 years agoTools from /usr may not be used in netstart since it may be NFS-mounted
sthen [Thu, 14 Aug 2008 00:59:50 +0000 (00:59 +0000)]
Tools from /usr may not be used in netstart since it may be NFS-mounted
and not available at that time. Rewrite the hostname.if permission check
to use only /bin/ls and the shell. Requested by deraadt.

ok todd, "Twisted." deraadt

16 years agoMake sure that we don't sleep with a lock held, some small cleanup while
oga [Wed, 13 Aug 2008 21:56:50 +0000 (21:56 +0000)]
Make sure that we don't sleep with a lock held, some small cleanup while
i'm here.

16 years agoCheck for zero in drm_calloc() to prevent divide-by-zero. Also rearrange
oga [Wed, 13 Aug 2008 20:45:42 +0000 (20:45 +0000)]
Check for zero in drm_calloc() to prevent divide-by-zero. Also rearrange
the two calls to drm_calloc() that had nmemb and size the wrong way
around.

16 years agoKill file_priv->refs, it is always 1. Also move two things from the
oga [Wed, 13 Aug 2008 20:38:26 +0000 (20:38 +0000)]
Kill file_priv->refs, it is always 1. Also  move two things from the
softc into file_priv since otherwise the wrong value could rarely be
used.

16 years agoAdd VIDIOC_ENUM_FRAMESIZES ioctl. This permits applications to query the
mglocker [Wed, 13 Aug 2008 20:29:34 +0000 (20:29 +0000)]
Add VIDIOC_ENUM_FRAMESIZES ioctl.  This permits applications to query the
available formats and resolutions of a device (e.g. "luvcview -L").

16 years agoChange the drm_lock*() api to take a pointer to the struct as a
oga [Wed, 13 Aug 2008 20:27:58 +0000 (20:27 +0000)]
Change the drm_lock*() api to take a pointer to the struct as a
parameter, this makes things a little cleaner and removes the need to
pass in the softc for some functions.

16 years agoidgen32 wasn't really right here. Change back to how it was, but
oga [Wed, 13 Aug 2008 20:22:55 +0000 (20:22 +0000)]
idgen32 wasn't really right here. Change back to how it was, but
done a little nicer.

Advice from deraadt@.

16 years agoGenerate the magic id using idgen32(). While i'm here fix the locking a
oga [Wed, 13 Aug 2008 19:33:29 +0000 (19:33 +0000)]
Generate the magic id using idgen32(). While i'm here fix the locking a
bit so we don't sleep with a spinlock.

ok djm@.

16 years agoKill a bunch of the drm context code that nothing uses anymore, the
oga [Wed, 13 Aug 2008 19:30:11 +0000 (19:30 +0000)]
Kill a bunch of the drm context code that nothing uses anymore, the
xserver only actually uses a small part of it nowadays.

Kill a few other dead bits from the drmP.h while i'm here.

16 years agoInitial stab at a driver for the integrated random number generator of the
kettenis [Wed, 13 Aug 2008 19:30:02 +0000 (19:30 +0000)]
Initial stab at a driver for the integrated random number generator of the
UltraSPARC T2.

16 years agoone should never use sizeof(struct llc) since 802.2 LLC headers
damien [Wed, 13 Aug 2008 17:44:45 +0000 (17:44 +0000)]
one should never use sizeof(struct llc) since 802.2 LLC headers
have a variable length.  use LLC_SNAPFRAMELEN instead (which happen
to be equal to sizeof(struct llc)) as we only deal with LLC+SNAP
headers.

some indentation tweaks while i'm here.
no binary change.

16 years agodo not increment is_rx_eapol_key twice for each frame.
damien [Wed, 13 Aug 2008 17:38:02 +0000 (17:38 +0000)]
do not increment is_rx_eapol_key twice for each frame.
fix a test on the mbuf length and one on the descriptor version.
remove redundant checking of GTK KDE length.

16 years agosync synopsis/usage; fix double "usage:"; KNF.
sobrado [Wed, 13 Aug 2008 17:24:54 +0000 (17:24 +0000)]
sync synopsis/usage; fix double "usage:"; KNF.

16 years agoThis tab had bugged me forever.
weingart [Wed, 13 Aug 2008 16:01:08 +0000 (16:01 +0000)]
This tab had bugged me forever.

16 years agoDisable the fantastics mis-feature on some newer Turion CPUs called C1E.
art [Wed, 13 Aug 2008 15:46:21 +0000 (15:46 +0000)]
Disable the fantastics mis-feature on some newer Turion CPUs called C1E.
This "power saving" disables the apic when both cpu cores hit the hlt
instruction which kills our timer.

From FreeBSD.

(poked by kettenis)

16 years agoremove a bunch of bogus ARGSUSED
thib [Wed, 13 Aug 2008 15:45:30 +0000 (15:45 +0000)]
remove a bunch of bogus ARGSUSED

16 years agoDisable the fantastics mis-feature on some newer Turion CPUs called C1E.
art [Wed, 13 Aug 2008 15:44:44 +0000 (15:44 +0000)]
Disable the fantastics mis-feature on some newer Turion CPUs called C1E.
This "power saving" disables the apic when both cpu cores hit the hlt
instruction which kills our timer.

From FreeBSD.

16 years agoOld drives (reported Giovanni Bechis <bigionews@snb.it>) don't report CD-RW
av [Wed, 13 Aug 2008 12:21:19 +0000 (12:21 +0000)]
Old drives (reported Giovanni Bechis <bigionews@snb.it>) don't report CD-RW
write feature. Add additional check for media type before blanking.
The patch fixes problem for Giovanni.
ok fgsch

16 years ago-S currently does nothing useful, so remove it from
jmc [Wed, 13 Aug 2008 06:20:48 +0000 (06:20 +0000)]
-S currently does nothing useful, so remove it from
SYNOPSIS and usage(); after some discussion with canacar

16 years agoAdd more Config mode registers.
brad [Wed, 13 Aug 2008 03:59:16 +0000 (03:59 +0000)]
Add more Config mode registers.

From FreeBSD

16 years agoAdd the 8139D PCI id.
brad [Wed, 13 Aug 2008 03:47:16 +0000 (03:47 +0000)]
Add the 8139D PCI id.

16 years agoregen
brad [Wed, 13 Aug 2008 03:46:30 +0000 (03:46 +0000)]
regen

16 years agoAdd another PCI id for the Realtek 8139D chipset.
brad [Wed, 13 Aug 2008 03:45:55 +0000 (03:45 +0000)]
Add another PCI id for the Realtek 8139D chipset.

From FreeBSD

16 years agoReplace the use of a separate softc field to track the link
brad [Wed, 13 Aug 2008 03:18:19 +0000 (03:18 +0000)]
Replace the use of a separate softc field to track the link
state with the newly minted link flag in the softc's rl_flags
field.

Tested by fkr@

16 years agoKill dmesg spam. Since we can't guarantee that a device is capable of
oga [Tue, 12 Aug 2008 23:10:41 +0000 (23:10 +0000)]
Kill dmesg spam. Since we can't guarantee that a device is capable of
having a drm driver, don't print when we fail to attach one.

stops the "drm at vga? not supported" spam people are seeing.

16 years agoFix multiple addition error recently introduced for when extended partitions
deraadt [Tue, 12 Aug 2008 22:48:31 +0000 (22:48 +0000)]
Fix multiple addition error recently introduced for when extended partitions
are just before an OpenBSD partition in a MBR; done with kettenis & otto
ok reyk

16 years agoadopt the integrity group cipher of the AP at association time.
damien [Tue, 12 Aug 2008 20:07:13 +0000 (20:07 +0000)]
adopt the integrity group cipher of the AP at association time.

16 years agonuke unused fields.
damien [Tue, 12 Aug 2008 19:59:09 +0000 (19:59 +0000)]
nuke unused fields.

16 years agoadd the code to encrypt/decrypt management frames, retrieve key id
damien [Tue, 12 Aug 2008 19:56:59 +0000 (19:56 +0000)]
add the code to encrypt/decrypt management frames, retrieve key id
from MMIE etc...
this code can't be triggered as no drivers claim MFP capability yet.

16 years agoreserves the correct number of bytes in ieee80211_send_4way_msg2().
damien [Tue, 12 Aug 2008 19:51:19 +0000 (19:51 +0000)]
reserves the correct number of bytes in ieee80211_send_4way_msg2().

16 years agoclear Tx_Rx protection bits properly.
damien [Tue, 12 Aug 2008 19:50:39 +0000 (19:50 +0000)]
clear Tx_Rx protection bits properly.

16 years agodo not drop frames that have an invalid IE, just stop processing
damien [Tue, 12 Aug 2008 19:45:22 +0000 (19:45 +0000)]
do not drop frames that have an invalid IE, just stop processing
more IEs.

16 years agopopulate ieee80211_recv_action(), does nothing yet.
damien [Tue, 12 Aug 2008 19:42:37 +0000 (19:42 +0000)]
populate ieee80211_recv_action(), does nothing yet.

16 years agoadd a couple of new definitions (action frames, new subtypes for control
damien [Tue, 12 Aug 2008 19:40:13 +0000 (19:40 +0000)]
add a couple of new definitions (action frames, new subtypes for control
frames, new IEs etc...)

16 years agomissing SHA-256 bits.
damien [Tue, 12 Aug 2008 19:34:54 +0000 (19:34 +0000)]
missing SHA-256 bits.

16 years agov3 descriptors use AES Key Wrap too.
damien [Tue, 12 Aug 2008 19:34:35 +0000 (19:34 +0000)]
v3 descriptors use AES Key Wrap too.

16 years agonew SHA-256 based AKMPs.
damien [Tue, 12 Aug 2008 19:29:07 +0000 (19:29 +0000)]
new SHA-256 based AKMPs.

16 years agoadd/process group integrity cipher suite in RSN IEs.
damien [Tue, 12 Aug 2008 19:21:04 +0000 (19:21 +0000)]
add/process group integrity cipher suite in RSN IEs.
add support for MFP negotiation during association.

16 years agoadd IEEE80211_RSNIE_MAXLEN and IEEE80211_WPAIE_MAXLEN definitions
damien [Tue, 12 Aug 2008 19:05:39 +0000 (19:05 +0000)]
add IEEE80211_RSNIE_MAXLEN and IEEE80211_WPAIE_MAXLEN definitions
instead of hard-coding values.
for RSN IE, request space for Group Integrity Cipher Suite.

16 years agoadd support for EAPOL-Key v3 descriptors (similar to v2 except that the
damien [Tue, 12 Aug 2008 18:48:35 +0000 (18:48 +0000)]
add support for EAPOL-Key v3 descriptors (similar to v2 except that the
MIC is computed using AES-128-CMAC instead of HMAC-SHA1).
add a SHA-256 based key derivation function (not used yet).

16 years agothe only integrity group cipher currently supported is AES-128-CMAC.
damien [Tue, 12 Aug 2008 18:41:18 +0000 (18:41 +0000)]
the only integrity group cipher currently supported is AES-128-CMAC.

16 years agogenerate a random IGTK in HostAP mode if we're MFP-capable.
damien [Tue, 12 Aug 2008 18:37:23 +0000 (18:37 +0000)]
generate a random IGTK in HostAP mode if we're MFP-capable.

16 years agoadd IEEE80211_F_MFPR config flags (management frame protection required)
damien [Tue, 12 Aug 2008 18:30:56 +0000 (18:30 +0000)]
add IEEE80211_F_MFPR config flags (management frame protection required)
and IEEE80211_C_MFP capability bit (driver supports MFP).

16 years agoadd definitions for RSN capabilities field (RSN IE).
damien [Tue, 12 Aug 2008 18:30:02 +0000 (18:30 +0000)]
add definitions for RSN capabilities field (RSN IE).

16 years agoNuke bigmem for release, still has issues.
weingart [Tue, 12 Aug 2008 18:27:22 +0000 (18:27 +0000)]
Nuke bigmem for release, still has issues.

ok deraadt@

16 years agoAES Key Wrap adds a 64-bit MIC to the payload but we pad the content
damien [Tue, 12 Aug 2008 18:25:40 +0000 (18:25 +0000)]
AES Key Wrap adds a 64-bit MIC to the payload but we pad the content
of the frame so that it is a multiple of 8 bytes before encryption.
So we must reserve up to 15 bytes in the mbuf for the worst case, not 8.

16 years agoprocess IGTK KDEs in EAPOL-Key frames and install integrity group keys
damien [Tue, 12 Aug 2008 18:22:41 +0000 (18:22 +0000)]
process IGTK KDEs in EAPOL-Key frames and install integrity group keys
if MFP was negotiated with the peer (not possible yet).

16 years agoextend the ic_nw_keys[] array to 6 elements.
damien [Tue, 12 Aug 2008 18:01:41 +0000 (18:01 +0000)]
extend the ic_nw_keys[] array to 6 elements.
indices 0-3 will be used for group data keys while indices 4-5 will
be used for integrity group keys.
add a ic_rsngroupmgmtcipher field too.

16 years agoin a near future, unicast management frames will be encrypted/decrypted
damien [Tue, 12 Aug 2008 17:54:57 +0000 (17:54 +0000)]
in a near future, unicast management frames will be encrypted/decrypted
using CCMP.  use the right replay counter in this case.

16 years agoChange the way we process EAPOL-Key frames.
damien [Tue, 12 Aug 2008 17:53:13 +0000 (17:53 +0000)]
Change the way we process EAPOL-Key frames.
Free the mbuf in the ieee80211_eapol_key_input() function.
Do not assume the frame is contiguous, call m_pullup2() if it is not.
We need the frame to be contiguous to process KDEs efficiently in
EAPOL-Key frames (just like we process IEs in management frames).
However, there are drivers like upgt(4) that use m_devget() in the
RX path.  m_devget() can return fragmented mbuf chains.
Notice that we should do the same m_pullup2() for management frames.
This will be done later.
Remove the ic_recv_eapol callback.

16 years agoFigured out where the prom console routines are on KA60 and how to invoke
miod [Tue, 12 Aug 2008 17:23:21 +0000 (17:23 +0000)]
Figured out where the prom console routines are on KA60 and how to invoke
them, thanks to old ultrix bootblocks lying around.
Also, enable M-Bus clock on the I/O slot IOCSR, this unstucks the cpu
clocks (which really are implemented on the SSC on the I/O module, but
need to be controlled via the cpu's ``internal'' processor registers...)

16 years agoadd new IEEE80211_CIPHER_AES128_CMAC cipher and new key flag
damien [Tue, 12 Aug 2008 16:56:45 +0000 (16:56 +0000)]
add new IEEE80211_CIPHER_AES128_CMAC cipher and new key flag
IEEE80211_KEY_IGTK.
lot of cleanup while i'm here (indent function prototypes).
change license since this file was completely rewritten.

16 years agoWelcome BIP: the Broadcast/Multicast Integrity Protocol defined
damien [Tue, 12 Aug 2008 16:51:39 +0000 (16:51 +0000)]
Welcome BIP: the Broadcast/Multicast Integrity Protocol defined
in Draft IEEE P802.11w.
It provides data integrity and replay protection for broadcast/
multicast robust management frames (not used yet) using AES-128
in CMAC mode.

16 years agomaintain a count of TKIP and CCMP replayed frames.
damien [Tue, 12 Aug 2008 16:45:44 +0000 (16:45 +0000)]
maintain a count of TKIP and CCMP replayed frames.
some cleanup while i'm here.

16 years agouse correct byte order when printing state expiration minutes; ok henning@
david [Tue, 12 Aug 2008 16:40:18 +0000 (16:40 +0000)]
use correct byte order when printing state expiration minutes; ok henning@

16 years agoadd replay counter for management frames.
damien [Tue, 12 Aug 2008 16:33:38 +0000 (16:33 +0000)]
add replay counter for management frames.

16 years agofix values for QoS control field.
damien [Tue, 12 Aug 2008 16:24:24 +0000 (16:24 +0000)]
fix values for QoS control field.

16 years agoretrieve the TID from QoS frames to use with the appropriate
damien [Tue, 12 Aug 2008 16:21:46 +0000 (16:21 +0000)]
retrieve the TID from QoS frames to use with the appropriate
replay counter.

16 years agouse MINCLSIZE to decide wether we need to allocate an mbuf cluster instead
henning [Tue, 12 Aug 2008 16:14:45 +0000 (16:14 +0000)]
use MINCLSIZE to decide wether we need to allocate an mbuf cluster instead
of MLEM, damien ok

16 years agoget rid of the map_ptk()/map_gtk() functions, just inline them
damien [Tue, 12 Aug 2008 16:14:05 +0000 (16:14 +0000)]
get rid of the map_ptk()/map_gtk() functions, just inline them
which makes things easier to track.

16 years agosimplify ieee80211_derive_ptk() prototype.
damien [Tue, 12 Aug 2008 16:05:15 +0000 (16:05 +0000)]
simplify ieee80211_derive_ptk() prototype.
pass the AKMP so we can support other key derivation functions in the
future.

16 years agouse HMAC-MD5, HMAC-SHA1 and AES Key Wrap sys/crypto/
damien [Tue, 12 Aug 2008 15:59:40 +0000 (15:59 +0000)]
use HMAC-MD5, HMAC-SHA1 and AES Key Wrap sys/crypto/

16 years agotest vectors for HMAC-MD5, HMAC-SHA1, HMAC-SHA256, AES-128-CMAC,
damien [Tue, 12 Aug 2008 15:49:07 +0000 (15:49 +0000)]
test vectors for HMAC-MD5, HMAC-SHA1, HMAC-SHA256, AES-128-CMAC,
AES Key Wrap.

ok djm@

16 years agoImplementation of the HMAC-MD5, HMAC-SHA1, HMAC-SHA256, AES-128-CMAC
damien [Tue, 12 Aug 2008 15:43:00 +0000 (15:43 +0000)]
Implementation of the HMAC-MD5, HMAC-SHA1, HMAC-SHA256, AES-128-CMAC
and AES Key Wrap algorithms.
They will replace/extend the non-generic implementation in net80211.

AES-128-CMAC tested by sobrado@ (AlphaServer 1200),
naddy@ (alpha/sparc64) and sthen@ (sparc64, armish).
HMAC-* reviewed by hshoexer@

ok and hints from djm@

16 years agobasic bounds check on elf header info. avoid crashes on i.e.e truncated
otto [Tue, 12 Aug 2008 09:44:26 +0000 (09:44 +0000)]
basic bounds check on elf header info. avoid crashes on i.e.e truncated
kernels; noted by jasper@ ok miod@

16 years agoDon't process xfers which have the stream error bit set in the stream
mglocker [Tue, 12 Aug 2008 08:26:42 +0000 (08:26 +0000)]
Don't process xfers which have the stream error bit set in the stream
header.

16 years agoVT8233+ uses a different register base for capturing
jakemsr [Tue, 12 Aug 2008 06:50:16 +0000 (06:50 +0000)]
VT8233+ uses a different register base for capturing

from NetBSD.  fixes recording for kili@, martynas@ and me.