head	1.6;
access;
symbols
	perseant-exfatfs-base-20250801:1.6
	perseant-exfatfs-base-20240630:1.6
	perseant-exfatfs:1.6.0.22
	perseant-exfatfs-base:1.6
	cjep_sun2x:1.6.0.20
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	cjep_staticlib_x:1.6.0.18
	cjep_staticlib_x-base:1.6
	phil-wifi-20200421:1.6
	phil-wifi-20200411:1.6
	phil-wifi-20200406:1.6
	pgoyette-compat-merge-20190127:1.6
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.6
	pgoyette-compat-0906:1.6
	pgoyette-compat-0728:1.6
	pgoyette-compat-0625:1.6
	pgoyette-compat-0521:1.6
	pgoyette-compat-0502:1.6
	pgoyette-compat-0422:1.6
	pgoyette-compat-0415:1.6
	pgoyette-compat-0407:1.6
	pgoyette-compat-0330:1.6
	pgoyette-compat-0322:1.6
	pgoyette-compat-0315:1.6
	pgoyette-compat:1.6.0.16
	pgoyette-compat-base:1.6
	perseant-stdc-iso10646:1.6.0.14
	perseant-stdc-iso10646-base:1.6
	prg-localcount2-base3:1.6
	prg-localcount2-base2:1.6
	prg-localcount2-base1:1.6
	prg-localcount2:1.6.0.12
	prg-localcount2-base:1.6
	pgoyette-localcount-20170426:1.6
	bouyer-socketcan-base1:1.6
	pgoyette-localcount-20170320:1.6
	bouyer-socketcan:1.6.0.10
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	pgoyette-localcount-20161104:1.6
	localcount-20160914:1.6
	pgoyette-localcount-20160806:1.6
	pgoyette-localcount-20160726:1.6
	pgoyette-localcount:1.6.0.8
	pgoyette-localcount-base:1.6
	netbsd-5-2-3-RELEASE:1.4
	netbsd-5-1-5-RELEASE:1.4
	yamt-pagecache-base9:1.6
	yamt-pagecache-tag8:1.6
	tls-earlyentropy:1.6.0.4
	tls-earlyentropy-base:1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	netbsd-5-2-2-RELEASE:1.4
	netbsd-5-1-4-RELEASE:1.4
	netbsd-5-2-1-RELEASE:1.4
	netbsd-5-1-3-RELEASE:1.4
	agc-symver:1.6.0.6
	agc-symver-base:1.6
	tls-maxphys-base:1.6
	yamt-pagecache-base8:1.6
	netbsd-5-2:1.4.0.34
	yamt-pagecache-base7:1.6
	netbsd-5-2-RELEASE:1.4
	netbsd-5-2-RC1:1.4
	yamt-pagecache-base6:1.6
	yamt-pagecache-base5:1.6
	yamt-pagecache-base4:1.6
	netbsd-5-1-2-RELEASE:1.4
	netbsd-5-1-1-RELEASE:1.4
	yamt-pagecache-base3:1.6
	yamt-pagecache-base2:1.6
	yamt-pagecache:1.6.0.2
	yamt-pagecache-base:1.6
	cherry-xenmp:1.5.0.2
	cherry-xenmp-base:1.5
	bouyer-quota2-nbase:1.4
	bouyer-quota2:1.4.0.32
	bouyer-quota2-base:1.4
	matt-mips64-premerge-20101231:1.4
	matt-nb5-mips64-premerge-20101231:1.4
	matt-nb5-pq3:1.4.0.30
	matt-nb5-pq3-base:1.4
	netbsd-5-1:1.4.0.28
	netbsd-5-1-RELEASE:1.4
	netbsd-5-1-RC4:1.4
	matt-nb5-mips64-k15:1.4
	netbsd-5-1-RC3:1.4
	netbsd-5-1-RC2:1.4
	netbsd-5-1-RC1:1.4
	netbsd-5-0-2-RELEASE:1.4
	matt-nb5-mips64-premerge-20091211:1.4
	matt-premerge-20091211:1.4
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.4
	matt-nb4-mips64-k7-u2a-k9b:1.4
	matt-nb5-mips64-u1-k1-k5:1.4
	matt-nb5-mips64:1.4.0.26
	netbsd-5-0-1-RELEASE:1.4
	jym-xensuspend-nbase:1.4
	netbsd-5-0:1.4.0.24
	netbsd-5-0-RELEASE:1.4
	netbsd-5-0-RC4:1.4
	netbsd-5-0-RC3:1.4
	netbsd-5-0-RC2:1.4
	jym-xensuspend:1.4.0.22
	jym-xensuspend-base:1.4
	netbsd-5-0-RC1:1.4
	mjf-devfs2-base2:1.4
	netbsd-5:1.4.0.20
	netbsd-5-base:1.4
	matt-mips64-base2:1.4
	matt-mips64:1.4.0.18
	netbsd-4-0-1-RELEASE:1.3.2.1
	wrstuden-revivesa-base-3:1.4
	wrstuden-revivesa-base-2:1.4
	wrstuden-fixsa-newbase:1.3.2.1
	wrstuden-revivesa-base-1:1.4
	yamt-pf42-base4:1.4
	yamt-pf42-base3:1.4
	hpcarm-cleanup-nbase:1.4
	yamt-pf42-baseX:1.4
	yamt-pf42-base2:1.4
	wrstuden-revivesa:1.4.0.16
	wrstuden-revivesa-base:1.4
	yamt-pf42:1.4.0.14
	yamt-pf42-base:1.4
	mjf-devfs2:1.4.0.12
	mjf-devfs2-base:1.4
	keiichi-mipv6:1.4.0.10
	keiichi-mipv6-base:1.4
	mjf-devfs:1.4.0.8
	mjf-devfs-base:1.4
	matt-armv6-nbase:1.4
	matt-armv6-prevmlocking:1.4
	wrstuden-fixsa-base-1:1.3.2.1
	netbsd-4-0:1.3.2.1.0.2
	netbsd-4-0-RELEASE:1.3.2.1
	cube-autoconf:1.4.0.6
	cube-autoconf-base:1.4
	netbsd-4-0-RC5:1.3.2.1
	netbsd-4-0-RC4:1.3.2.1
	netbsd-4-0-RC3:1.3.2.1
	netbsd-4-0-RC2:1.3.2.1
	netbsd-4-0-RC1:1.3.2.1
	matt-armv6:1.4.0.4
	matt-armv6-base:1.4
	matt-mips64-base:1.4
	hpcarm-cleanup:1.4.0.2
	hpcarm-cleanup-base:1.4
	wrstuden-fixsa:1.3.0.4
	wrstuden-fixsa-base:1.3.2.1
	netbsd-4-base:1.3
	netbsd-4:1.3.0.2;
