Commit Graph

19203 Commits

Author SHA1 Message Date
Warner Losh
68fc5ce70b Revert last junk... 2009-05-20 22:28:55 +00:00
Warner Losh
89c81b88f1 Revert junk from last commit. These are WIP and not ready (and don't
match the description of the last commit).
2009-05-20 22:00:39 +00:00
Warner Losh
9e31449738 Last commit was in error, revert. 2009-05-20 21:31:47 +00:00
Sam Leffler
5463c4a485 Overhaul monitor mode handling:
o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO
  and remove explicit bpf support from wireless drivers; drivers now
  use ieee80211_radiotap_attach to setup shared data structures that
  hold the radiotap header for each packet tx/rx
o remove rx timestamp from the rx path; it was used only by the tdma support
  for debugging and was mostly useless due to it being 32-bits and mostly
  unavailable
o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and
  per-com state when there are active taps
o track the number of monitor mode vaps
o use bpf tap and monitor mode vap state to decide when to collect radiotap
  state and dispatch frames; drivers no longer explicitly directly check
  bpf state or use bpf calls to tap frames
o handle radiotap state updates on channel change in net80211; drivers
  should not do this (unless they bypass net80211 which is almost always
  a mistake)
o update various drivers to be more consistent/correct in handling radiotap
o update ral to include TSF in radiotap'd frames
o add promisc mode callback to wi

Reviewed by:	cbzimmer, rpaulo, thompsa
2009-05-20 20:00:40 +00:00
Joel Dahl
498a9afee2 Slightly adjust copyright text.
Approved by:	matk
2009-05-20 18:38:43 +00:00
Joel Dahl
e05a128eb7 Remove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.
Approved by:	matk
2009-05-20 18:34:26 +00:00
Joel Dahl
4367b59545 Remove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD. 2009-05-20 18:31:11 +00:00
Joel Dahl
1d631ee69a Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of
uaudioreg.h in NetBSD.
2009-05-20 18:15:13 +00:00
Joel Dahl
ba55ca9732 Remove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD. 2009-05-20 18:04:56 +00:00
Warner Losh
00b4e54ae7 We no longer need to use d_thread_t, migrate to struct thread *. 2009-05-20 17:29:21 +00:00
Andrew Thompson
6f6932dc0b Use defines for register offsets that do not change.
Submitted by:	Hans Petter Selasky
2009-05-20 17:03:12 +00:00
Andrew Thompson
7eaa41aed8 - Add new register definitions
- Enable the controller and wait for the PLL to start

Submitted by:	Hans Petter Selasky
2009-05-20 17:00:55 +00:00
Andrew Thompson
b28838a861 The register shift is not needed on this controller.
Submitted by:	Hans Petter Selasky
2009-05-20 16:58:53 +00:00
Alexander Motin
74150c398a Fix NULL dereference on Promise SX4 controllers, while executing commands
that do not require data transfer (FLUSHCACHE).

Tested by:	Magnus Kling <klingfon@gmail.com>
MFC after:	1 week
2009-05-20 09:44:32 +00:00
Weongyo Jeong
e557e68088 try to unsetup USB xfers before calling ieee80211_ifdetach() to fix a
bug referencing a destroyed lock within TX callbacks during device
detach.

Submitted by:	hps (original version)
Tested by:	Lucius Windschuh <lwindschuh at googlemail.com>
2009-05-20 03:49:16 +00:00
Pyun YongHyeon
e32035ce1e pci(4) handles PCIM_CMD_INTxDIS so there is no need to poke this
bit in driver.
2009-05-20 03:33:27 +00:00
Sam Leffler
3f51a18229 correct HAL_INT_BNR comment, this bit is mapped directly the h/w now 2009-05-19 17:54:32 +00:00
Sam Leffler
210411e0f1 add TBTT interrupt support; this was added in Griffin so consumers should
check HAL_CAP_INTRMASK before using it

NB: didn't test 11n parts yet so supported only for 5212-class parts
2009-05-19 17:53:53 +00:00
Sam Leffler
00e602a997 minor cleanup 2009-05-19 17:43:31 +00:00
Sam Leffler
88608a2211 remove special handling for BNR; it is direct mapped to the harwdare so
can be added to HAL_INT_COMMON except on the 5210 where it doesn't exist
2009-05-19 17:35:15 +00:00
Sam Leffler
683f31342d add HAL_CAP_INTRMASK to return the set of interrupts supported by the device 2009-05-19 17:30:13 +00:00
Scott Long
7b6d3d4c7b Updated PCI ID's from the vendor 2009-05-19 01:41:11 +00:00
Marcel Moolenaar
dbb95048da Add cpu_flush_dcache() for use after non-DMA based I/O so that a
possible future I-cache coherency operation can succeed. On ARM
for example the L1 cache can be (is) virtually mapped, which
means that any I/O that uses temporary mappings will not see the
I-cache made coherent. On ia64 a similar behaviour has been
observed. By flushing the D-cache, execution of binaries backed
by md(4) and/or NFS work reliably.
For Book-E (powerpc), execution over NFS exhibits SIGILL once in
a while as well, though cpu_flush_dcache() hasn't been implemented
yet.

Doing an explicit D-cache flush as part of the non-DMA based I/O
read operation eliminates the need to do it as part of the
I-cache coherency operation itself and as such avoids pessimizing
the DMA-based I/O read operations for which D-cache are already
flushed/invalidated. It also allows future optimizations whereby
the bcopy() followed by the D-cache flush can be integrated in a
single operation, which could be implemented using on-chips DMA
engines, by-passing the D-cache altogether.
2009-05-18 18:37:18 +00:00
Warner Losh
f4fcd5ddec Remove unnecessary comments. 11A read/write is the same: its just the
classic indirect register dance.

Submitted by:	ddkprog at yahoo not com
2009-05-18 15:46:34 +00:00
Warner Losh
b16a8a5859 Fix a typo from the original driver. We need to write ctrl2 into RF
register 0x52, not ctrl1.  This appears to be a mistake in the bcm
reverse engineering page, and has been corrected there.  Tracing
through the code, this is more in keeping with the "documented"
register. Sephe thinks it looks interesting and may be worth
fixing. :)

