]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoPrefer NULL to 0 when checking pointer values as integers or booleans.
rwatson [Mon, 5 Apr 2004 00:49:07 +0000 (00:49 +0000)]
Prefer NULL to 0 when checking pointer values as integers or booleans.

20 years agoRemove unused arguments from pmap_init().
alc [Mon, 5 Apr 2004 00:37:50 +0000 (00:37 +0000)]
Remove unused arguments from pmap_init().

20 years agoEliminate unused arguments from vm_page_startup().
alc [Sun, 4 Apr 2004 23:33:36 +0000 (23:33 +0000)]
Eliminate unused arguments from vm_page_startup().

20 years agofreebsd.org -> FreeBSD.org
phantom [Sun, 4 Apr 2004 21:33:16 +0000 (21:33 +0000)]
freebsd.org -> FreeBSD.org

20 years agoRename internal structure to fix cut & paste error.
archie [Sun, 4 Apr 2004 21:33:09 +0000 (21:33 +0000)]
Rename internal structure to fix cut & paste error.

Submitted by: Bjoern A. Zeeb <bzeeb+freebsd@zabbadoz.net>
MFC After: 3 days

20 years agoThe list of (key,value) pairs to request_init is terminated by a 0 key,
dwmalone [Sun, 4 Apr 2004 21:32:23 +0000 (21:32 +0000)]
The list of (key,value) pairs to request_init is terminated by a 0 key,
not NULL.

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
MFC after: 3 days

20 years agoCast the terminating NULL to char * in the execl() call.
mux [Sun, 4 Apr 2004 20:53:23 +0000 (20:53 +0000)]
Cast the terminating NULL to char * in the execl() call.

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>

20 years agoCalculate bio_completed properly or die!
pjd [Sun, 4 Apr 2004 20:37:28 +0000 (20:37 +0000)]
Calculate bio_completed properly or die!

Approved by: phk

20 years agoFix a panic possibility caused by returning without releasing locks.
pjd [Sun, 4 Apr 2004 20:14:55 +0000 (20:14 +0000)]
Fix a panic possibility caused by returning without releasing locks.
It was fixed by moving problemetic checks, as well as checks that
doesn't need locking before locks are acquired.

Submitted by: Ryan Sommers <ryans@gamersimpact.com>
In co-operation with: cperciva, maxim, mlaier, sam
Tested by: submitter (previous patch), me (current patch)
Reviewed by: cperciva, mlaier (previous patch), sam (current patch)
Approved by: sam
Dedicated to: enough!

20 years agoAdd FBSDID. Use getopt(3).
charnier [Sun, 4 Apr 2004 19:46:14 +0000 (19:46 +0000)]
Add FBSDID. Use getopt(3).

20 years agoAdd FBSDID. err(3) changed to errx(3) because there is no errno message
charnier [Sun, 4 Apr 2004 19:38:08 +0000 (19:38 +0000)]
Add FBSDID. err(3) changed to errx(3) because there is no errno message
to print in this context.

20 years ago2 small typos.
charnier [Sun, 4 Apr 2004 19:30:07 +0000 (19:30 +0000)]
2 small typos.

20 years agoDo not :-terminate err(3) string, one will be added anyway.
charnier [Sun, 4 Apr 2004 19:25:39 +0000 (19:25 +0000)]
Do not :-terminate err(3) string, one will be added anyway.

20 years agoSpell 2 as SHUT_RDWR when used as an argument to soshutdown().
rwatson [Sun, 4 Apr 2004 19:24:08 +0000 (19:24 +0000)]
Spell 2 as SHUT_RDWR when used as an argument to soshutdown().

20 years agoBe consistant while reporting error conditions.
charnier [Sun, 4 Apr 2004 19:17:38 +0000 (19:17 +0000)]
Be consistant while reporting error conditions.

20 years agoDetatch incorrect spellings of detach.
rwatson [Sun, 4 Apr 2004 19:15:45 +0000 (19:15 +0000)]
Detatch incorrect spellings of detach.

20 years agoExplicitly compare pointers with NULL rather than treating a pointer as
rwatson [Sun, 4 Apr 2004 19:13:35 +0000 (19:13 +0000)]
Explicitly compare pointers with NULL rather than treating a pointer as
a boolean directly, use NULL instead of 0.