locks; strict;
comment	@# @;


1.6
date	2011.06.18.18.43.41;	author plunky;	state dead;
branches;
next	1.5;

1.5
date	2011.05.27.09.28.42;	author plunky;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2007.07.23.18.06.56;	author plunky;	state Exp;
branches
	1.4.18.1;
next	1.3;

1.3
date	2006.09.10.15.45.55;	author plunky;	state Exp;
branches
	1.3.2.1
	1.3.4.1;
next	1.2;

1.2
date	2006.08.14.18.55.18;	author plunky;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2006.08.13.09.03.23;	author plunky;	state Exp;
branches;
next	;

1.5.2.1
date	2011.06.23.14.18.26;	author cherry;	state dead;
branches;
next	;

1.4.18.1
date	2007.07.23.18.06.56;	author plunky;	state dead;
branches;
next	1.4.18.2;

1.4.18.2
date	2007.07.23.18.06.57;	author plunky;	state Exp;
branches;
next	;

1.3.2.1
date	2007.07.27.09.44.25;	author liamjfoy;	state Exp;
branches;
next	;

1.3.4.1
date	2007.09.03.06.57.50;	author wrstuden;	state Exp;
branches;
next	;

1.2.2.1
date	2006.09.07.13.47.50;	author tron;	state Exp;
branches;
next	1.2.2.2;

1.2.2.2
date	2006.09.14.21.16.34;	author riz;	state Exp;
branches;
next	;


desc
@@


1.6
log
@remove empty files
@
text
@@


1.5
log
@provide a new 'bluetooth' rc.d script, to handle Bluetooth configuration
in a simpler manner. This replaces btattach, btconfig, bthcid, btdevctl
and sdpd scripts, and also should not require any configuration settings
other than "bluetooth=YES", though the full range of configurations is
still possible.
@
text
@@


1.5.2.1
log
@Catchup with rmind-uvmplock merge.
@
text
@@


1.4
log
@add requirement for bthcid since devices may need to authenticate
@
text
@a0 39
#!/bin/sh
#
# $NetBSD: btdevctl,v 1.3 2006/09/10 15:45:55 plunky Exp $
#

# PROVIDE: btdevctl
# REQUIRE: bluetooth bthcid
# BEFORE:  LOGIN

