dragonfly.git
17 years agoAs bridge_rtupdate() can be called from interrupt context and must not
Thomas E. Spanjaard [Thu, 4 Jan 2007 21:14:40 +0000 (21:14 +0000)]
As bridge_rtupdate() can be called from interrupt context and must not
block, change it to use M_INTNOWAIT instead of M_WAITOK.

Reported-by: Joerg Sonnenberger <joerg@britannica.bec.de>

17 years agoAdjust a couple of kmalloc calls to use M_WAITOK instead of M_RNOWAIT. It
Thomas E. Spanjaard [Thu, 4 Jan 2007 18:55:18 +0000 (18:55 +0000)]
Adjust a couple of kmalloc calls to use M_WAITOK instead of M_RNOWAIT. It
appears there is no problem in waiting here, and use of M_RNOWAIT without
M_USE_RESERVE is dangerous. If this doesn't work 'right' either, the
proper solution is to use M_INTNOWAIT instead.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue410>

17 years agouname(1) is still used in a few places during buildworld,
YONETANI Tomokazu [Thu, 4 Jan 2007 14:19:03 +0000 (14:19 +0000)]
uname(1) is still used in a few places during buildworld,
put it back as a boot strap tool.

Submitted-by: sephe@
17 years agoSync with FreeBSD:
Peter Avalos [Thu, 4 Jan 2007 14:06:21 +0000 (14:06 +0000)]
Sync with FreeBSD:

Implement missing shell arithmetic operators in $(()) expansion
and variable recognition.

Provide missing prototypes and variable declarations in arith.h.

Spelling/style fixes.

17 years agoReturn 1 from the unalias builtin if _any_ removal fails, not just the last
Peter Avalos [Thu, 4 Jan 2007 06:35:12 +0000 (06:35 +0000)]
Return 1 from the unalias builtin if _any_ removal fails, not just the last
one.

Obtained-from:  FreeBSD

17 years agoCorrect assorted grammos and typos.
Peter Avalos [Thu, 4 Jan 2007 06:24:11 +0000 (06:24 +0000)]
Correct assorted grammos and typos.

Obtained-from:  FreeBSD

17 years agoUnbreak ndis(4) building.
Sascha Wildner [Wed, 3 Jan 2007 14:12:52 +0000 (14:12 +0000)]
Unbreak ndis(4) building.

17 years agoRemove redundant #ifdefs.
Sascha Wildner [Wed, 3 Jan 2007 13:33:02 +0000 (13:33 +0000)]
Remove redundant #ifdefs.

17 years agoAs discussed with sephe: uncomment awi(4), seems to build ok.
Sascha Wildner [Wed, 3 Jan 2007 13:24:13 +0000 (13:24 +0000)]
As discussed with sephe: uncomment awi(4), seems to build ok.

17 years ago- little mdoc cleanup
Sascha Wildner [Tue, 2 Jan 2007 23:42:20 +0000 (23:42 +0000)]
- little mdoc cleanup

- fix typo in committer.7

Typo-noticed-by: Steve Mynott <steve.mynott@gmail.com>
17 years ago[committed on behalf of sephe]
Sascha Wildner [Tue, 2 Jan 2007 23:28:49 +0000 (23:28 +0000)]
[committed on behalf of sephe]

- Fix ieee80211_node leakage.  The leakage is caused by calling IF_DRAIN()
  on management ifqueue whose mbuf's m_pkthdr.rcvif has special meaning:
  it holds ieee80211_node to which the management frame should be sent and
  the node has its reference count bumped.
  Add a new function ieee80211_drain_mgtq(), which frees ieee80211_node
  pointed by mbuf's m_pkthdr.rcvif before freeing the mbuf.  Use this function
  to drain management ifqueue instead of IF_DRAIN().
- In acx(4), ipw(4), ral(4) and rum(4) 'stop' routines, move
  ieee80211_new_state(IEEE80211_S_INIT) before clearing IFF_RUNNING in
  ifnet.if_flags, so these drivers may send out management frames injected
  by ieee80211_newstate(IEEE80211_S_INIT). (*)

# (*) Without proper hardware TX queue drain functionality, the management
#     frames injected by ieee80211_newstate(IEEE80211_S_INIT) almost no
#     chance to float in the air.

17 years agoRepo-copy malloc.9 to kmalloc.9 and clean up.
Sascha Wildner [Tue, 2 Jan 2007 23:08:59 +0000 (23:08 +0000)]
Repo-copy malloc.9 to kmalloc.9 and clean up.

17 years agoFix typo in sctp_output.c. The lwp structure has lwp_ru embedded directly,
Thomas E. Spanjaard [Tue, 2 Jan 2007 19:30:57 +0000 (19:30 +0000)]
Fix typo in sctp_output.c. The lwp structure has lwp_ru embedded directly,
not via a substructure lwp_stats.

Reported-by: Sascha Wildner <saw@online.de>