20 years ago - Use the proper constant in sched_interact_update(). Previously,
jeff [Sun, 4 Apr 2004 19:12:56 +0000 (19:12 +0000)]
 - Use the proper constant in sched_interact_update().  Previously,
   SCHED_INTERACT_MAX was used where SCHED_SLP_RUN_MAX was needed.  This was
   causing the interactivity scaler to lose history at a more dramatic rate
   than intended.

20 years agoAdd FBSDID. Use %ld to printf(3) a long (even if the number is small).
charnier [Sun, 4 Apr 2004 19:11:01 +0000 (19:11 +0000)]
Add FBSDID. Use %ld to printf(3) a long (even if the number is small).

20 years agoAdd FBSDID. Do not dot terminate errx(3) string.
charnier [Sun, 4 Apr 2004 18:56:53 +0000 (18:56 +0000)]
Add FBSDID. Do not dot terminate errx(3) string.

20 years agoDrop the include of <stdint.h>, since r1.84 removed references of intmax_t.
gad [Sun, 4 Apr 2004 17:43:48 +0000 (17:43 +0000)]
Drop the include of <stdint.h>, since r1.84 removed references of intmax_t.

20 years agoAdd back the `-e' option, which was mistakenly dropped when cleaning
gad [Sun, 4 Apr 2004 17:15:44 +0000 (17:15 +0000)]
Add back the `-e' option, which was mistakenly dropped when cleaning
up the PS_ARGS string in revision 1.69 (and which was apparently not
missed by anyone...).

20 years agoPut a bunch of output that us really only useful in a debug
markm [Sun, 4 Apr 2004 16:36:21 +0000 (16:36 +0000)]
Put a bunch of output that us really only useful in a debug
scenario into #ifdef DEBUG. This makes my cluster with Belkin
KVM switch completely usable, even if the KVM switch and mouse
get a bit confused sometimes.

Without this, when the mouse gets confused, all sorts of crud
gets spammed all over the screen. With this, the mouse may appear
dead for a second or three, but it recovers silently.

20 years agowww.freebsdmirrors.org -> mirrorlist.freebsd.org
phantom [Sun, 4 Apr 2004 16:20:02 +0000 (16:20 +0000)]
www.freebsdmirrors.org -> mirrorlist.freebsd.org

20 years agoAdd a workaround.
pjd [Sun, 4 Apr 2004 13:32:00 +0000 (13:32 +0000)]
Add a workaround.
Now, if we have for example: ad0s1 ad0s1c ad2s1 ad2s1c and we will try
to do: gconcat label foo /dev/ad0s1 /dev/ad2s1 we'll get a panic:
panic: spoiled but dcr = 1
for inside of geom_slice class, backtrace shows:
g_access()
g_slice_access()
g_access()
g_concat_read_metadata()
We need to get a proper fix for this race before geom(8) will be committed.

20 years ago- Use an ihandle_t to store the stdout instance handle instead of a
tmm [Sun, 4 Apr 2004 12:52:22 +0000 (12:52 +0000)]
- Use an ihandle_t to store the stdout instance handle instead of a
  phandle_t. Since both are typedefed to unsigned int, this is more
  or less cosmetic.
- Fix the code that determines whether a creator instance was used
  for firmware output (and should not be blanked on initialization).
  Since r1.2 of dev/fb/creator.c, this consisted comparing a handle of
  an instance of a package with a handle of the package itself.
  Use the test from r1.1, which utilizes OF_instance_to_package().

Submitted by: Marius Strobl <marius@alchemy.franken.de>

20 years agoAdd data for missing categories to zh_HK.Big5HKSCS locale.
tjr [Sun, 4 Apr 2004 12:24:05 +0000 (12:24 +0000)]
Add data for missing categories to zh_HK.Big5HKSCS locale.

20 years agowhoops, forgot to fix these places where arpresolve() was used
luigi [Sun, 4 Apr 2004 11:52:09 +0000 (11:52 +0000)]
whoops, forgot to fix these places where arpresolve() was used

Detected by: tinderbox

20 years agoRemove support for emulating mbrtowc() and wcrtomb() in terms of the
tjr [Sun, 4 Apr 2004 11:31:29 +0000 (11:31 +0000)]
Remove support for emulating mbrtowc() and wcrtomb() in terms of the
old rune interface now that it is no longer needed.