$_rc_subr_loaded . /etc/rc.subr

name="btdevctl"
rcvar=${name}
required_files="/etc/bluetooth/btdevctl.conf"
start_cmd='do_btdevctl "-A" "Attaching"'
stop_cmd='do_btdevctl "-D" "Detaching"'

do_btdevctl()
{
	echo "${2} Bluetooth devices:"

	while read -r service address device junk; do
		case ${service} in
		\#*|"")
			continue
			;;
		esac

		if [ -z ${device} -o ${junk} ]; then
			echo "${name}: invalid entry"
			return 1
		fi

		/usr/sbin/btdevctl ${1} "-a" ${address} "-d" ${device} "-s" ${service}
	done < /etc/bluetooth/btdevctl.conf
}

load_rc_config ${name}
run_rc_command "$1"
@


1.4.18.1
log
@file btdevctl was added on branch matt-mips64 on 2007-07-23 18:06:57 +0000
@
text
@d1 39
@


1.4.18.2
log
@add requirement for bthcid since devices may need to authenticate
@
text
@a0 39
#!/bin/sh
#
# $NetBSD: btdevctl,v 1.4 2007/07/23 18:06:56 plunky Exp $
#

# PROVIDE: btdevctl
# REQUIRE: bluetooth bthcid
# BEFORE:  LOGIN

$_rc_subr_loaded . /etc/rc.subr

name="btdevctl"
rcvar=${name}
required_files="/etc/bluetooth/btdevctl.conf"
start_cmd='do_btdevctl "-A" "Attaching"'
stop_cmd='do_btdevctl "-D" "Detaching"'

do_btdevctl()
{
	echo "${2} Bluetooth devices:"

	while read -r service address device junk; do
		case ${service} in
		\#*|"")
			continue
			;;
		esac

		if [ -z ${device} -o ${junk} ]; then
			echo "${name}: invalid entry"
			return 1
		fi

		/usr/sbin/btdevctl ${1} "-a" ${address} "-d" ${device} "-s" ${service}
	done < /etc/bluetooth/btdevctl.conf
}

load_rc_config ${name}
run_rc_command "$1"
@


1.3
log
@update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
@
text
@d3 1
a3 1
# $NetBSD: btdevctl,v 1.2 2006/08/14 18:55:18 plunky Exp $
d7 1
a7 1
# REQUIRE: bluetooth
@


1.3.4.1
log
@Sync w/ NetBSD-4-RC_1
@
text
@d3 1
a3 1
# $NetBSD: btdevctl,v 1.3.2.1 2007/07/27 09:44:25 liamjfoy Exp $
d7 1
a7 1
# REQUIRE: bluetooth bthcid
@


1.3.2.1
log
@Pull up following revision(s) (requested by plunky in ticket #796):
	etc/rc.d/btdevctl: revision 1.4
add requirement for bthcid since devices may need to authenticate
@
text
@d3 1
a3 1
# $NetBSD$
d7 1
a7 1
# REQUIRE: bluetooth bthcid
@


1.2
log
@Fix typo in variable name
@
text
@d3 1
a3 1
# $NetBSD: btdevctl,v 1.1 2006/08/13 09:03:23 plunky Exp $
d14 3
a16 3
command="/usr/sbin/${name}"
start_cmd="btdevctl_start"
stop_cmd="btdevctl_stop"
d18 1
a18 1
btdevctl_start()
d20 1
a20 1
	echo 'Attaching Bluetooth devices:'
d22 11
a32 14
	#
	# If ${btdevctl_devices} is set, it should be a list of devices to
	# attach. Otherwise, all available devices will be attached.
	#

	devs="${btdevctl_devices:-$(cd /dev/ && echo btdev*)}"
	for dev in ${devs}; do
		${command} ${dev} attach -q
	done
}