17 years agoRemove pmap_kernel() (which just returned a pointer to kernel_pmap), and
Matthew Dillon [Tue, 2 Jan 2007 04:52:31 +0000 (04:52 +0000)]
Remove pmap_kernel() (which just returned a pointer to kernel_pmap), and
change the kernel_pmap global from a pointer to a directly accessed
structure.  Adjust code accordingly.

17 years agoGet most of the VKERNEL pmap handling code in.
Matthew Dillon [Tue, 2 Jan 2007 04:24:26 +0000 (04:24 +0000)]
Get most of the VKERNEL pmap handling code in.

17 years agoTry to locate any instances where pmap_enter*() is called with a kernel
Matthew Dillon [Tue, 2 Jan 2007 04:21:16 +0000 (04:21 +0000)]
Try to locate any instances where pmap_enter*() is called with a kernel
virtual address on a pmap other then kernel_pmap by adding some debugging
printfs.

Remove pmap_kernel() (which just returned a pointer to kernel_pmap), and
change the kernel_pmap global from a pointer to a directly accessed
structure.  Adjust code accordingly.

17 years agoprintf -> kprintf
Sascha Wildner [Tue, 2 Jan 2007 00:25:43 +0000 (00:25 +0000)]
printf -> kprintf

17 years agoAdd a kprintf(9) manual page.
Sascha Wildner [Tue, 2 Jan 2007 00:16:56 +0000 (00:16 +0000)]
Add a kprintf(9) manual page.

Adapted from: FreeBSD

17 years ago1:1 Userland threading stage 2.10/4:
Simon Schubert [Mon, 1 Jan 2007 22:51:18 +0000 (22:51 +0000)]
1:1 Userland threading stage 2.10/4:

Separate p_stats into p_ru and lwp_ru.

proc.p_ru keeps track of all statistics directly related to a proc.  This
consists of RSS usage and nswap information and aggregate numbers for all
former lwps of this proc.

proc.p_cru is the sum of all stats of reaped children.

lwp.lwp_ru contains the stats directly related to one specific lwp, meaning
packet, scheduler switch or page fault counts, etc.  This information gets
added to lwp.lwp_proc.p_ru when the lwp exits.

17 years agoRemove unused _games.
Sascha Wildner [Mon, 1 Jan 2007 19:59:25 +0000 (19:59 +0000)]
Remove unused _games.

17 years agojail(2) now returns the jail id if successful or -1 on error.
Victor Balada Diaz [Mon, 1 Jan 2007 19:45:54 +0000 (19:45 +0000)]
jail(2) now returns the jail id if successful or -1 on error.

Add -i to jail(8). This option makes jail(8) print the jail ID
of the newly created jail.

Imported-from: FreeBSD

17 years agoUpdate the copyright year
Victor Balada Diaz [Mon, 1 Jan 2007 12:58:02 +0000 (12:58 +0000)]
Update the copyright year

We'll be here one year more!

17 years ago- In ieee80211_setmode(), don't mark basic rates on ieee80211com.ic_sup_rates.
Sepherosa Ziehau [Mon, 1 Jan 2007 08:51:45 +0000 (08:51 +0000)]
- In ieee80211_setmode(), don't mark basic rates on ieee80211com.ic_sup_rates.
  The basic rates will be marked on ieee80211com.ic_sup_rates once we get the
  BSS' basic rate set, in ieee80211_sta_join().
- Rename ieee80211_set11gbasicrates() to ieee80211_set_basicrates().  Add
  additional parameter to indicate whether we are using Pure G or not.
- In ieee80211_set_basicrates():
  o  Extend basic rate set array by adding items for Turbo G mode (mixed 11B/G
     basic rates) and Turbo A mode (11A mandatory rates).
  o  Add an assertion to make sure we will not go beyond the end of the basic
     rate set array.
  o  Use a seperate constant for Pure G basic rate set.
  o  If 'mode' is 11G or Turbo G, and Pure G is required, use Pure G's basic
     rate set, instead of mixed 11B/G basic rate set.  This makes a standard
     conforming 11B STA not try joining a Pure G BSS created by us.
- In ieee80211_recv_mgmt():
  o  Send probe response even if rate negotiation fails.  According to
     IEEE Std 802.11, 1999 Edition, subclause 11.1.3.2.1:
     ....
     STAs, subject to criteria below, receiving Probe Request frames shall
     respond with a probe response only if the SSID in the probe request is
     the broadcast SSID or matches the specific SSID of the STA.  ... ...
     An AP shall respond to all probe requests meeting the above criteria.
     In an IBSS, the STA that generated the last beacon shall be the STA that
     responds to a probe request.
     ....

     If we reach the rate negotiation step, then the "criteria" outlined by
     the standard is already met.
  o  Don't do rate negotiation for temporary nodes, which are created just for
     sending probe responses.  This may save us some cpu time.