20 years agoReimplement the GB18030 encoding method using the new-style (mbrtowc()/
tjr [Sun, 4 Apr 2004 11:00:42 +0000 (11:00 +0000)]
Reimplement the GB18030 encoding method using the new-style (mbrtowc()/
wcrtomb()) interface.

20 years agoReimplement the deprecated UTF2 encoding method using the UTF-8 code
tjr [Sun, 4 Apr 2004 10:49:45 +0000 (10:49 +0000)]
Reimplement the deprecated UTF2 encoding method using the UTF-8 code
as a base. mbrtowc() and wcrtomb() are now implemented directly
instead of being emulatedi with sgetrune() and sputrune().

20 years agoI can't believe that we had the Queen's birthday but not the King's...
jmg [Sun, 4 Apr 2004 07:31:35 +0000 (07:31 +0000)]
I can't believe that we had the Queen's birthday but not the King's...
Since my wife is Thai, she knows the proper date.

20 years agoFix an off-by-one error in the function used to input the ascii/hex strings.
phk [Sun, 4 Apr 2004 07:28:58 +0000 (07:28 +0000)]
Fix an off-by-one error in the function used to input the ascii/hex strings.
Be a little bit more helpful in error messages.

20 years agoDocument new ramdisk_X_????? settings.
wes [Sun, 4 Apr 2004 06:34:37 +0000 (06:34 +0000)]
Document new ramdisk_X_????? settings.

20 years ago+ arpresolve(): remove an unused argument
luigi [Sun, 4 Apr 2004 06:14:55 +0000 (06:14 +0000)]
+ arpresolve(): remove an unused argument
+ struct ifnet: remove unused fields, move ipv6-related field close
  to each other, add a pointer to l3<->l2 translation tables (arp,nd6,
  etc.) for future use.

+ struct route: remove an unused field, move close to each
  other some fields that might likely go away in the future

20 years agoAdded BSD license, as requested by author.
wes [Sun, 4 Apr 2004 06:13:56 +0000 (06:13 +0000)]
Added BSD license, as requested by author.

Requested-by: Stuart Walsh <stu@ipng.org.uk>
Message-ID: <20040331190716.GB32835@deepfreeze.stu>

20 years agoTo quote the submitter:
marcel [Sun, 4 Apr 2004 05:24:13 +0000 (05:24 +0000)]
To quote the submitter:
"...If "keyboard" is the selected input-device and "screen" the
output-device (both via /options) but the keyboard is unplugged,
OF automatically switches to ttya for the console, it even prints
a line telling so on "screen". Solaris respects this behaviour and
uses ttya as the console in this case and people probably expect
FreeBSD to do the same (it's also very handy to temporarily switch
consoles)..."
"...I changed the comparison of the console device with "ttya" ||
"ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in
SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a
SAB82532) and there's no Sun keyboard connector (but PS/2). If one
plugs a serial card in a box there also can be more than just ttya
and ttyb available for a console..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt that the change is correct: marcel

20 years agoTo quote submitter:
marcel [Sun, 4 Apr 2004 05:06:26 +0000 (05:06 +0000)]
To quote submitter:
"... uart_cpu_sparc64.c currently only looks at /options if ttyX is
the selected console. However, there's one case where it should
additionally look at /chosen. If "keyboard" is the selected input-
device and "screen" the output-device (both via /options) but the
keyboard is unplugged, OF automatically switches to ttya for the
console. It even prints a line telling so on "screen". Solaris
respects this behaviour and uses ttya as the console in this case
and people probably expect FreeBSD to do the same (it's also very
handy to temporarily switch consoles)..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt the change is correct: marcel

20 years agoBackout revision 1.31. The twa entries were moved to i386/conf/NOTES.
nyan [Sun, 4 Apr 2004 04:41:52 +0000 (04:41 +0000)]
Backout revision 1.31.  The twa entries were moved to i386/conf/NOTES.

20 years agoGive a name of 'l' (list) to the union in struct listinfo. This is
gad [Sun, 4 Apr 2004 04:41:51 +0000 (04:41 +0000)]
Give a name of 'l' (list) to the union in struct listinfo.  This is
because some compilers (such as gcc 2.95.4) do not support having an
unnamed union for a field in a struct.

