Commit Graph

10 Commits

Author SHA1 Message Date
plunky 2c6dc8c043 upon device initialisation, query and cache the device features,
and cache the maximum ACL/SCO packet buffers.

provide an additional SIOCGBTFEAT ioctl to retrieve the cached
features, and add the max values to the SIOC?BTINFO results.

(btreq does not change size)
2010-11-22 19:56:51 +00:00
plunky b7dec17fbf add a per-unit master setting, to control requesting the master role
when accepting connections.
2009-08-20 21:40:59 +00:00
elad fda35a52f4 Add a bluetooth action to the device scope and use it in netbt as a
replacement for KAUTH_GENERIC_ISSUSER.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/25/msg004905.html

Bluetooth-specific authorization wrapper might come later.
2009-05-03 17:21:12 +00:00
plunky 736a9db087 Clean up the way that bluetooth drivers attach to the bluetooth stack,
to remove the frobbing that drivers must do in the hci_unit structure.

- driver provides a static const interface descriptor
- hci_unit is allocated by hci_attach() rather than part of softc
- statistics are compiled by driver and provided on request
- driver provides output methods and is responsible for output queue
- stack provides input methods and is responsible for input queue
- mutex is used to arbitrate device queue access
2007-11-28 20:16:11 +00:00
plunky 0b799668fb use more device_t and device_xxx() accessors
make bluetooth stack keep device_t instead of softc pointer as
device is not necessarily part of softc, and pass device_t to
driver callbacks. hci_devname is no longer required.
2007-11-10 23:12:22 +00:00
elad b2eb9a5389 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 19:07:03 +00:00
plunky 264c79359e 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@
2006-09-11 22:12:39 +00:00
plunky c980b109dd BluetootH SCO Audio update.
Provide an ioctl to set the SCO mtu value in the controller and
place limits in the SCO code such that only packets of this size
may be sent.

Move the mtu option from btsco(4) and btdevctl(8), to the
btconfig(8) program.

Remove temporary BLUETOOTH_SCO kernel option, and enable SCO
socket access.

Fix incoming connection handling for btsco(4) and SCO sockets.

Fix documentation to reflect the new world order.
2006-08-27 11:41:58 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00