- Reset NIC for Pure G change, only if opmode is HOSTAP or IBSS(*), and phy
  mode is either Turbo G or 11G.
- Don't allocate TX rate control data for temporary nodes, since they will be
  reclaimed immediately after management frames are sent.

# (*) Actually, for IBSS opmode, we need to reset the NIC iff we are the only
#     member of the current IBSS.

17 years agoAdd markup and some references. Fix the wording in a few places.
Sascha Wildner [Mon, 1 Jan 2007 03:36:34 +0000 (03:36 +0000)]
Add markup and some references. Fix the wording in a few places.

17 years ago- Obey the beacon interval of the IBSS if we are going to join it.
Sepherosa Ziehau [Mon, 1 Jan 2007 03:31:52 +0000 (03:31 +0000)]
- Obey the beacon interval of the IBSS if we are going to join it.
- Obey the beacon interval set by ifconfig(8), if we are going to create
  an infrastructured BSS or an IBSS.

17 years agoNuke local implementation of pcap_{get_selectable_fd,inject}(), which are
Sepherosa Ziehau [Mon, 1 Jan 2007 01:45:40 +0000 (01:45 +0000)]
Nuke local implementation of pcap_{get_selectable_fd,inject}(), which are
in the updated pcap(3) now.

Noticed-by: swildner@
17 years agoFix an off-by-one which could mean writing beyond the end of the array when
Sepherosa Ziehau [Mon, 1 Jan 2007 01:42:23 +0000 (01:42 +0000)]
Fix an off-by-one which could mean writing beyond the end of the array when
putting '\0' to the end of the iface name.

Obtained-From: FreeBSD(bz@freebsd.org) with modification

17 years agoAdd -P option which causes builtin macros to be prefixed with "m4_". This
Peter Avalos [Mon, 1 Jan 2007 00:41:58 +0000 (00:41 +0000)]
Add -P option which causes builtin macros to be prefixed with "m4_".  This
was mostly taken from NetBSD.

Reviewed-by: dillon, joerg
17 years agoRemove an old debugging kprintf.
Matthew Dillon [Sun, 31 Dec 2006 20:34:04 +0000 (20:34 +0000)]
Remove an old debugging kprintf.

17 years agoNone of the patches in dhclient/client were being applied. Add the patches
Matthew Dillon [Sun, 31 Dec 2006 20:18:35 +0000 (20:18 +0000)]
None of the patches in dhclient/client were being applied.  Add the patches
to SRCS and synchronize them with our new auto-patching system.  Make minor
adjustments where necessasry to patch against dhcp-3.0.

17 years agoFix manual page references to omshell.
Matthew Dillon [Sun, 31 Dec 2006 20:06:38 +0000 (20:06 +0000)]
Fix manual page references to omshell.

Submitted-by: Francis GUDIN
17 years agoFix compilation error when building without INET6. Fix a number of minor
Matthew Dillon [Sun, 31 Dec 2006 19:36:54 +0000 (19:36 +0000)]
Fix compilation error when building without INET6.  Fix a number of minor
bugs related to string and address family handling.

Reported-by: "Matt Emmerton" <matt@gsicomp.on.ca> - reported compile errors
17 years agozbootinit() was being called with too few pv_entry's on machines with small
Matthew Dillon [Sun, 31 Dec 2006 03:52:47 +0000 (03:52 +0000)]
zbootinit() was being called with too few pv_entry's on machines with small
amounts of memory.

Move the vm.kvm_* sysctls from MD to MI source files.

17 years agoCorrect a conditional used to detect a panic situation. The index was off by
Matthew Dillon [Sun, 31 Dec 2006 03:50:07 +0000 (03:50 +0000)]
Correct a conditional used to detect a panic situation.  The index was off by
one.

17 years agoUse %j to print an ino_t.
Sascha Wildner [Sat, 30 Dec 2006 18:36:45 +0000 (18:36 +0000)]
Use %j to print an ino_t.

17 years agostruct tty's t_dev is a pointer now. Fix warning.
Sascha Wildner [Sat, 30 Dec 2006 17:58:10 +0000 (17:58 +0000)]
struct tty's t_dev is a pointer now. Fix warning.

Spotted-by: Trevor Kendall <trevorjkendall@gmail.com>
17 years agoFix typo.
Sascha Wildner [Sat, 30 Dec 2006 15:27:08 +0000 (15:27 +0000)]
Fix typo.

17 years agoRemove vgrind and nvi as build tools.
Simon Schubert [Fri, 29 Dec 2006 22:43:32 +0000 (22:43 +0000)]
Remove vgrind and nvi as build tools.

ex was used to reorder termcap, which seems unnecessary
vgrind was only used for share/doc

Wondering-together-with: swildner

17 years agoRemove ancient comment from 1997.
Sascha Wildner [Fri, 29 Dec 2006 20:50:55 +0000 (20:50 +0000)]
Remove ancient comment from 1997.