20 years agoInclude <time.h> instead of depending on namespace pollution in <sys/stat.h>
bde [Sun, 4 Apr 2004 04:17:07 +0000 (04:17 +0000)]
Include <time.h> instead of depending on namespace pollution in <sys/stat.h>
for the declaration of time().

20 years agoHookup `arcfour.c' to the build (missed during upgrade to heimdal 0.6.1).
nectar [Sun, 4 Apr 2004 03:31:05 +0000 (03:31 +0000)]
Hookup `arcfour.c' to the build (missed during upgrade to heimdal 0.6.1).

20 years agoIt seems growfs(8) is now WARNS?=6 safe.
mux [Sat, 3 Apr 2004 23:56:24 +0000 (23:56 +0000)]
It seems growfs(8) is now WARNS?=6 safe.

Tested on: alpha, i386, ia64, sparc64

20 years agoFix the remaining warnings of growfs(8) on my sparc64 box with
mux [Sat, 3 Apr 2004 23:30:59 +0000 (23:30 +0000)]
Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6.  I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.

The fs.h fix was suggested by: marcel
Reviewed by: md5(1)

20 years agoIn uart_ebus_probe(), match "su_pnp" besides "su" for ns8250 family
marcel [Sat, 3 Apr 2004 23:02:02 +0000 (23:02 +0000)]
In uart_ebus_probe(), match "su_pnp" besides "su" for ns8250 family
of UARTs. We already did this in uart_cpu_getdev().
While here, also check the compat name for "su" or "su16550".

Both changes submitted by: Marius Strobl <marius@alchemy.franken.de>
Does not doubt the correctness of the second change: marcel

20 years ago- Don't abuse caddr_t when what we really want is a void *.
mux [Sat, 3 Apr 2004 22:56:54 +0000 (22:56 +0000)]
- Don't abuse caddr_t when what we really want is a void *.
- Use the %jd format and a cast to intmax_t to print an int64_t.
- The return type of getopt() is an int, not a char.

This fixes some warnings but there's still much more work to do here.

20 years agoAdd the ability to disable agp devices at the loader prompt. Usage is
njl [Sat, 3 Apr 2004 22:55:12 +0000 (22:55 +0000)]
Add the ability to disable agp devices at the loader prompt.  Usage is
    hint.agp.0.disabled="1"

Submitted by: jhb

20 years agoTemporarily go back to WARNS=0 until I can figure out what's breaking
le [Sat, 3 Apr 2004 22:26:43 +0000 (22:26 +0000)]
Temporarily go back to WARNS=0 until I can figure out what's breaking
the {powerpc, sparc64, ia64} tinderboxes.