Submitted by:	ddkprog at yahoo com
Reviewed by:	Sepherosa Ziehau
2009-05-18 15:31:26 +00:00
Pyun YongHyeon
a315e86aad Remove extra parenthesis used in macros. These macros are not used
in driver, though.
2009-05-18 07:13:42 +00:00
Pyun YongHyeon
056e0442f6 Consistently use tab characters instead of spaces. 2009-05-18 07:10:48 +00:00
Pyun YongHyeon
6f94c0fd17 style(9) 2009-05-18 07:04:03 +00:00
Pyun YongHyeon
3929ff51cf s/u_int8_t/uint8_t/g
s/u_int16_t/uint16_t/g
s/u_int32_t/uint32_t/g
2009-05-18 06:32:38 +00:00
Pyun YongHyeon
25d7155f3d style(9) - space after keyword. 2009-05-18 06:19:17 +00:00
Pyun YongHyeon
2da9a170c0 Remove return statement at the end of functions that return void. 2009-05-18 06:13:56 +00:00
Pyun YongHyeon
a13d350293 Remove trailling whitespaces. 2009-05-18 06:09:10 +00:00
Pyun YongHyeon
2cf2d79999 Remove register keyword. 2009-05-18 06:05:50 +00:00
Pyun YongHyeon
284c81cbcb Use ANSI C declarations for all functions. 2009-05-18 06:02:54 +00:00
Adrian Chadd
3a5391225b The merge in r189699 reverted part of the work done in a previous commit
(r188036.)

Re-revert that change so the Xen networking functions again.
2009-05-18 04:56:37 +00:00
Adrian Chadd
aa6aea0715 Disable some un-needed console debugging. 2009-05-18 04:50:31 +00:00
Xin LI
ab7b2d927c DMA synchronization fixes:
- In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of
   BUS_DMASYNC_POSTWRITE, as we want to "read" from the
   rx page chain pages.
 - Document why we need to do PREWRITE after we have updated
   the rx page chain pages.
 - In bce_intr(), use BUS_DMASYNC_POSTREAD and
   BUS_DMASYNC_PREREAD when before and after CPU "reading"
   the status block.
 - Adjust some nearby style mismatches/etc.

Pointed out by:	yongari
Approved by:	davidch (no objection) but bugs are mine :)
2009-05-18 01:51:52 +00:00
Warner Losh
e9902ec0a6 Correct types of PHY, per http://bcm-specs.sipsolutions.net/PHYVersioning
# Note: The driver doesn't support either these PHY types, so this is
# effectively a nop.

Submitted by:	"ddk"
Obtained from:	http://paradox.lissyara.su/bwi.diff
2009-05-18 01:07:38 +00:00
Warner Losh
e9d57f2fd1 Turns out that my BCM4318 has a PCI ID of 0x4319, which lead me to
believe it was a BCM4319.  However, it is the a/b/g variation of the
BCM4318.  The chip itself is labelled BCM4318EKFBG, and the board is
BCM94318MKABG.