17 years agoMake descriptions more descriptive.
Sascha Wildner [Fri, 29 Dec 2006 18:20:11 +0000 (18:20 +0000)]
Make descriptions more descriptive.

17 years agoMade jails IPv6 aware and support more than one IP address.
Victor Balada Diaz [Fri, 29 Dec 2006 18:02:57 +0000 (18:02 +0000)]
Made jails IPv6 aware and support more than one IP address.

Based-on: Pawel Jakub Dawidek mijail patches.
Reviewed-by: Simon 'corecode' Schubert, Thomas E. Spanjaard, et al.
17 years agoUse %j to print an ino_t.
Sascha Wildner [Fri, 29 Dec 2006 17:10:20 +0000 (17:10 +0000)]
Use %j to print an ino_t.

17 years agoAdd initialization to silence compiler warning.
Simon Schubert [Fri, 29 Dec 2006 15:26:14 +0000 (15:26 +0000)]
Add initialization to silence compiler warning.

17 years agosyscons doesn't support EGA, CGA etc. anymore, so remove the mapping
Sascha Wildner [Fri, 29 Dec 2006 00:10:35 +0000 (00:10 +0000)]
syscons doesn't support EGA, CGA etc. anymore, so remove the mapping
of generic mode names like "80x25" to different adapter types. Hardwire
them to VGA/VESA mode numbers.

Also, remove the bogus "132x30" VESA text mode which is not defined in
the specification.

17 years agoMake kernel_map, buffer_map, clean_map, exec_map, and pager_map direct
Matthew Dillon [Thu, 28 Dec 2006 21:24:02 +0000 (21:24 +0000)]
Make kernel_map, buffer_map, clean_map, exec_map, and pager_map direct
structural declarations instead of pointers.  Clean up all related code,
in particular kmem_suballoc().

Remove the offset calculation for kernel_object.  kernel_object's page
indices used to be relative to the start of kernel virtual memory in order
to improve the performance of VM page scanning algorithms.  The optimization
is no longer needed now that VM objects use Red-Black trees.  Removal of
the offset simplifies a number of calculations and makes the code more
readable.

17 years agoIntroduce globals: KvaStart, KvaEnd, and KvaSize. Used by the kernel
Matthew Dillon [Thu, 28 Dec 2006 18:29:08 +0000 (18:29 +0000)]
Introduce globals: KvaStart, KvaEnd, and KvaSize.  Used by the kernel
instead of the nutty VADDR and VM_*_KERNEL_ADDRESS macros.  Move extern
declarations for these variables as well as for virtual_start, virtual_end,
and phys_avail[] from MD headers to MI headers.

Make kernel_object a global structure instead of a pointer.

Remove kmem_object and all related code (none of it is used any more).

17 years agoclean to WARNS=6.
Simon Schubert [Wed, 27 Dec 2006 23:06:29 +0000 (23:06 +0000)]
clean to WARNS=6.

17 years agoJanitor out stale defines and ifdefs.
Simon Schubert [Wed, 27 Dec 2006 23:01:19 +0000 (23:01 +0000)]
Janitor out stale defines and ifdefs.

17 years agoSync with FreeBSD. Notable changes:
Peter Avalos [Wed, 27 Dec 2006 21:29:02 +0000 (21:29 +0000)]
Sync with FreeBSD.  Notable changes:

Kill extraneous whitespace.

Flush streams before calling system() so that the output appears in the
right place in the output stream when redirected to a file (when full
buffering is enabled).

Store a pointer to "null" in struct ndblock's defn member instead of a
duplicate allocated on the heap; the address defn points to is significant,
and is checked against the address of "null" in certain conditionals.

Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.

Respect locale settings from the environment.

Add a new m4 script to test the functionality of math operators in eval().

17 years agoDon't interpret 'Dx' as a macro name.
Sascha Wildner [Wed, 27 Dec 2006 21:15:38 +0000 (21:15 +0000)]
Don't interpret 'Dx' as a macro name.

Spotted-by: corecode
17 years agoMake certain libc prototypes / system calls visible to kernel builds
Matthew Dillon [Wed, 27 Dec 2006 20:43:09 +0000 (20:43 +0000)]
Make certain libc prototypes / system calls visible to kernel builds
(for virtual kernel builds).  Add a TLS support function for virtual
kernels.

17 years agoMake a chunk of low level initialization code for proc0 and thread0 machine
Matthew Dillon [Wed, 27 Dec 2006 20:41:59 +0000 (20:41 +0000)]
Make a chunk of low level initialization code for proc0 and thread0 machine
independant via a new procedure, mi_proc0init().

17 years agoprintf -> kprintf
Sascha Wildner [Wed, 27 Dec 2006 18:37:15 +0000 (18:37 +0000)]
printf -> kprintf