Sorry for the noise. :-(

20 years agoMove the definition of rss() from db_interface.c to cpufunc.h where
marcel [Sat, 3 Apr 2004 22:23:36 +0000 (22:23 +0000)]
Move the definition of rss() from db_interface.c to cpufunc.h where
it belongs. Change the implementation to match those of rfs() and
rgs() for consistency and irrespective of whether the original was
more correct or not (technically speaking).

20 years agoRemove CADDR1 and CMAP1. They are unused.
alc [Sat, 3 Apr 2004 21:38:20 +0000 (21:38 +0000)]
Remove CADDR1 and CMAP1.  They are unused.

20 years agoResolve conflicts after import of Heimdal 0.6.1.
nectar [Sat, 3 Apr 2004 21:31:10 +0000 (21:31 +0000)]
Resolve conflicts after import of Heimdal 0.6.1.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r127808,
nectar [Sat, 3 Apr 2004 21:22:55 +0000 (21:22 +0000)]
This commit was generated by cvs2svn to compensate for changes in r127808,
which included commits to RCS files with non-trunk default branches.

20 years agoVendor import of Heimdal 0.6.1.
nectar [Sat, 3 Apr 2004 21:22:55 +0000 (21:22 +0000)]
Vendor import of Heimdal 0.6.1.

20 years agoResolve conflicts after import of Heimdal 0.6.1 libcom_err.
nectar [Sat, 3 Apr 2004 21:17:01 +0000 (21:17 +0000)]
Resolve conflicts after import of Heimdal 0.6.1 libcom_err.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r127804,
nectar [Sat, 3 Apr 2004 21:08:58 +0000 (21:08 +0000)]
This commit was generated by cvs2svn to compensate for changes in r127804,
which included commits to RCS files with non-trunk default branches.

20 years agoImport libcom_err from Heimdal 0.6.1.
nectar [Sat, 3 Apr 2004 21:08:58 +0000 (21:08 +0000)]
Import libcom_err from Heimdal 0.6.1.

20 years agoRemove ptmmap and ptvmmap. They are unused on amd64.
alc [Sat, 3 Apr 2004 20:53:50 +0000 (20:53 +0000)]
Remove ptmmap and ptvmmap.  They are unused on amd64.

20 years agoCreate NT_PRSTATUS and NT_FPREGSET notes for each and every thread
marcel [Sat, 3 Apr 2004 20:25:41 +0000 (20:25 +0000)]
Create NT_PRSTATUS and NT_FPREGSET notes for each and every thread
in the process. This is required for proper debugging of corefiles
created by 1:1 or M:N threaded processes. Add an XXX comment where
we should actually call a function that dumps MD specific notes.
An example of a MD specific note is the NT_PRXFPREG note for SSE
registers.

Since BFD creates non-annotated pseudo-sections for the first PRSTATUS
and FPREGSET notes (non-annotated in the sense that the name of the
section does not contain the pid/tid), make sure those sections describe
the initial thread of the process (i.e. the thread which tid equals the
pid). This is not strictly necessary, but makes sure that tools that use
the non-annotated section names will not change behaviour due to this
change.

The practical upshot of this all is that one can see the threads in
the debugger when looking at a corefile. For 1:1 threading this means
that *all* threads are visible.

20 years agoUnbreak LED support on Elan cpus.
phk [Sat, 3 Apr 2004 18:42:52 +0000 (18:42 +0000)]
Unbreak LED support on Elan cpus.

20 years agoMake led.c/led(4) standard so acpi_asus can use it too.
phk [Sat, 3 Apr 2004 18:42:05 +0000 (18:42 +0000)]
Make led.c/led(4) standard so acpi_asus can use it too.

20 years agoStyle:
mlaier [Sat, 3 Apr 2004 17:52:29 +0000 (17:52 +0000)]
Style:
 - do not comment out entries in newsyslog.conf
 - use tabs to line up inetd.conf

Requested by: bde
Approved by: bms(mentor)

20 years agoMake growfs WARNS=6 clean.
le [Sat, 3 Apr 2004 17:40:19 +0000 (17:40 +0000)]
Make growfs WARNS=6 clean.

Approved by: grog (mentor)

20 years agoFlush cached access mode after modifying a files attributes for
peadar [Sat, 3 Apr 2004 17:23:46 +0000 (17:23 +0000)]
Flush cached access mode after modifying a files attributes for
NFSv3. It's likely that modifying the attributes will affect the
file's accessibility. This version of the patch is one suggested
by Ian Dowse after reviewing my original attempt in the PR

Reviewed By: iedowse
PR: kern/44336
MFC after: 3 days

20 years agoGive find(1) the option -acl to locate files with extended
bmilekic [Sat, 3 Apr 2004 17:10:04 +0000 (17:10 +0000)]
Give find(1) the option -acl to locate files with extended
ACLs.  This is similar to what ls(1) can do.  It is handy to
have it so that it can be used in conjunction with
"-exec setfacl {} \;" (to find(1)), among others.

This is the submitter's patch, but slightly modified.

PR: bin/65016
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>

20 years agoStop iterating over ACLs if we've already determined we
bmilekic [Sat, 3 Apr 2004 16:55:56 +0000 (16:55 +0000)]
Stop iterating over ACLs if we've already determined we
will print them (i.e., number of successful calls to acl_get_entry()
exceeds 3).  This makes O(1) what was O(num_TYPE_ACCESS_ACLs).

This is a slightly modified version of submitter's patch.

PR: bin/65042
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>

20 years agoAssign thread IDs to kernel threads. The purpose of the thread ID (tid)
marcel [Sat, 3 Apr 2004 15:59:13 +0000 (15:59 +0000)]
Assign thread IDs to kernel threads. The purpose of the thread ID (tid)
is twofold:
1. When a 1:1 or M:N threaded process dumps core, we need to put the
   register state of each of its kernel threads in the core file.
   This can only be done by differentiating the pid field in the
   respective note. For this we need the tid.
2. When thread support is present for remote debugging the kernel
   with gdb(1), threads need to be identified by an integer due to
   limitations in the remote protocol. This requires having a tid.

To minimize the impact of having thread IDs, threads that are created
as part of a fork (i.e. the initial thread in a process) will inherit
the process ID (i.e. tid=pid). Subsequent threads will have IDs larger
than PID_MAX to avoid interference with the pid allocation algorithm.
The assignment of tids is handled by thread_new_tid().

The thread ID allocation algorithm has been written with 3 assumptions
in mind:
1. IDs need to be created as fast a possible,
2. Reuse of IDs may happen instantaneously,
3. Someone else will write a better algorithm.

20 years agoRecharge the watchdog timer if there's still some TX work left.
ru [Sat, 3 Apr 2004 15:55:21 +0000 (15:55 +0000)]
Recharge the watchdog timer if there's still some TX work left.

20 years agoCorrect a potential panic condition that could be caused when getting or
nectar [Sat, 3 Apr 2004 15:28:25 +0000 (15:28 +0000)]
Correct a potential panic condition that could be caused when getting or
setting the VGA palette.

Reported by: Christer Ã–berg <christer.oberg@texonet.com>
Reviewed by: bde

20 years agoBefore MFC'ing the previous commit, I noticed I'd left out a case.
peadar [Sat, 3 Apr 2004 13:24:37 +0000 (13:24 +0000)]
Before MFC'ing the previous commit, I noticed I'd left out a case.
Add in missing case for i845G in the attach routine. I'll MFC this
with the rest of the change after the 4.10 codefreeze lifts.

Reviewed By: Doug Rabson

20 years agomdoc fix: put the end-of-list macro after the last list element.
le [Sat, 3 Apr 2004 12:14:30 +0000 (12:14 +0000)]
mdoc fix: put the end-of-list macro after the last list element.

Approved by:   grog (mentor)

20 years agoIn some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
alc [Sat, 3 Apr 2004 09:16:27 +0000 (09:16 +0000)]
In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
should not.  Add a new parameter so that the caller can specify which is
the case.

Reported by: dillon

20 years agoMicrooptimize pagezero() based upon something that I learned writing the
alc [Sat, 3 Apr 2004 05:33:10 +0000 (05:33 +0000)]
Microoptimize pagezero() based upon something that I learned writing the
optimized pagecopy().  This also has the virtual of making these two
functions more similar in style.

20 years agoThis file was erroneously removed from HEAD when TCP-MD5 support was MFC'd;
bms [Sat, 3 Apr 2004 05:31:38 +0000 (05:31 +0000)]
This file was erroneously removed from HEAD when TCP-MD5 support was MFC'd;
correct this lameness.

20 years agodo proper subclassing of node free+copy; the previous hack falls apart when
sam [Sat, 3 Apr 2004 03:33:02 +0000 (03:33 +0000)]
do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from: madwifi

20 years agoFixed a few bugs in the rl(4) driver:
ru [Sat, 3 Apr 2004 00:42:33 +0000 (00:42 +0000)]
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

20 years agodo proper subclassing of node free+copy; the previous hack falls apart when
sam [Sat, 3 Apr 2004 00:06:23 +0000 (00:06 +0000)]
do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from: madwifi

20 years agotransmit beacon frames directly instead of defering them to a swi; there
sam [Sat, 3 Apr 2004 00:02:17 +0000 (00:02 +0000)]
transmit beacon frames directly instead of defering them to a swi; there
was too much delay

Obtained from: madwifi

20 years agoupdate copyright notice for 2004
sam [Fri, 2 Apr 2004 23:57:10 +0000 (23:57 +0000)]
update copyright notice for 2004

20 years agoadd new statistics
sam [Fri, 2 Apr 2004 23:55:45 +0000 (23:55 +0000)]
add new statistics

Obtained from: madwifi

20 years agocheck more quickly (and directly) if an interrupt is pending; this reduces
sam [Fri, 2 Apr 2004 23:49:15 +0000 (23:49 +0000)]
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

20 years agocleanup descriptor allocation if attach fails
sam [Fri, 2 Apr 2004 23:47:39 +0000 (23:47 +0000)]
cleanup descriptor allocation if attach fails

Obtained from: madwifi

20 years agoremove use IEEE80211_C_RCVMGT
sam [Fri, 2 Apr 2004 23:37:00 +0000 (23:37 +0000)]
remove use IEEE80211_C_RCVMGT

20 years agoPerformance tuning.
ru [Fri, 2 Apr 2004 23:36:49 +0000 (23:36 +0000)]
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.

20 years agoChange handling of probe response frames. Previously we always dropped the
sam [Fri, 2 Apr 2004 23:35:24 +0000 (23:35 +0000)]
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).

