Commit Graph

45986 Commits

Author SHA1 Message Date
ru
2c8925549a Fixed a few bugs in the rl(4) driver:
Under polling(4), we counted non-existent output packets and wasted
CPU cycles, corrected.  (PR kern/64975.)

The fix in revision 1.71 to correct resetting of the watchdog timer
was wrong.

In rl(4), the TX list does not have a gap between the consumer and
producer, so the "empty TX list" test was wrong, corrected.

Also, resetting the timer to five each time we know there is still
some TX work to do was a bad idea -- under polling(4), if the chip
goes out to lunch, this results in the watchdog routine to _never_
be called.  Instead, let the timer downgrade to zero and fire the
watchdog, then reset it to five when it is zero AND there is some
TX work left.  (Most other network drivers need this fix too.)

MFC after:	3 days
2004-04-03 00:42:33 +00:00
sam
5964f2843d do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from:	madwifi
2004-04-03 00:06:23 +00:00
sam
414d361a59 transmit beacon frames directly instead of defering them to a swi; there
was too much delay

Obtained from:	madwifi
2004-04-03 00:02:17 +00:00
sam
5ae38352b4 update copyright notice for 2004 2004-04-02 23:57:10 +00:00
sam
5168b1a621 add new statistics
Obtained from:	madwifi
2004-04-02 23:55:45 +00:00
sam
055dd66470 check more quickly (and directly) if an interrupt is pending; this reduces
work done in ath_intr when the irq is shared

Obtained from:	madwifi
2004-04-02 23:49:15 +00:00
sam
17ec9b5d07 cleanup descriptor allocation if attach fails
Obtained from:	madwifi
2004-04-02 23:47:39 +00:00
sam
3711f03aee remove use IEEE80211_C_RCVMGT 2004-04-02 23:37:00 +00:00
ru
84002c9d9a Performance tuning.
Moved the RX ring resyncing code to ste_rxeoc(), and only run it
if we were asked to POLL_AND_CHECK_STATUS, under DEVICE_POLLING.
(This significantly reduces the CPU load.)

Improved the RX ring resyncing code by re-checking if the head
is still empty before doing resyncing.  This mostly affects the
DEVICE_POLLING mode, where we run this code periodically.  We
could start checking with an empty head (well, an empty ring
even), and after doing a few iterations, the chip might write
a few entries, including the head, and we would bogusly consider
this case as requiring resyncing.  On a test box, this reduced
the number of resyncs done by a factor of 10.

In ste_txeof(sc), only reset the watchdog timer to zero when
the TX list is completely empty.

Converted ste_tx_prev_idx to a pointer -- faster.