17 years agoAdd generic printout of extended CPUID feature flags on Intel processors.
Thomas E. Spanjaard [Wed, 27 Dec 2006 17:20:28 +0000 (17:20 +0000)]
Add generic printout of extended CPUID feature flags on Intel processors.

Obtained-from: FreeBSD.
XXX-regarding: cpu_feature and cpu_feature2 flags are defined in
sys/systm.h, which really isn't the right place.

17 years agoRemove unused defines.
Matthew Dillon [Wed, 27 Dec 2006 06:51:47 +0000 (06:51 +0000)]
Remove unused defines.

17 years agoRename virtual_avail to virtual_start, so name follows function.
Matthew Dillon [Tue, 26 Dec 2006 22:51:00 +0000 (22:51 +0000)]
Rename virtual_avail to virtual_start, so name follows function.

17 years agoContinue fleshing out VKERNEL support. Initialize the per-cpu globaldata
Matthew Dillon [Tue, 26 Dec 2006 20:46:15 +0000 (20:46 +0000)]
Continue fleshing out VKERNEL support.  Initialize the per-cpu globaldata
structure, provide access to the structure via %gs, and do some minor
cleanups.

17 years agoRemove unused procedures and declarations.
Matthew Dillon [Tue, 26 Dec 2006 20:43:56 +0000 (20:43 +0000)]
Remove unused procedures and declarations.

17 years agoUse a temporary rate set to hold current channel's rate set.
Sepherosa Ziehau [Tue, 26 Dec 2006 14:53:21 +0000 (14:53 +0000)]
Use a temporary rate set to hold current channel's rate set.
The rates in the temporary rate set will have their MSB cleared.

The main reason that we do this is to be compatible with some
AP implementations, that check MSB of supported rate octet in
(Extended) Supported Rates ie of probe requests.  If the checking
fails on AP side, these implementations will not send out probe
responses.

This kind of rate checking is against:
- IEEE Std 802.11, 1999 edition subclause 7.3.2.2
- IEEE Std 802.11g-2003 subclause 7.3.2.14

17 years agoUse software beacon missing handling
Sepherosa Ziehau [Tue, 26 Dec 2006 12:41:40 +0000 (12:41 +0000)]
Use software beacon missing handling

17 years agohw.machine_cpu should use content in machine_cpu[] array.
Sepherosa Ziehau [Tue, 26 Dec 2006 12:16:56 +0000 (12:16 +0000)]
hw.machine_cpu should use content in machine_cpu[] array.

OK: dillon@

17 years ago- Unhook usr.bin/uname from boot strap tools building, because it is not
Sepherosa Ziehau [Tue, 26 Dec 2006 11:27:44 +0000 (11:27 +0000)]
- Unhook usr.bin/uname from boot strap tools building, because it is not
  used as boot strap tool at all.
- Add hw.machin_uname, which is "i386" on pc32(machine)/i386(cpu).  It is
  used by uname(1) -m option and uname(3), since most third party application
  understand "i386" much better than "pc32".  In uname(3), fallback to
  hw.machine, if hw.machine_uname does not exist, so we can stay compatible
  with old kernel which does not have hw.machine_uname.

Implementation-suggestions-from: dillon@
Approved-by: dillon@
17 years ago- addlog(...) is identical to log(-1, ...). Get rid of it to avoid
Sascha Wildner [Tue, 26 Dec 2006 11:01:07 +0000 (11:01 +0000)]
- addlog(...) is identical to log(-1, ...). Get rid of it to avoid
  duplicate code and change sppp(4) to use log(-1, ...).

- Add support for the 'j' and 't' size modifiers.

- Add support for the 'i' (alias for 'd'), 'n' and 'X' conversions. Use
  uintmax_t in ksprintn() and get rid of ksprintqn(). Do some structural
  cleanup in kvcprintf().

- Make 'z' modifier always print values as signed.

- Change a return to a break to properly free the local buffers.

- When padding with zero, do pad after prefixes rather than before.

- Perform some style(9) cleanup.

Taken-from (with some adjustments): FreeBSD

17 years agoRemove unnecessary argument to .Nm.
Sascha Wildner [Tue, 26 Dec 2006 03:38:50 +0000 (03:38 +0000)]
Remove unnecessary argument to .Nm.

17 years agoSync ieee80211_radiotap(9) manpage with NetBSD (mainly dyoung@netbsd.org)
Sepherosa Ziehau [Mon, 25 Dec 2006 14:45:33 +0000 (14:45 +0000)]
Sync ieee80211_radiotap(9) manpage with NetBSD (mainly dyoung@netbsd.org)

17 years ago- Fix some comment.
Sepherosa Ziehau [Mon, 25 Dec 2006 14:42:36 +0000 (14:42 +0000)]
- Fix some comment.
- Add a note that radiotap fields are little-endian.
- Nuke comment about IEEE80211_RADIOTAP_FCS, because it wasn't adopted.

Obtained-from: NetBSD (dyoung@netbsd.org)