20 years agoNote previous commit also purges all node table entries collected while
sam [Fri, 2 Apr 2004 23:28:38 +0000 (23:28 +0000)]
Note previous commit also purges all node table entries collected while
do scanning when operating in adhoc mode.  This is necessary to insure
nodes in the table have a correct refcnt and driver-private state but is
suboptimal. A better solution is to probe undiscovered neighbors and use
the probe response to do the right thing (support for that comming in a
separate commit).

20 years agofix adhoc/ibss operation for drivers that require host support (e.g. ath):
sam [Fri, 2 Apr 2004 23:25:39 +0000 (23:25 +0000)]
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)

20 years agoalways free node reference when processing a probe request frame; was
sam [Fri, 2 Apr 2004 23:12:45 +0000 (23:12 +0000)]
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

20 years agoo change ieee80211_dup_bss to inherit explicit data from ic_bss instead of
sam [Fri, 2 Apr 2004 23:09:24 +0000 (23:09 +0000)]
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

20 years agotrack node allocation failure stats in ieee80211_alloc_node instead
sam [Fri, 2 Apr 2004 23:06:41 +0000 (23:06 +0000)]
track node allocation failure stats in ieee80211_alloc_node instead
of each caller

Obtained from: madwifi

20 years agoreplace explicit malloc/free with MALLOC/FREE for portability
sam [Fri, 2 Apr 2004 23:02:24 +0000 (23:02 +0000)]
replace explicit malloc/free with MALLOC/FREE for portability