Paradox's patch includes the type of 802.11 wireless for each card,
but changes all the names (I don't think the latter is quite right).
Import that part of the patch, but keep the current set of BCM names
(with a minor tweak for the 4306 ones). I'll need to verify them via
some other means.

Obtained from:	http://paradox.lissyara.su/bwi.diff (partially)
2009-05-18 01:00:11 +00:00
Sam Leffler
afb8a6b500 add TRENDnet TEW-504UB/EU
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:51:08 +00:00
Sam Leffler
f61336e4cb fix 11a channel use; mark OFDM operation correctly
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:46:50 +00:00
Christian Brueffer
f633d09533 Add a missing break in a switch statement.
Found with:	Coverity Prevent(tm)
CID:		4302
MFC after:	2 weeks
2009-05-15 21:06:28 +00:00
Warner Losh
b8f5836a3c The module name convention is foo, not if_foo. 2009-05-15 17:02:11 +00:00
Warner Losh
16dcc9ce77 Cleanup module declarations:
Use "bwi" consistently
	No need to have separate cardbus attachment
	No need to declare a module version
2009-05-15 16:38:42 +00:00
Ed Schouten
983d12f39b Turn consolectl into a simple device node, not a TTY.
Apart from the 16 virtual terminals, Syscons allocates two device nodes
that should not really be TTYs, even though they are. One of them is
consolectl. In RELENG_7 and before, these device nodes are used in
single user mode. After I simplified input path, we only use this device
node to call ioctl() on (moused, Xorg, vidcontrol).

When you call ioctl() on consolectl, it will behave the same as being
called on the first window.
2009-05-15 14:30:37 +00:00
Xin LI
9fe569d8f9 Some comment/space changes (FALLTHRU -> FALLTHROUGH, space after while). 2009-05-14 22:36:56 +00:00
Xin LI
25e13e6895 Try to workaround a race where bge_stop() may sneak in when bge_rxeof()
drops and re-grabs the softc mutex in the middle, resulting in kernel
trap 12.  This may happen when a lot of traffic is being hammered on
one bge(4) interface while the system is shutting down.

Reported by:	Alexander Sack <pisymbol gmail com>
PR:		kern/134548
MFC After:	2 weeks
2009-05-14 22:33:37 +00:00
John Baldwin
bb2aebf3ad - Add a void pointer to the ata-pci controller softc to allow
chipset-specific code to attach chipset-specific data.
- Use chipset-specific data in the acard and promise chipsets rather than
  changing the ivars of ATA PCI devices.  ivars are reserved for use by the
  parent bus driver and are _not_ available for use by devices directly.
  This fixes a panic during sysctl -a with certain Promise controllers with
  ACPI enabled.

Reviewed by:	mav
Tested by:	Magnus Kling (kingfon @ gmail) (on 7)
MFC after:	3 days
2009-05-14 14:57:13 +00:00
Christian Brueffer
3af3ff479b Compare the correct variable against NULL.
Reviewed by:	scottl
Found with:	Coverity Prevent(tm)
CID:		821
MFC after:	2 weeks
2009-05-14 13:32:33 +00:00
Kip Macy
8222d237cb Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit 2009-05-14 03:33:04 +00:00
Dag-Erling Smørgrav
e872228f51 Snip redundant assignment.
Approved by:	scottl
MFC after:	2 weeks
Coverity ID:	3863
2009-05-13 22:31:25 +00:00
Ed Schouten
aa16f86ca5 Keep this line shorter than 80 columns. 2009-05-13 19:29:50 +00:00
Oleksandr Tymoshenko
ecd6163338 - Make SPI bus bridge be non-arch dependent by using more generic
name

Reviewed by:	imp
2009-05-13 18:42:49 +00:00
Oleksandr Tymoshenko
ab88d607a5 - Remove nonexistent header file from includes list 2009-05-13 18:31:28 +00:00
Andrew Thompson
7261357fbc Ensure the bmRequestType is the right type for the incoming control request.
Submitted by:	Hans Petter Selasky
2009-05-13 18:26:55 +00:00
Andrew Thompson
8ea86e467f Add parenthesis around the xfer macro argument.
Submitted by:	Hans Petter Selasky
2009-05-13 18:25:14 +00:00
Andrew Thompson
ecf65ed434 Make sure collections have the usage field set.
Submitted by:	Hans Petter Selasky
2009-05-13 18:06:52 +00:00
Andrew Thompson
07532e4997 Check the correct variable for IO_NDELAY.
Submitted by:	Hans Petter Selasky
2009-05-13 18:05:40 +00:00
Andrew Thompson
c773c25419 Add debug lines for fullspeed and highspeed xfer completion.
Submitted by:	Hans Petter Selasky
2009-05-13 18:04:51 +00:00
Andrew Thompson
3a67e91430 Sync to P4
Add umass quirks for Alcor AU6390, Cypress PATA 6830XX and MPMan MPF400.

Submitted by:	Hans Petter Selasky
2009-05-13 18:03:23 +00:00
Andrew Thompson
f1f8840814 The transfer must return USB_ERR_CANCELLED when the device is gone due to the
way usb drivers work.

Submitted by:	Hans Petter Selasky
2009-05-13 17:58:37 +00:00
Nathan Whitehorn
8553eea5ce Add a comment to motivate my last change.
Suggested by:	sam, imp
2009-05-13 16:19:05 +00:00
Warner Losh
d47f0d75af ifp->if_softc is managed entirely by the driver. We never set it to
NULL or change it.  We initialize it before we set if_ioctl.  It can
therefore never be NULL, and most other drivers don't bother with this
sanity check.
2009-05-13 14:43:26 +00:00
Nathan Whitehorn
0a594d9ecc Add a short delay after programming PHY registers to give some time for
the engine to catch up. This prevents a machine check exception from
illegal memory requests with a BCM4318.
2009-05-13 14:25:55 +00:00
Christian Brueffer
e831cd36d0 Remove unused variables.
Found with:	Coverity Prevent(tm)
CID:		544, 545
2009-05-12 23:22:58 +00:00
Christian Brueffer
6282e61346 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		549
2009-05-12 19:33:36 +00:00
Christian Brueffer
75c4b82c36 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		550
2009-05-12 19:30:46 +00:00
Edward Tomasz Napierala
f095d54f01 Remove dead code.
Found with:	Coverity Prevent(tm)
CID:		556
2009-05-12 16:39:43 +00:00
Kip Macy
24df53962e fix bug introduced by last change
Submitted by:	Navdeep Parhar
2009-05-12 03:30:25 +00:00
Weongyo Jeong
922f7c5c21 Add WUSB54AG and XM142 entries for upgt(4) 2009-05-12 02:05:42 +00:00
Kip Macy
673d9d33eb don't acquire tty lock with console lock held 2009-05-11 23:03:15 +00:00
Kip Macy
94a24e4240 xen console lock needs to be a spin lock in case it is acquired from an interrupt context 2009-05-11 22:55:49 +00:00
Ed Schouten
7fb6f68587 Add macros around the sx operations in snp(4).
As an experiment, I changed snp(4) to use a mutex instead of an sx lock.
We can't enable this right now, because Syscons still picks up Giant.
It's nice to already have the framework there.
2009-05-11 18:52:46 +00:00
Warner Losh
d83d76df1f Update a few XXX comments
Submitted by:	ddk ddk ddkprog at yahoo dot com
2009-05-11 17:13:52 +00:00
Weongyo Jeong
879f0eff53 ports upgt(4) driver for USB2. 2009-05-11 02:39:49 +00:00
Marius Strobl
0ec607133b Change uses of the struct ccb_hdr timeout_ch missed when isp(4) was
adapted to MPSAFE cam(4) to a isp(4) specific callout structure.
Thanks to Florian Smeets for providing access to a machine exhibiting
this problem for debugging.

Approved by:	mjacob
MFC after:	3 days
2009-05-10 20:14:19 +00:00
Andrew Thompson
e1d2045e3f Abort any scan on a fatal firmware. ic_scan_curchan is overridden to perform
the scan in firmware and this relies on the firmware to wake up the scan task
on completion.
2009-05-10 02:44:19 +00:00
Sam Leffler
853569c6ec push wme parameter setting to the taskq thread; the update callback from
net80211 can happen from the ithread and submitting the fw cmd requires
a sleepable context
2009-05-09 19:22:37 +00:00
Warner Losh
ec54a3a337 Unmark the ASR Compat IOCTLs as BURN_BRIDGES, per scottl@ 2009-05-09 17:47:42 +00:00
David Christensen
8ef3f835d2 - Fixed incorrect packet length problem caused be earlier change to
support ZERO_COPY_SOCKETS.
- Created #define for context initialization retry count.

MFC after:	1 week
2009-05-08 22:20:45 +00:00
Andrew Thompson
b569d2132e Drain the tasks before the interface stop call in case a restart was queued. 2009-05-08 13:44:33 +00:00
Alexander Motin
6e8e2779b3 Add one more board ID with inverted external amplifier control.
PR:		kern/121156
2009-05-08 03:19:57 +00:00
Sam Leffler
b4307a77d2 kill more portability functions that are no longer useful 2009-05-08 00:23:00 +00:00
Sam Leffler
8ab663f305 kill unused OS_GETUPTIME 2009-05-08 00:15:27 +00:00
Alexander Motin
88413c6b88 Add ID of one more SII3132 revision found on adaptec aar-1225sa rev a2.
PR:		kern/127289
2009-05-07 19:17:06 +00:00
Philip Paeps
541bfd6180 Add PCI IDs for the Broadcom 5825 incarnation.
Submitted by:	Brian A. Seklecki <bseklecki -at- collaborativefusion.com>
MFC after:	1 day
2009-05-07 18:03:47 +00:00
Andrew Thompson
822e5d76f8 Use a 32 bit type for the interface mask as this equals the max interface
count.
2009-05-07 17:05:03 +00:00
Andrew Thompson
426909d969 Add the Sierra AC885U and increase the max ports to 8. 2009-05-07 02:17:09 +00:00
Andrew Thompson
e92a451510 - Fix the u3g port detection where it would not calculate the correct number of
ports when multiple interfaces are present.
- Claim all interfaces regardless of how many are attached
2009-05-07 02:15:58 +00:00
Andrew Thompson
a173706bbd Use vendor and product macro expansion to make the device table smaller and
more readable.
2009-05-07 02:13:56 +00:00
Sam Leffler
ab06fdf2a5 optimize ath_tx_findrix: there's no need to walk the rates table as
sc_rixmap is an inverse map

NB: could eliminate the check for an invalid rate by filling in 0 for
    invalid entries but the rate control modules use it to identify
    bogus rates so leave it for now
2009-05-07 00:35:32 +00:00
Sam Leffler
a8962181ad o cleanup checks for which vap combinations are permitted and what to
use for ic_opmode
o fixes the case where creating ahdemo+wds vaps caused ic_opmode to be
  set to hostap
2009-05-06 23:49:55 +00:00
Sam Leffler
a00b852cab add support for the Beacon Not Ready (BNR) interrupt
(available on 5211 and later)
2009-05-06 23:09:26 +00:00
Andrew Thompson
b9c81a5dce Make sure the frame list base address is re-programmed after stopping the USB
schedule, in case the hardware clears the frame list base address.

Submitted by:	Hans Petter Selasky
Reported by:	Chao Shin
2009-05-05 15:41:30 +00:00
Andrew Thompson
6b1bca02b9 Remove USB shutdown methods from device drivers as its the host controllers
responsibility to detach the bus.

PR:		usb/133896
Submitted by:	Hans Petter Selasky
2009-05-05 15:39:29 +00:00
Andrew Thompson
ec8f31275d Revert part of r191494 which used the udev state to mark suspending, this needs
to be set via two variables (peer_suspended and self_suspended) and can not be
merged into one.

Submitted by:	Hans Petter Selasky
Pointy hat:	me
2009-05-05 15:36:23 +00:00
Marko Zec
21ca7b57bd Change the curvnet variable from a global const struct vnet *,
previously always pointing to the default vnet context, to a
dynamically changing thread-local one.  The currvnet context
should be set on entry to networking code via CURVNET_SET() macros,
and reverted to previous state via CURVNET_RESTORE().  Recursions
on curvnet are permitted, though strongly discuouraged.

This change should have no functional impact on nooptions VIMAGE
kernel builds, where CURVNET_* macros expand to whitespace.

The curthread->td_vnet (aka curvnet) variable's purpose is to be an
indicator of the vnet context in which the current network-related
operation takes place, in case we cannot deduce the current vnet
context from any other source, such as by looking at mbuf's
m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc.  Moreover, so
far curvnet has turned out to be an invaluable consistency checking
aid: it helps to catch cases when sockets, ifnets or any other
vnet-aware structures may have leaked from one vnet to another.

The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
was a result of an empirical iterative process, whith an aim to
reduce recursions on CURVNET_SET() to a minimum, while still reducing
the scope of CURVNET_SET() to networking only operations - the
alternative would be calling CURVNET_SET() on each system call entry.
In general, curvnet has to be set in three typicall cases: when
processing socket-related requests from userspace or from within the
kernel; when processing inbound traffic flowing from device drivers
to upper layers of the networking stack, and when executing
timer-driven networking functions.

This change also introduces a DDB subcommand to show the list of all
vnet instances.

Approved by:	julian (mentor)
2009-05-05 10:56:12 +00:00
Alexander Motin
2500b6d96d Make dev.cpu.X.cx_usage sysctl also report current average of sleep time. 2009-05-03 06:25:37 +00:00
Alexander Motin
bb1d6ad5b3 Remove unused variable and fix spelling in comment. 2009-05-03 04:58:44 +00:00
Warner Losh
12e36acb09 Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for
Broadcom BCM43xx chipsets.  This driver uses the v3 firmware that
needs to be fetched separately.  A port will be committed to create
the bwi firmware module.

The driver matches the following chips: Broadcom BCM4301, BCM4307,
BCM4306, BCM4309, BCM4311, BCM4312, BCM4318, BCM4319

The driver works for 802.11b and 802.11g.

Limitations:
	This doesn't support the 802.11a or 802.11n portion of radios.
	Some BCM4306 and BCM4309 cards don't work with Channel 1, 2 or 3.
	Documenation for this firmware is reverse engineered from
		 http://bcm.sipsolutions.net/
	V4 of the firmware is needed for 11a or 11n support
		 http://bcm-v4.sipsolutions.net/
	Firmware needs to be fetched from a third party, port to be committed

# I've tested this with a BCM4319 mini-pci and a BCM4318 CardBus card, and
# not connected it to the build until the firmware port is committed.

Obtained from:	DragonFlyBSD, //depot/projects/vap
Reviewed by:	sam@, thompsa@
2009-05-03 04:01:43 +00:00
Alexander Motin
b0baaaaecf Avoid comparing negative signed to positive unsignad values. It was
leading to a bug, when C-state does not decrease on sleep shorter then
declared transition latency. Fixing this deprecates workaround for broken
C-states on some hardware.

By the way, change state selecting logic a bit. Instead of last sleep
time use short-time average of it. Global interrupts rate in system is a
quite random value, to corellate subsequent sleeps so directly.
2009-05-02 22:30:33 +00:00
Sam Leffler
04f19fd699 make superg/fast-frames state dynamically-allocated (and indirect off
the com structure instead of embedded); this reduces the overhead when
not configured and reduces visibility of the contents
2009-05-02 20:16:55 +00:00
Andrew Thompson
5efea30f03 Create a taskqueue for each wireless interface which provides a serialised
sleepable context for net80211 driver callbacks. This removes the need for USB
and firmware based drivers to roll their own code to defer the chip programming
for state changes, scan requests, channel changes and mcast/promisc updates.
When a driver callback completes the hardware state is now guaranteed to have
been updated and is in sync with net80211 layer.

This nukes around 1300 lines of code from the wireless device drivers making
them more readable and less race prone.

The net80211 layer has been updated as follows
 - all state/channel changes are serialised on the taskqueue.
 - ieee80211_new_state() always queues and can now be called from any context
 - scanning runs from a single taskq function and executes to completion. driver
   callbacks are synchronous so the channel, phy mode and rx filters are
   guaranteed to be set in hardware before probe request frames are
   transmitted.

Help and contributions from Sam Leffler.

Reviewed by:	sam
2009-05-02 15:14:18 +00:00
Alexander Motin
b1d1fff76c Improve kernel dumping reliability for busy ATA channels:
- Generate fake channel interrupts even if channel busy with previous
request to let it finish. Without this, dumping requests were just queued
and never processed.
 - Drop pre-dump requests queue on dumping. ATA code, working in dumping
(interruptless) mode, unable to handle long request queue. Actually, to get
coherent dump we anyway should do as few unrelated actions as possible.
2009-05-01 08:03:46 +00:00
Pyun YongHyeon
59dffaa088 Separate multicast filtering of SysKonnect GENESIS and Marvell
Yukon from common multicast handling code. Yukon uses hash-based
multicast filtering(big endian form) but GENESIS uses perfect
multicast filtering as well as hash-based one(little endian form).
Due to the differences of multicast filtering there is no much
sense to have a common code.
 o Remove sk_setmulti() and introduce sk_rxfilter_yukon(),
   sk_rxfilter_yukon() that handles multicast filtering setup.
 o Have sk_rxfilter_{yukon, genesis} handle promiscuous mode and
   nuke sk_setpromisc(). This simplifies ioctl handler as well as
   giving a chance to check validity of Rx control register of
   Yukon.
 o Don't reinitialize controller when IFF_ALLMULTI flags is changed.
 o Nuke sk_gmchash(), it's not needed anymore.
 o Always reconfigure Rx control register whenever a new multicast
   filtering condition is changed. This fixes multicast filtering
   setup on Yukon.

PR:	kern/134051
2009-05-01 03:24:03 +00:00
Andrew Thompson
6fca021096 We need to ref the bss node when sending the beacon since it goes through the
normal tx path and will be decremented on the mbuf free.
2009-04-30 22:30:01 +00:00
Jung-uk Kim
54b43614e7 Fix off-by-one bug. S5 state must be checked as well. 2009-04-30 18:00:53 +00:00
Jung-uk Kim
19682c4826 Fix style(9). 2009-04-30 17:45:43 +00:00
Jung-uk Kim
2d0c82e8cf Prefer device_printf() over printf() where ever possible. 2009-04-30 17:42:11 +00:00
Jung-uk Kim
a0e73a122d General sleep state change clean up.
- Probe supported sleep states from acpi_attach() just once and do not
call AcpiGetSleepTypeData() again.  It is redundant because
AcpiEnterSleepStatePrep() does it any way.
- Treat UNKNOWN sleep state as NONE, i.e., "do nothing", and remove obscure
NONE state (ACPI_S_STATES_MAX + 1) to avoid confusions.
- Do not set unsupported sleep states as default button/switch events.
If the default sleep state is not supported, just set it as UNKNOWN/NONE.
- Do not allow sleep state change if the system is not fully up and running.
This should prevent entering S5 state multiple times, which causes strange
behaviours later.
- Make sleep states case-insensitive when they are used with sysctl(8).
For example,

	sysctl hw.acpi.lid_switch_state=s1
	sysctl hw.acpi.sleep_button_state=none

are now legal and equivalent to the uppercase ones.
2009-04-30 17:35:44 +00:00
Alexander Motin
4c10f2e605 Add experimental support for SATA interface power management.
Feature is controlled by hint.ata.X.pm_level tunable:
 0 - PM disabled, old behaviour, default.
 1 - device is allowed to initiate PM state change, host is passive.
 2 - host initiates PARTIAL state transition every time port is idle.
 3 - host initiates SLUMBER state transition every time port is idle.

PARTIAL state has up to 100us (50us for me) wakeup latency, but for my
ICH8M saves 0.5W of power per drive. SLUMBER state has up to 10ms (3.5ms
for me) wakeup latency, but saves 0.8W of power.

Modes 2 and 3 are implemented only for AHCI driver now.

Interface power management is incompatible with device presence detection
(host receives no signal from drive, so unable to monitor it), so later is
disabled when PM is used.
2009-04-29 21:17:18 +00:00
Marius Strobl
db6bbcd2dc - Change some softc members to be unsigned where more appropriate.
- Add some missing const.
- Move the size of the window spun by the registers to the softc
  as neither using va_mem_size for this nor va_mem_base for the
  start of the bus addresses is appropriate.

MFC after:	1 week
2009-04-28 20:49:47 +00:00
Andriy Gapon
33c70d417e acpi: do not run resume/backout code when entering S0/S5 states
This change adds (possibly redundant) early check for invalid
state input parameter (including S0). Handling of S5 request
is reduced to simply calling shutdown_nice(). As a result
control flow of acpi_EnterSleepState is somewhat simplified
and resume/backout half of the function is not executed
for S5 (soft poweroff) request and invalid state requests.

Note: it seems that shutdown_nice may act as nop when initproc
is already initialized (to grab pid of 1), but init process is in
"pre-natal" state.

Tested by:	Fabian Keil <fk@fabiankeil.de>
Reviewed by:	njl, jkim
Approved by:	rpaulo
2009-04-28 11:56:54 +00:00
Kip Macy
8f781951eb fix typo in conditional 2009-04-27 23:43:28 +00:00
Kip Macy
b3e6cec7b3 collapse the two em_start_locked routines in to one 2009-04-27 22:55:48 +00:00
Kip Macy
bf541f371e simplify by removing dead code 2009-04-27 22:54:30 +00:00
Kip Macy
cb2ff24c38 remove dead code with reference to IFQ_HANDOFF 2009-04-27 22:53:35 +00:00
Jung-uk Kim
c39437eb46 Use cached progif instead of reading it again. 2009-04-27 21:45:05 +00:00
Jung-uk Kim
c6b8ee96f6 - Give generic AHCI driver lower priority than device-specific drivers.
- Consistently use BUS_PROBE_GENERIC instead of -100.
2009-04-27 21:34:15 +00:00
Jung-uk Kim
7267edac39 Reduce code duplication and excessive pci_get_slot() calls.
Reviewed by:	mav
2009-04-27 19:39:18 +00:00
Jack F Vogel
eb60d22100 Correct fat finger mistake 2009-04-27 18:35:06 +00:00
Jung-uk Kim
3388ca6b71 Reduce excessive pci_get_devid() and pci_get_revid() calls
on the same PCI device while device probing.
2009-04-27 18:10:42 +00:00
Jack F Vogel
aecaefee25 igb_txeof also has a case where the watchdog may not
get reset when it should be

MFC after: 2 weeks
2009-04-27 17:36:41 +00:00
Jung-uk Kim
f71ac6d60a - Always force AHCI mode on a ATI/AMD SB600/700/800 SATA controller. These
controllers may be configured as legacy IDE mode by modifying subclass and
progif without actually changing PCI device IDs.  Instead of complicating
code, we always force AHCI mode while probing.  Also we restore AHCI mode
while resuming per ATI/AMD register programming/requirement guides.
- Fix SB700/800 "combined" mode.  Unlike SB600, this PATA controller can
combine two SATA ports and emulate one PATA channel as primary or secondary
depending on BIOS configuration.  When the combined mode is disabled, this
channel disappears and it works just like SB600 PATA controller, however.
- Add more PCI device IDs for SB700/800 and adjust device descriptions.
SB800 shares the same PCI device IDs and added two more SATA IDs.
2009-04-27 17:29:51 +00:00
Andrew Gallatin
950f22e38d Fix build: Make forgotten IFNET_MULTIQUEUE to IFNET_BUF_RING
ifdef change.
2009-04-27 17:24:47 +00:00
Jack F Vogel
baf2572c76 Thanks for Michael Tuexen for tracking down a path where
the watchdog timer was not being rearmed in txeof, and also
a missing case in the new code.

MFC after:	2 weeks
2009-04-27 17:22:14 +00:00
Doug Ambrisko
a18c284294 Start to convert this over to the new tty layer. These changes allow
this driver to compile and limp along with the new layer.  These changes
do not deal with proper locking around access to the HW.  This is only
a starting point.  I have not tested modem control but tip seems to work
okay and I can send and receive characters which I needed for one of my
-current boxes.  I have not tied this driver back up to the build since
I don't want people to think it is ready for prime time.  If anyone
else has some cycles to work on this feel free to!

Also add support for a 16 port PCI interface I have at work.

Glanced at by:	ed
2009-04-27 15:58:38 +00:00
Andrew Gallatin
c6cb3e3fe8 Updates to mxge for multiple tx/rx rings:
- Update mxge to use if_transmit(), and the new buf_ring
  interfaces, so as to enable multiple transmit queues.
  Use of if_transmit() is conditional on IFNET_BUF_RING,
  and is enabled by default (as in if_em).

- Record a flow id on receive if receive hashing is active.
  I currently only record the rx ring id (0..8) rather than
  the 32-bit topelitz hash result, as doing the latter would
  require shifting the driver to use a larger rx return ring.

Sponsored by:  Myricom, Inc.
2009-04-27 15:45:54 +00:00
Ed Schouten
e439bf9ccc Remove unneeded device index from unit number.
We only use the unit number to determine whether we should rewind the
device upon closure.
2009-04-26 09:21:37 +00:00
Andrew Thompson
4d4fa6edd4 Make the state string descriptions public. 2009-04-25 21:25:52 +00:00
Andrew Thompson
bd21677868 Track the usb device state as its powered on, addressed and configured. This helps
to avoid touching the device when it is not going to respond and would otherwise
timeout.

Implement the suspend tracking as a udev state too.
2009-04-25 21:10:06 +00:00
Warner Losh
1c51765e41 Add Surecom EP-427X. 2009-04-24 17:28:12 +00:00
Warner Losh
a5a8a1c8fe Another PC Card that needs the CIS strings for the Surecom EP-427X,
which really is just a rebadged OEM card...  Plus a tiny whitespace
nit.
2009-04-24 17:27:45 +00:00
Kip Macy
1af1902295 fix typo 2009-04-23 21:27:06 +00:00
Kip Macy
4b4945b673 fix panic when using msix
Pointed out by Nate Whitehorn
2009-04-23 21:23:19 +00:00
Kip Macy
173ff3e204 Make sure the ALTQ case is handle correctly by using drbr_dequeue 2009-04-23 21:19:35 +00:00
Robert Watson
530ee5c971 Two ifnet misuse fixes for if_nve:
(1) Don't manually configure if_output(), ether_ifattach() will do that
    for us as part of link-layer setup.

(2) Call if_detach() before stopping nve in order to prevent calls into
    the device driver after the driver has started shutting down.

Reviewed by:	jhb
MFC after:	2 weeks
2009-04-23 19:29:45 +00:00
Andrew Thompson
459d369ee2 MFp4 //depot/projects/usb@160930
Change the roothub exec functions to take the usb request and data pointers
directly rather than placing them on the parent bus struct.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:16 +00:00
Andrew Thompson
c1911c1b7c MFp4 //depot/projects/usb@160708
Need to check Read/Write allowed before writing any data for non-control
transfers.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:13 +00:00
Andrew Thompson
672c9965ef MFp4 //depot/projects/usb@160706
Resolve possible device side mode deadlock by creating another thread.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:10 +00:00
Andrew Thompson
39063699e6 MFp4 //depot/projects/usb@160678
Remove unused field.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:07 +00:00
Andrew Thompson
9469c92974 MFp4 //depot/projects/usb@160655
Fix possible issue with clear-stall and set-config happening at the same time.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:04 +00:00
Andrew Thompson
88b4e0abcf MFp4 //depot/projects/usb@160614
Fix errornous printout.

Submitted by:	Hans Petter Selasky
2009-04-22 17:07:59 +00:00
Andrew Thompson
8ac0864630 MFp4 //depot/projects/usb@160485
Fix a bug in the USB power daemon code where connection of multiple HUBs in
series would result in incorrect device suspend.

Reported by:	Nicolas xxx@wanadoo.fr
Submitted by:	Hans Petter Selasky
2009-04-22 17:07:56 +00:00
Andrew Thompson
495f25cedc MFp4 //depot/projects/usb@160413
Use direct reference to parent high-speed HUB instead of indirect, due to
pointer clearing race at detach of parent USB HUB.

Reported by:	kientzle
Submitted by:	Hans Petter Selasky
PR:		usb/133545
2009-04-22 17:07:53 +00:00
Warner Losh
1d00d5ed3c A couple of older Melco cards that missed the transition to newcard 2009-04-22 16:51:01 +00:00
Warner Losh
9ca9ddabfd A couple of older Melco cards that missed the transition to newcard 2009-04-22 16:50:44 +00:00
Warner Losh
9ac15d8cea Add Billionton LNT10TB 2009-04-22 15:57:22 +00:00
Warner Losh
194842b5c3 Add Billionton LNT-10TB variant 2009-04-22 15:56:00 +00:00
Warner Losh
52641d220c Add a few more models of AMBICOM cards from data from linux driver and
pccard.conf.
2009-04-22 15:13:20 +00:00
Warner Losh
ffef988b76 Add AmbiCom AMB8002, AMB8010 (2 variants) and AMB8610. These were
inferred from data in the linux driver.
2009-04-22 15:11:27 +00:00
Warner Losh
eba0fd149d These were a placeholder and don't belong here. Remove them. 2009-04-22 15:01:08 +00:00
Warner Losh
ffed9ec58d Kill stray bootverbose debug tool.
Submitted by:	juli@
2009-04-22 06:33:26 +00:00
Warner Losh
31de65dd02 Turns out the code improvements I did for the TC5299J support were
anti-improvements and broke support for this part.  Revert the part of
the improvement at fault.
2009-04-22 06:30:24 +00:00
Stanislav Sedov
97958cafc8 - Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc"
respectivly. This will allow one to have a kernel with both devices
  present and use it for multiple boards with different types of RTC
  sitting on a bus.

Discussed with:	imp
2009-04-21 22:48:12 +00:00
Takanori Watanabe
450a309dfe Add another FTDI serial converter. 2009-04-21 05:06:31 +00:00
Pyun YongHyeon
2b574f3152 To make it easy whether xl(4) missed Tx completion interrupt check
number of queued packets in watchdog timeout handler. If there are
no queued packets just print a informational message and return
without resetting controller. Also fix to invoke correct Tx
completion handler as 3C905B needs different handler.
2009-04-21 00:42:11 +00:00
Pyun YongHyeon
ba65e0cc90 Clear IFF_DRV_OACTIVE flag if one of queued packets was transmitted.
Previously it used to clear the flag only when the transmit queue
is empty which may slow down Tx performance.
While I'm here check whether driver is running and whether we can
queue more packets in if_start handler. This fixes occasional
watchdog timeouts.

Reported by:	xer < xernet <> hotmail dot it >
Tested by:	xer < xernet <> hotmail dot it >
2009-04-21 00:34:31 +00:00
Stanislav Sedov
50aababbfb - Give a warning and start the oscillator if it was not previously
runned.
- Rename ds1672 -> rtc to follow the other drivers.
- Refactor/simplify the code a bit.

MFC after:	2 weeks
2009-04-20 15:47:06 +00:00
Warner Losh
98f751cd4b Sometimes we can call ed_detach() before the mtx has been initialized.
Avoid it if it hasn't been initialized.
2009-04-20 15:19:54 +00:00
Ed Schouten
2034e6a11f Make mse(4) use si_drv1, instead of using unit numbers.
Discussed with:	imp
2009-04-20 15:15:24 +00:00
Stanislav Sedov
219c5a5a96 - Unlock softc mutex on failure.
MFC after:	1 week
2009-04-20 13:15:25 +00:00
Stanislav Sedov
852761c216 - Properly unlock mutex on failure in channel_trigger. Before this
the function just returned with the mutex held.

MFC after:	1 week
2009-04-20 12:43:07 +00:00
Pyun YongHyeon
f2e491c9c5 For RTL8139C+ controllers, have controller handle padding short
checksum offload frames. Software workaround used for broken
controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog
timeouts on RTL8139C+.
Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding
feature of controller and set it for RTL8139C+ and controllers that
use new descriptor format. This fixes watchdog timeouts seen on
RTL8139C+.

Reported by:	Dimitri Rodis < DimitriR <> integritasystems dot com >
Tested by:	Dimitri Rodis < DimitriR <> integritasystems dot com >
2009-04-20 07:13:04 +00:00
Warner Losh
472dfd2aeb Cleanup resource allocation code a bit. Store the rids on the
resources rather than on the softc.  When we allocate resources for PC
Card, if we only get 16 ports, try again to get the others.
2009-04-20 01:19:59 +00:00
Robert Noland
8f6d3bf7a2 Don't try to setup interrupts for drivers that don't support them.
This causes sis and probably a couple of other driver to panic and fail.

Tested by:	cpghost <cpghost@cordula.ws>
PR:		133554
MFC after:	3 days
2009-04-19 16:54:33 +00:00
Ed Schouten
e78a5a3f2f Convert mlx(4) and mly(4) to si_drv1 instead of dev2unit(). 2009-04-18 07:36:38 +00:00
Warner Losh
77944b3551 Make sure that the data in the ROM with a valid signature isn't all
0's.  At least one PC Card ASIC does this...
2009-04-18 04:45:02 +00:00
Warner Losh
f2731d8565 Add GVP NIC 2000P and New Media Livewire. Also New Media LanSurfer
doesn't have a function type of network, so add a quirk for that...
2009-04-18 04:37:53 +00:00
Warner Losh
74677fb82b Establish the interrupt handler AFTER we successfully attach. We need
to do this in case we have a shared interrupt that fires during the
attach process....
2009-04-18 03:10:28 +00:00
Warner Losh
77a6714a6d Remove debug write accidentally left in. 2009-04-18 03:02:44 +00:00
John Baldwin
a28b3fc741 - Add a few more register defintions for the PCI express capability
registers.
- Cleanup PCI-X capability printf to not leave a dangling "supports" for
  some PCI-X bridges.
- Display additional PCI express details including the negotiated and max
  link width and the actual and maximum supported max payload.

MFC after:	1 month
2009-04-17 19:07:44 +00:00
Andrew Thompson
0c512ce8ee Drain the driver tasks on the same taskqueue in which they were enqueued. 2009-04-17 16:07:13 +00:00
Maksim Yevmenkin
018cd707c0 Prevent atkbd(4) interrupt handler from calling keyboard callback function
when polled mode is enabled. This should help with duplicated/missing
characters problem at mountroot, geli, etc. prompts on multi CPU systems
while kbdmux(4) is enabled.

Tested by:	Tobias Grosser <grosser -at- fim -dot- uni-passau -dot- de>
Tested by:	Fabian Keil <freebsd-listen -at- fabiankeil -dot- de>
MFC after:	3 days
2009-04-17 00:30:56 +00:00
Andrew Thompson
a0c4317cc2 Only call ieee80211_start_all() if its a 80211 device.
Submitted by:	Paul B. Mahol
2009-04-16 23:42:00 +00:00
Kip Macy
db90f94b85 call base if_qflush routine to flush if_snd 2009-04-16 23:08:02 +00:00
Kip Macy
279aa3d419 Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2

Reviewed by:	rwatson
2009-04-16 20:30:28 +00:00
Rafal Jaworowski
5817716faf mge(4): fix two bugs, which were leading to crash/hang under very heavy
network load.

1. Leave the RX interrupt routine if there is no mbuf available.

2. Properly initialize and track tx_desc_used_count counter so as not to
leak mbuf while traversing used descriptors.

Obtained from:	Semihalf
2009-04-16 11:38:06 +00:00
Rafal Jaworowski
bc26e2e38f Adjust Marvell Discovery (MV78xxx) support to recognize newest chip revisions,
handle Z0 revision (early silicon) explicitly due to its quirks.

Obtained from:	Marvell, Semihalf
2009-04-16 11:20:18 +00:00
Robert Watson
6cf6d55734 Garbage collect unbuildable and unusable non-MPSAFE network device
drivers that depended on the historic IFF_NEEDSGIANT compatibility
mechanism:

  ar(4)
  ray(4)
  sr(4)

Discussed on:	arch@
2009-04-16 11:09:13 +00:00
Marius Strobl
ecbd3f3a29 Fix whitespace. 2009-04-14 20:51:58 +00:00
Marius Strobl
f880062633 - Remove the second license as I'm also fine with the first one.
- Remove redundant softc members for RIDs.
- Change some softc members to be unsigned where more appropriate.
- Add some missing const.
- Remove support for mmap(2)'ing VGA I/O as it was broken [1] and
  not required by X.Org anyway.
- Fix some confusion between bus, physical and virtual addresses
  which mostly consisted in using members of struct video_adapter
  inappropriately but wasn't fatal except for the regular framebuffer
  mmap(2)'ing.
- Remove redundant bzero(9)'ing of the softc.
- Don't map the framebuffer twice in case the firmware has already
  mapped it as besides wasting resources this isn't possible with
  all MMUs. This is a bit tricky as a) just because the firmware
  provides a property with a virtual address doesn't mean it's
  actually mapped (but typically is when the framebuffer is the
  console) and b) the firmware doesn't necessarily map the it with
  the same byteorder as we do. This make machfb(4) work on machines
  with cheetah-class MMUs (including X.Org).