17 years agoregen
Sepherosa Ziehau [Mon, 25 Dec 2006 14:05:40 +0000 (14:05 +0000)]
regen

17 years agoAdd PCI ids for Broadcom BCM430x/BCM4318 wireless NICs
Sepherosa Ziehau [Mon, 25 Dec 2006 14:04:58 +0000 (14:04 +0000)]
Add PCI ids for Broadcom BCM430x/BCM4318 wireless NICs

17 years agoacx(4) firmware can't handle beacon missing, use software beacon missing
Sepherosa Ziehau [Mon, 25 Dec 2006 12:19:10 +0000 (12:19 +0000)]
acx(4) firmware can't handle beacon missing, use software beacon missing
processing instead.

17 years agoAdd a note that ndp(8) uses these sources.
Peter Avalos [Mon, 25 Dec 2006 02:39:29 +0000 (02:39 +0000)]
Add a note that ndp(8) uses these sources.

17 years agoUpgrade to tcpdump-3.9.5.
Peter Avalos [Mon, 25 Dec 2006 02:37:09 +0000 (02:37 +0000)]
Upgrade to tcpdump-3.9.5.

17 years agoUpgrade to libpcap-0.9.5 and tcpdump-3.9.5.
Peter Avalos [Mon, 25 Dec 2006 00:42:01 +0000 (00:42 +0000)]
Upgrade to libpcap-0.9.5 and tcpdump-3.9.5.

17 years agoMerge from vendor branch LIBPCAP:
Peter Avalos [Mon, 25 Dec 2006 00:32:20 +0000 (00:32 +0000)]
Merge from vendor branch LIBPCAP:
Import LIBPCAP 0.9.5

17 years agoImport LIBPCAP 0.9.5
Peter Avalos [Mon, 25 Dec 2006 00:32:20 +0000 (00:32 +0000)]
Import LIBPCAP 0.9.5

17 years agoMerge from vendor branch TCPDUMP:
Peter Avalos [Mon, 25 Dec 2006 00:17:50 +0000 (00:17 +0000)]
Merge from vendor branch TCPDUMP:
Import of TCPDUMP 3.9.5

17 years agoImport of TCPDUMP 3.9.5
Peter Avalos [Mon, 25 Dec 2006 00:17:50 +0000 (00:17 +0000)]
Import of TCPDUMP 3.9.5

17 years agoRestart TX rate control algorithm for a peer node, if its current TX
Sepherosa Ziehau [Sun, 24 Dec 2006 11:39:59 +0000 (11:39 +0000)]
Restart TX rate control algorithm for a peer node, if its current TX
rate index is beyond the number of TX rates it supports.

This could happen at least in following way:
1) Start a 11g HOSTAP, which uses TX rate control algorithm
2) Use a 11g cardbus wireless card as STA, set its mode to "auto" or
   "11g" and join the BSS created by HOSTAP
3) Transmit some packets from HOSTAP to STA and make sure that TX rate
   index for the STA reaches maximum.
4) Unplug the cardbus wireless card, so it has no chance to send out
   disassociation management frame.
5) Plug the cardbus wireless card back immediately, set its mode to
   "11b" and join the BSS created by HOSTAP again.

17 years agoList more RT2501USB/RT2601USB devices in rum(4) manpage.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:50:11 +0000 (05:50 +0000)]
List more RT2501USB/RT2601USB devices in rum(4) manpage.

Obtained-from: OpenBSD

17 years agoList more RT2500USB devices in ural(4) manpage
Sepherosa Ziehau [Sun, 24 Dec 2006 05:44:36 +0000 (05:44 +0000)]
List more RT2500USB devices in ural(4) manpage

Obtained-from: OpenBSD

17 years agoAdd more ids for RT2500USB.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:18:22 +0000 (05:18 +0000)]
Add more ids for RT2500USB.

Obtained-from: OpenBSD

17 years agoregen
Sepherosa Ziehau [Sun, 24 Dec 2006 05:17:16 +0000 (05:17 +0000)]
regen

17 years agoAdd more ids for RT2500USB.
Sepherosa Ziehau [Sun, 24 Dec 2006 05:16:43 +0000 (05:16 +0000)]
Add more ids for RT2500USB.

Obtained-from: OpenBSD

17 years agoMention MCP67 in nfe(4) manpage
Sepherosa Ziehau [Sun, 24 Dec 2006 05:01:07 +0000 (05:01 +0000)]
Mention MCP67 in nfe(4) manpage

17 years agoAdd NVIDIA MCP67 LAN support.
Sepherosa Ziehau [Sun, 24 Dec 2006 04:58:27 +0000 (04:58 +0000)]
Add NVIDIA MCP67 LAN support.

Obtained-from: OpenBSD

17 years agoregen
Sepherosa Ziehau [Sun, 24 Dec 2006 04:57:13 +0000 (04:57 +0000)]
regen