Obtained from: madwifi

20 years agoextract node matching logic into new ieee80211_match_bss routine for use
sam [Fri, 2 Apr 2004 23:00:30 +0000 (23:00 +0000)]
extract node matching logic into new ieee80211_match_bss routine for use
in background/incremental scanning

Obtained from: madwifi

20 years agodiff reduction against madwifi
sam [Fri, 2 Apr 2004 22:56:09 +0000 (22:56 +0000)]
diff reduction against madwifi

20 years agowhen processing beacon/probe response frames capture "is probe" in a
sam [Fri, 2 Apr 2004 22:54:07 +0000 (22:54 +0000)]
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

20 years agoadd a case of IEEE80211_ELEMID_IBSSPARMS so the statistic on unknown
sam [Fri, 2 Apr 2004 22:50:31 +0000 (22:50 +0000)]
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

20 years agowhen doing internal bridging free the node instead of just dropping the
sam [Fri, 2 Apr 2004 22:48:52 +0000 (22:48 +0000)]
when doing internal bridging free the node instead of just dropping the
reference for consistency (explicit refcounting is discouraged)

Obtained from: madwifi

20 years agowhen receiving a frame w/ a bad version number don't unref the node; the
sam [Fri, 2 Apr 2004 22:47:11 +0000 (22:47 +0000)]
when receiving a frame w/ a bad version number don't unref the node; the
driver is responsible for that

Obtained from: madwifi

20 years agoinsure basic rate bit is set in derived rate set; this
sam [Fri, 2 Apr 2004 20:22:25 +0000 (20:22 +0000)]
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

20 years agodiff reduction against madwifi/p4
sam [Fri, 2 Apr 2004 20:19:20 +0000 (20:19 +0000)]
diff reduction against madwifi/p4

20 years agoAdd rc.d script to start pflogd and add rcvars etc. Also document vars in
mlaier [Fri, 2 Apr 2004 19:25:27 +0000 (19:25 +0000)]
Add rc.d script to start pflogd and add rcvars etc. Also document vars in
rc.conf(5) and put a sample entry to newsyslog.conf

Reviewed by: -current
Approved by: bms(mentor)

20 years agoMoved 3ware 9000 driver (twa) stuff from sys/conf/NOTES to /sys/i386/conf/NOTES.
vkashyap [Fri, 2 Apr 2004 18:50:56 +0000 (18:50 +0000)]
Moved 3ware 9000 driver (twa) stuff from sys/conf/NOTES to /sys/i386/conf/NOTES.