Reported by:	Michael Plass [1]
MFC after:	3 days
2009-04-14 20:23:47 +00:00
Marius Strobl
6c9f0f2124 Fix whitespace. 2009-04-14 19:11:02 +00:00
John Baldwin
bfee0576cb - Consolidate duplicated code for reading and sizing BARs and writing base
addresses to BARs into new pci_read_bar() and pci_write_bar() routines.
  pci_add_map(), pci_alloc_map(), and pci_delete_resource() now use these
  routines to work with BARs.
- Just pass the device_t for the new PCI device to various routines instead
  of passing the device, bus, slot, and function.

Reviewed by:	imp
2009-04-14 18:32:37 +00:00
Jack F Vogel
b3096a0430 Thanks to Michael Tuexen and Randall Scott for providing a
few important bug fixes found while they were doing SCTP
development, and that I somehow lost during the scramble.

Thanks guys!!
2009-04-14 17:14:35 +00:00
Ed Schouten
0de5b9b0f0 Use si_drv1 instead of dev2unit() in twe(4) and twa(4)
Reviewed by:	scottl
2009-04-14 14:02:43 +00:00
Ed Schouten
9078597210 Use si_drv1 instead of dev2unit() in powermac_nvram.
Reviewed by:	nwhitehorn
2009-04-14 13:18:39 +00:00
Ed Schouten
b7d9e67c45 Use si_drv1 instead of dev2unit() inside agp(4).
Reviewed by:	rnoland
2009-04-14 13:11:34 +00:00
Ed Schouten
9555aafab2 Let tdfx(4) use si_drv1 instead of using dev2unit(). 2009-04-14 11:57:26 +00:00
Ed Schouten
9ef0e425f3 Use si_drv1 to store joy(4)'s softc.
There are still some calls to dev2unit() left, but I guess we should
take care of those another time.
2009-04-14 11:23:09 +00:00
Kip Macy
f2502470b5 - define em_transmit and em_qflush
- make buF_ring usage conditional but enabled by default