17 years agoAdd NVIDIA MCP67 Lan PCI ids.
Sepherosa Ziehau [Sun, 24 Dec 2006 04:56:37 +0000 (04:56 +0000)]
Add NVIDIA MCP67 Lan PCI ids.

17 years agoAdd more chip id for fxp(4)
Sepherosa Ziehau [Sun, 24 Dec 2006 03:30:56 +0000 (03:30 +0000)]
Add more chip id for fxp(4)

Obtained-from: FreeBSD

17 years agoAnsify function declarations and fix some minor style issues.
Sascha Wildner [Sat, 23 Dec 2006 23:47:54 +0000 (23:47 +0000)]
Ansify function declarations and fix some minor style issues.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

17 years agoRemove printf() definition and prototype from the kernel.
Sascha Wildner [Sat, 23 Dec 2006 20:05:34 +0000 (20:05 +0000)]
Remove printf() definition and prototype from the kernel.

17 years agoSync em(4) manpage with the one in Intel em 6.2.9
Sepherosa Ziehau [Sat, 23 Dec 2006 10:42:29 +0000 (10:42 +0000)]
Sync em(4) manpage with the one in Intel em 6.2.9

17 years agoSync with Intel's em-6.2.9
Sepherosa Ziehau [Sat, 23 Dec 2006 10:39:16 +0000 (10:39 +0000)]
Sync with Intel's em-6.2.9
- Support more chips.
- Implement suspend/resume device methods.
- Correct promisc mode support.
- Code and comment clean up.
- Avoid reinitializing the hardware if only IP address is changed.  This is
  implemented in a different way from Intel's:
  If IFF_RUNNING is set, em_init() will return immediately.  So for some
  situation in which em_init() must run, IFF_RUNNING is cleared before calling
  em_init().
- Rework TX processing:
  In em_encap(), save the index of the packet's last TX descriptor (EOP) in
  the packet's first descriptor.  In em_txeof(), test E1000_TXD_STAT_DD bit
  only for last TX descriptor (EOP) of certain packet.  If it is set, then
  reap the TX descriptors of the packet in an inner loop.
  "This change is important for future chips, where DD bit is going
   to be set only on the EOP descriptors." -- Jack Vogel at Intel

17 years ago- Replace magic number with macro.
Sepherosa Ziehau [Sat, 23 Dec 2006 09:44:26 +0000 (09:44 +0000)]
- Replace magic number with macro.
- In iwi_auth_and_assoc(), add assertion before the questionable memcpy().
  After recent bug fixing in 802.11 layer, this assertion should not fail.

17 years agoSince all necessary bits are in 802_11 layer now:
Sepherosa Ziehau [Sat, 23 Dec 2006 09:26:23 +0000 (09:26 +0000)]
Since all necessary bits are in 802_11 layer now:
- Properly set basic rate set and operational rate set for acx100 part.
- Properly set basic rate set for acx111 part.
- More strigent rate checking

17 years agoMassive 802_11 XRATE bug fixing.
Sepherosa Ziehau [Sat, 23 Dec 2006 09:14:02 +0000 (09:14 +0000)]
Massive 802_11 XRATE bug fixing.

- Correct ieee80211_fix_rate(IEEE80211_F_DODEL) operation by entering
  IEEE80211_F_DONEGO code segment but avoiding real negotiation.
- In ieee80211_fix_rate(), remove duplicated rates if rate set is to
  be sorted.  This should be enough to protect us against maliciously
  minted 802.11 management frames which contain supported rate and
  extended supported rate ies. [*]
- In ieee80211_sta_join(), call ieee80211_fix_rate(IEEE80211_F_DODEL),
  if the wireless NIC operates in STA mode.  So drivers can depend on
  ieee80211com.ic_bss's ni_rates even before entering RUN state, this
  is *very important* for certain driver e.g. iwi(4) [*].
- Add ic_nbasicrates in ieee80211com, which records the number of
  basic rates in the current BSS. [1]
- Add a new function ieee80211_copy_basicrates().  This function is
  used to propagate IEEE80211_RATE_BASIC bit from second parameter
  to the first parameter.  It will return number of basic rates in
  the second parameter.  It is called in ieee80211_sta_join() to
  properly setup basic rates in ieee80211com.ic_sup_rates and
  ieee80211com.ic_nbasicrates. [2]