Removed some bitrot.
2004-04-02 23:36:49 +00:00
sam
0a58f658fe Change handling of probe response frames. Previously we always dropped the
refcnt on the node but left it in the node table.  This allows the node table
to hold the results of scanned ap's but for ibss scans left nodes w/o any
driver-private state setup and/or a bad refcnt (when the nodes were timed
out they were prematurely discarded).  Now we treat nodes identified for ap
scanning as before but force nodes discovered when scanning for ibss neighbors
to have complete/proper state and hold the refcnt on the node.  Any other
nodes created because of these frames are discarded directly (need to optimize
this case to eliminate various work that's immediately discarded).
2004-04-02 23:35:24 +00:00
sam
b024266b89 fix adhoc/ibss operation for drivers that require host support (e.g. ath):
o remove IEEE80211_C_RCVMGT capability
o on transmit craft new nodes as needed using new ieee80211_find_txnode routine
o add ieee80211_find_txnode routine to lookup a node by mac address and
  if not present create one when operating in ibss/ahdemo mode; new nodes
  are dup'd from bss and the driver is told to treat the node as if a new
  association has been created so driver-private state (e.g. rate control
  handling) is setup

Obtained from:	netbsd (basic idea)
2004-04-02 23:25:39 +00:00
sam
5c586165c7 always free node reference when processing a probe request frame; was
conditionally doing an unref if operating in adhoc mode which turns
out to be wrong
2004-04-02 23:12:45 +00:00
sam
a1be64a6dc o change ieee80211_dup_bss to inherit explicit data from ic_bss instead of
blindy copying the node contents; this turns out to be a bad idea as we
  add more state in the node for things like WPA
o track node allocation failures in ieee80211_dup_bss instead of the callers

Obtained from:	madwifi
2004-04-02 23:09:24 +00:00
sam
32d170b4b8 track node allocation failure stats in ieee80211_alloc_node instead
of each caller

Obtained from:	madwifi
2004-04-02 23:06:41 +00:00
sam
ddc6548865 replace explicit malloc/free with MALLOC/FREE for portability
Obtained from:	madwifi
2004-04-02 23:02:24 +00:00
sam
aaa98f8e29 extract node matching logic into new ieee80211_match_bss routine for use
in background/incremental scanning

Obtained from:	madwifi
2004-04-02 23:00:30 +00:00
sam
ac53a5bdcf diff reduction against madwifi 2004-04-02 22:56:09 +00:00
sam
f57cb8d81b when processing beacon/probe response frames capture "is probe" in a
variable to improve code legibility since we're going to use it more
in forthcoming mods

Obtained from:	madwifi
2004-04-02 22:54:07 +00:00
sam
41b9a21d19 add a case of IEEE80211_ELEMID_IBSSPARMS so the statistic on unknown
elements is more meaningful (will add more with WPA merge)

Obtained from:	madwifi
2004-04-02 22:50:31 +00:00
sam
b9a1b7eda9 when doing internal bridging free the node instead of just dropping the
reference for consistency (explicit refcounting is discouraged)

Obtained from:	madwifi
2004-04-02 22:48:52 +00:00
sam
ca926004a9 when receiving a frame w/ a bad version number don't unref the node; the
driver is responsible for that

Obtained from:	madwifi
2004-04-02 22:47:11 +00:00
sam
4cfcf755a1 insure basic rate bit is set in derived rate set; this
works around a protocol/firmware problem with some versions found
in hermes/prism cards
2004-04-02 20:22:25 +00:00
sam
d007eaede6 diff reduction against madwifi/p4 2004-04-02 20:19:20 +00:00
vkashyap
688833918a Moved 3ware 9000 driver (twa) stuff from sys/conf/NOTES to /sys/i386/conf/NOTES. 2004-04-02 18:50:56 +00:00
deischen
a883ccc958 Unbreak natd.
Reported and submitted by:	Sean McNeil (sean at mcneil.com)
2004-04-02 17:57:57 +00:00
des
7cbcc08c5c style(9): return foo -> return (foo)
also fix a continuation indent I missed in the previous commit.
2004-04-02 16:41:16 +00:00
des
152e8e98c0 Clean up whitespace, fix continuation indents, wrap some long lines. 2004-04-02 16:39:12 +00:00
des
6525acc5b4 Unbreak LINT on 64-bit platforms. Note that this code is not style(9)-
compliant, but I'll leave that for someone else.

Noticed by:	tinderbox
Pointy hat to:	the usual suspects
2004-04-02 15:09:57 +00:00
kensmith
9edf249385 Rearrangements needed for syscons(4) to be used as a console device
on architectures that need to call cninit() before the machine is
ready to support mutexes (required by make_dev()).

	- Remove make_dev() call from scinit() when flags indicate
	  unit is the system console, rely on sc_attach_unit() to
	  handle it.
	- When trying to access current screen's status (scr_stat
	  structure) use the static one provided for the initial
	  system console if no dev_t is available.
	- When calling make_dev() in sc_attach_unit() catch special
	  case of system's initial console and set up dev_t structure
	  to include pointer to console's scr_stat struct.