Reviewed by:	jfv
2009-04-14 03:36:59 +00:00
Warner Losh
f133918640 Another NE-2000 clone. The GVC NIC-2000P Ethernet adapter. Based on
the MN5017 chipset.  There's no vendor/product pair on this card, so
it needs to be matched by the CIS strings.
2009-04-14 03:13:05 +00:00
Sam Leffler
19ea87c42b o eliminate a << in calculating the tx time for turbo mode by pre-multiplying
data in the phy tables
o correct the ctrl rate indices in the 5212 turbog phy table
2009-04-13 21:01:08 +00:00
Sam Leffler
e40b6ab1cf don't use caddr_t to match ieee80211_dump_pkt type; supplying the correct
one costs nothing
2009-04-13 20:58:47 +00:00
Sam Leffler
040972a18b o fix dynamic slave-side tdma slot length updating: we need to re-setup the
burst length in the tx q's
o remove re-config of the beaconq on update; it's not needed
2009-04-13 20:57:34 +00:00
Sam Leffler
5e86169a67 add a debug msg for when a fixed transmit rate is not applied because
it's not found in the sta's negotiated rate set
2009-04-13 20:54:08 +00:00
Sam Leffler
89047529ac remove reference to sc_tdmabintcnt; it was removed in r190848 2009-04-13 03:20:21 +00:00
Pyun YongHyeon
0685c824ca Don't blindly set IP packet length from interface MTU in TSO case.
Remote host can advertise smaller MSS than that of sender so upper
stack might have adjusted the MSS which in turn generates IP
packets that are less size than that of interface MTU.

Reported by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
Tested by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
MFC after:	3 days
2009-04-13 00:32:34 +00:00
Robert Watson
78b5071407 Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel.  This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.

MFC after:	3 days
2009-04-11 22:07:19 +00:00
Warner Losh
e89da24b3d Two refinements to the 3c1 support:
1) Flag it and only access that command on the 3c1
2) The TX PLL appears to power down when not in use, so we have to power
   it back up when we've been idle.  Do this at the start of ifstart.
   Otherwise we fall off the net.
2009-04-11 04:30:38 +00:00