- Introduce extra parameter to ieee80211_setup_rates() and
  ieee80211_fix_rate().
  This parameter only affects how IEEE80211_F_DONEGO is done.
  Adjust IEEE80211_F_DONEGO behavior after introducing this parameter:
  If the new parameter is 1, then the negotiation is performed on the
  behalf of a STA which wants to join either an infrastructured or an
  independent BSS, and the rate set going to be negotiated is the BSS's
  supported rate set:
  o  Don't overwrite the BSS basic rate set.  So drivers and TX rate
     control algorithm can have knowledge of the BSS basic rate set and
     can do various setting accordingly.
  o  Avoid joining the BSS, if certain rates in the BSS basic rate set
     are not supported.
  If the new parameter is 0, then the negotiation is performed on the
  behalf of a HOSTAP, or a STA that already joined/started an independent
  BSS, and the rate set going to be negotiated is peer STA's supported
  rate set:
  o  Overwrite the basic rates of peer STA's supported rate set with
     basic rates in ieee80211com.ic_sup_rates, which is set up properly
     in ieee80211_sta_join() by ieee80211_copy_basicrates() (see [2]),
     so TX rate control algorithm can act accordingly.
  o  If the current operation mode is IEEE80211_M_HOSTAP, use a counter
     to bookkeep how many basic rates got overwritten during negotiation.
     If at the end of the negotiation the counter is less than
     ieee80211com.ic_nbasicrates (see [1] and [2]), then it means that
     the peer STA does not support certain rates in our basic rate set.
     This kind of STA should not be allowed to join the current BSS.
     This prevention mechanism should be more straightforword than the
     old one in ieee80211_recv_mgmt(), nuke the old prevention mechanism
     after this change.
- In ieee80211_init_neighbor(), do full rate set negotiation, so nodes
  created by ieee80211_add_neighbor() or ieee80211_fakeup_adhoc_node(),
  will not contain rates that the wireless NIC does not support.
- In ieee80211_{beacon,probe_resp}_alloc(), use ieee80211com.ic_sup_rates
  to setup supported rates and extended supported rates ie, instead of
  using ieee80211com.ic_bss's ni_rates.  So two 11g STAs in a 11g/11b
  mixed IBSS can comunicate with each other using OFDM rates, given proper
  protection, like RTS-CTS/CTS-to-self, is applied. [**]
- In ieee80211_send_mgmt(), use ieee80211com.ic_sup_rates to create
  supported rates and extended supported rates ie of (re)association
  response.  So these ies are consistent with what's in beacon and probe
  response. [**]
- In ieee80211_send_mgmt(), use ieee80211_probe_resp_alloc() to create
  frame body of probe response.
- Add more XRATE debug messages.

#
# [*] Details:
# http://lists.freebsd.org/pipermail/freebsd-current/2006-October/066679.html
#
# [**] Basic rates in ieee80211com.ic_sup_rates are set beforehand (see [2])
#

17 years ago- Don't call m_adj() to make RX buffer's _payload_ on longword aligned,
Sepherosa Ziehau [Sat, 23 Dec 2006 03:41:55 +0000 (03:41 +0000)]
- Don't call m_adj() to make RX buffer's _payload_ on longword aligned,
  because some re(4) chips (e.g. RTL8101E) require RX buffer to be
  8-bytes aligned.  This change shows no noticeable performance change.
Reported-by: Joe Talbott <josepht@cstone.net>
- Avoid writing extra hardware registers by writing 2 bytes to IDR4
  instead instead of writing 4 bytes, bacause:
  1) the extra two registers after IDR5 are reserved.
  2) accessing arpcom.ac_enaddr[6,7] should be invalid.
- Add a flag field in re_softc and re_hwrev.  Currently only one flag,
  RE_F_HASMPC, is defined.  This flag is used to indicate whether the
  hardware has MPC register or not, so we can avoid writing to MPC's
  position, if that position is reserved.
- Move descriptor ring address setting up before RX/TX enabling, since
  some re(4) chips (e.g. RTL8101E) will try accessing descriptor ring
  immediately after RX/TX is enabled, which results in intermittent
  kernel panic or system hanging.
Paniced-by: Joe Talbott <josepht@cstone.net>
- Avoid calling re_init(), if hw.reX.tx_moderation is changed but NIC
  is not up yet.
- Const-fy global hardware id arrays and nuke unused macro while I'm here.

Thank Joe Talbott <josepht@cstone.net> to help debugging and provide
valuable information (esp. locating the problematic RX/TX enabling :)

Thank dillon@ to provide debugging hints.

Tested-by:
  Joe Talbott <josepht@cstone.net> (RTL8101E)
  swildner@ (onboard RTL8169S) (*)
  me (RTL8169S)

# (*) swildner@'s card is still half broken even after this commit :\

17 years agoRemove an #ifdef _KERNEL inside an #ifdef _KERNEL.
Sascha Wildner [Sat, 23 Dec 2006 02:58:09 +0000 (02:58 +0000)]
Remove an #ifdef _KERNEL inside an #ifdef _KERNEL.

17 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:41:31 +0000 (00:41 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

17 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:35:05 +0000 (00:35 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

17 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Sat, 23 Dec 2006 00:27:03 +0000 (00:27 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

17 years agoRename printf -> kprintf in sys/ and add some defines where necessary
Sascha Wildner [Fri, 22 Dec 2006 23:57:54 +0000 (23:57 +0000)]
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).