btdevctl_stop()
{
	echo 'Detach Bluetooth devices:'
d34 2
a35 4
	devs="${btdevctl_devices:-$(cd /dev/ && echo btdev*)}"
	for dev in ${devs}; do
		${command} ${dev} detach -q
	done
@


1.2.2.1
log
@Pull up following revision(s) (requested by plunky in ticket #81):
	usr.sbin/postinstall/postinstall: revision 1.23
	distrib/sets/lists/man/mi: revision 1.919
	distrib/sets/lists/etc/mi: revision 1.174
	usr.sbin/btdevctl/btdevctl.c: revision 1.1
	usr.sbin/btdevctl/hid.c: revision 1.1
	usr.sbin/Makefile: revision 1.217
	usr.sbin/btdevctl/btdevctl.h: revision 1.1
	usr.sbin/btdevctl/btdevctl.8: revision 1.1
	etc/rc.d/btcontrol: file removal
	distrib/sets/lists/comp/mi: revision 1.910
	etc/rc.d/Makefile: revision 1.61
	usr.sbin/btdevctl/cfg.c: revision 1.1
	usr.sbin/btdevctl/dev.c: revision 1.1
	share/man/man4/btkbd.4: revision 1.2
	share/man/man4/bthidev.4: revision 1.4
	usr.sbin/btcontrol/hid.c: file removal
	usr.sbin/btdevctl/Makefile: revision 1.1
	share/man/man4/btsco.4: revision 1.3
	distrib/sets/lists/base/mi: revision 1.644
	share/man/man4/btdev.4: revision 1.3
	share/man/man4/btms.4: revision 1.2
	etc/mtree/special: revision 1.100
	share/man/man5/rc.conf.5: revision 1.105
	usr.sbin/btcontrol/cfg.c: file removal
	etc/rc.d/btdevctl: revision 1.1
	etc/defaults/rc.conf: revision 1.80
	usr.sbin/btcontrol/btcontrol.h: file removal
	usr.sbin/btcontrol/btcontrol.8: file removal
	usr.sbin/btcontrol/dev.c: file removal
	usr.sbin/btcontrol/btcontrol.c: file removal
	usr.sbin/btcontrol/Makefile: file removal
rename btcontrol(8) as btdevctl(8) to make it fit with the NetBSD naming
scheme for control programs. This fixes pr 34051.
@
text
@d27 1
a27 1
	devs="${btdev_devices:-$(cd /dev/ && echo btdev*)}"
@


1.2.2.2
log
@Pull up following revision(s) (requested by plunky in ticket #161):
	sys/dev/bluetooth/btdev.h: revision 1.4
	distrib/sets/lists/comp/mi: revision 1.922
	usr.sbin/postinstall/postinstall: revision 1.25
	sys/netbt/hci_unit.c: revision 1.3
	sys/netbt/hci_ioctl.c: revision 1.4
	usr.sbin/sdpd/profile.c: revision 1.2
	usr.sbin/btdevctl/btdevctl.c: revision 1.2
	share/man/man4/Makefile: revision 1.405
	distrib/sets/lists/man/mi: revision 1.930
	distrib/sets/lists/etc/mi: revision 1.176
	usr.sbin/sdpd/profile.c: revision 1.3
	usr.sbin/btdevctl/btdevctl.c: revision 1.3
	etc/MAKEDEV.tmpl: revision 1.62
	distrib/sets/lists/base/mi: revision 1.650
	usr.sbin/btdevctl/btdevctl.h: revision 1.2
	usr.bin/sdpquery/sdpquery.1: revision 1.4
	sys/netbt/rfcomm_session.c: revision 1.2
	usr.sbin/btdevctl/btdevctl.8: revision 1.3
	usr.bin/sdpquery/search.c: revision 1.2
	usr.sbin/sdpd/Makefile: revision 1.2
	sys/dev/bluetooth/Makefile: revision 1.3
	usr.sbin/btdevctl/cfg.c: file removal
	sys/netbt/files.netbt: revision 1.4
	usr.sbin/btdevctl/sdp.c: revision 1.1
	sys/dev/bluetooth/bthidev.c: revision 1.3
	etc/bluetooth/Makefile: revision 1.3
	sys/dev/pcmcia/files.pcmcia: revision 1.51
	sys/dev/bluetooth/bthidev.c: revision 1.4
	sys/dev/bluetooth/bthidev.h: revision 1.3
	usr.sbin/btdevctl/dev.c: file removal
	sys/dev/bluetooth/files.bluetooth: revision 1.10
	sys/arch/i386/conf/GENERIC: revision 1.777
	share/man/man4/ubt.4: revision 1.6
	share/man/man4/bthub.4: revision 1.3
	sys/netbt/hci.h: revision 1.5
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.202
	lib/libsdp/sdp.h: revision 1.2
	usr.sbin/btdevctl/print.c: revision 1.1
	share/man/man4/bthidev.4: revision 1.5
	share/man/man4/btdev.4: file removal
	usr.sbin/btdevctl/print.c: revision 1.2
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.205
	usr.sbin/btdevctl/Makefile: revision 1.2
	sys/dev/usb/files.usb: revision 1.70
	sys/netbt/l2cap_signal.c: revision 1.2
	sys/netbt/hci_link.c: revision 1.4
	sys/dev/bluetooth/bthub.c: revision 1.3
	share/man/man4/btsco.4: revision 1.5
	sys/netbt/hci_link.c: revision 1.5
	share/man/man4/btdev.4: revision 1.4
	sys/dev/bluetooth/btkbd.c: revision 1.3
	sys/dev/bluetooth/btdev.c: file removal
	sys/netbt/hci_event.c: revision 1.2
	sys/dev/bluetooth/btsco.h: revision 1.2
	etc/mtree/special: revision 1.101
	sys/dev/bluetooth/btsco.c: revision 1.3
	sys/conf/majors: revision 1.27
	usr.sbin/sdpd/hf.c: revision 1.1
	sys/dev/bluetooth/btsco.c: revision 1.4
	share/man/man5/rc.conf.5: revision 1.107
	sys/dev/bluetooth/btdev.c: revision 1.2
	etc/rc.d/btdevctl: revision 1.2
	usr.sbin/btdevctl/db.c: revision 1.1
	etc/rc.d/btdevctl: revision 1.3
	etc/bluetooth/btdevctl.conf: revision 1.1
	usr.sbin/btdevctl/hid.c: file removal
	sys/arch/i386/conf/GENERIC: revision 1.781
	sys/dev/bluetooth/btdev.h: revision 1.3
Make btdev default count explicit
Fix typo in variable name
update to bluetooth device attachment:
remove pseudo-device btdev(4) and inherent limitations
add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.
btdevctl(8) and its cache is updated to handle new semantics
etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
also include service name in dictionary being sent to kernel.
(this is not used just yet, but it might be in the future and it will
be easier if we dont have to provide code to handle its absence)
clarify the CAVEAT section somewhat
Add service discovery support for the Handsfree profile
Replace static 'FreeBSD' string with operating system name gleaned
from uname(3)
Halt the callout on detach
btsco.c:
 - sco_getopt(..., SO_SCO_MTU, ...) expects the address of a uint16_t,
   not an int. So change sc_mtu's type to uint16_t.
 - Try a little harder to ensure btsco_round_blocksize() does not
   return zero. Prevents a subsequent panic in audio_init_ringbuffer().
	from scw@@
Endian issues:
hci_event.c:
 - Convert memo->response.clock_offset to host-endian.
hci_ioctl.c:
 - printf format tweak (size_t)
hci_link.c:
 - Convert memo->response.clock_offset from host-endian.
 - Tweak a DIAGNOSTIC message.
l2cap_signal.c:
 - In l2cap_recv_config_req(), rp->scid is little-endian so make sure
   we convert from host-endian.
	from scw@@
hci_link.c:
 - In hci_link_free(), do not unlink items from a LIST queue within
   a LIST_FOREACH() iterator.
rfcomm_session.c:
 - In rfcomm_session_recv_mcc_nsc(), do not unlink items from a LIST
   queue within a LIST_FOREACH() iterator.
	from scw@@
guard against a possible situation where the list of l2cap channels is changed
when the bluetooth code is not expecting it to be. During a disconnect, we can
detach the channel that is being disconnected, but its not really safe to detach
any others.
Print explicit 64-bit types using the format macros from int_fmtio.h.
Unbreaks the build for our LP64 ports, where "long long" typically is
not 64 bits.
@
text
@d3 1
a3 1
# $NetBSD: btdevctl,v 1.2.2.1 2006/09/07 13:47:50 tron Exp $
d14 3
a16 3
required_files="/etc/bluetooth/btdevctl.conf"
start_cmd='do_btdevctl "-A" "Attaching"'
stop_cmd='do_btdevctl "-D" "Detaching"'
d18 1
a18 1
do_btdevctl()
d20 1
a20 1
	echo "${2} Bluetooth devices:"
d22 14
a35 11
	while read -r service address device junk; do
		case ${service} in
		\#*|"")
			continue
			;;
		esac

		if [ -z ${device} -o ${junk} ]; then
			echo "${name}: invalid entry"
			return 1
		fi
d37 4
a40 2
		/usr/sbin/btdevctl ${1} "-a" ${address} "-d" ${device} "-s" ${service}
	done < /etc/bluetooth/btdevctl.conf
@


1.1
log
@rename btcontrol(8) as btdevctl(8) to make it fit with the NetBSD naming
scheme for control programs. This fixes pr 34051.
@
text
@d3 1
a3 1
# $NetBSD: btdevctl$
d27 1
a27 1
	devs="${btdev_devices:-$(cd /dev/ && echo btdev*)}"
@