Reviewed by:	marcel
Tested by:	marcel, grehan (ppc), others on current@
Approved by:	rwatson (mentor)
2004-04-02 15:02:44 +00:00
marcel
8ca527be93 In ns8250_putc() insert a barrier between writing the character and
checking for transmitter empty.
2004-04-02 07:37:28 +00:00
marcel
89d7668839 Allow the selection of a debug port with hw.uart.dbgport. Unlike
other architectures (like ia64), the variable has to be set to
an OpenFirmware device name.
2004-04-02 07:33:35 +00:00
marcel
62439c4680 Call kbd_attach() only when KBD_INSTALL_CDEV is enabled as the function
is only defined in that case.
2004-04-02 05:59:06 +00:00
kris
90df1ff5bf Add missing comment terminator. 2004-04-02 04:57:40 +00:00
julian
89d6572b1f The comment complained about not having a thread_unlink()
and did the work itself, but thread_unink() has existed for a while... use it.
2004-04-02 01:01:34 +00:00
rwatson
3e726bfc8b For now, restore an splx(s) I removed when introducing slisunitfree(). 2004-04-01 23:54:49 +00:00
alfred
75da059c11 Fix booting with ps2 keyboards. 2004-04-01 21:48:31 +00:00
jhb
03d6afada4 Finish fixing up Alpha to work with an MP safe ptrace():
- ptrace_single_step() is no longer called with the proc lock held, so
  don't try to unlock it and then relock it.
- Push Giant down into proc_rwmem() instead of forcing all the consumers
  (including Alpha breakpoint support) to explicitly wrap calls to
  proc_rwmem() with Giant.

Tested by:	kensmith
2004-04-01 20:56:44 +00:00
julian
d03618b7cd Do the looping retry trick in the first operation to try to talk
with the device, not the second..

Submitted by: ticso@cicely12.cicely.de
2004-04-01 18:55:28 +00:00
des
92346f2366 Fix style issues in twa lines added in rev 1.878. 2004-04-01 17:55:50 +00:00
des
5f33564dc8 Comment out the au88x0 line which was inadvertantly included in the
previous commit.
2004-04-01 17:53:04 +00:00
nyan
ee1f5105c1 The twa device and related options are not needed. 2004-04-01 14:23:41 +00:00
suz
d551783211 UDP checksum is mandatory in IPv6 (RFC2460 p.28)
Obtained from: KAME
2004-04-01 13:48:23 +00:00
ru
b42d9c38ac Moved the statistical counter under hw.ste.rxsyncs.
Suggested by:	njl
2004-04-01 12:55:38 +00:00
des
5710c4d92e Move twa from files.i386 to files. This unbreaks LINT on !i386.
Pointy hat to:	vkashyap, ps
2004-04-01 10:02:50 +00:00
des
3a1cc3c9f5 Back out 1.188 (major number for twa). The twa driver does not need it.
Pointy hat to:	ps
2004-04-01 10:00:04 +00:00
grehan
d768acf3fe Match the specific MPC106 host bridge PCI ID rather than all
generic host bridges: this avoids a race with the UniNorth
generic match.
2004-04-01 07:34:36 +00:00
scottl
7996fbe9e3 Don't print out 'GIANT-LOCKED' for INTR_FAST drivers. 2004-04-01 07:18:42 +00:00
njl
d976b2d5bf Move the ivar accessing routines back to inlines (reverting acpivar.h
rev 1.44 and acpi.c rev 1.96).  Now gcc can handle larger inlines and we
really need external drivers to be able to read their acpi ivars.
2004-04-01 04:21:33 +00:00
grehan
1101a7ee87 Move the name attribute to the end of the conftxt line to simplify
libdisk parsing (the name may be empty, or contain spaces).

Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-04-01 01:33:37 +00:00
sam
bae4e38c19 radiotap updates:
o force little-endian byte order for header
o pad header to 32-bit boundary to guard against applications that assume
  packet data alignment
2004-04-01 00:38:45 +00:00