Commit Graph

86 Commits

Author SHA1 Message Date
perry
9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
plunky
d8436629a8 initialize loop variable as loop is not necessarily undertaken 2007-12-03 10:41:59 +00:00
kiyohara
13aed8da30 Print name of firmware on fail for firmware_open(). 2007-12-02 02:06:30 +00:00
kiyohara
6119aca096 Add support bgb2xx. (not test X-)
Add configuration rate with ericsson.
Change initialization at stlc2500.
Obsolate BTUART_HCITYPE_BT2000C.
2007-12-02 00:09:49 +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
kiyohara
b8e760f970 + Use device_t.
+ Increment rptr if send the ESCAPE char.
+ Use m_pkthdr.len for pktlen.
2007-11-28 01:31:55 +00:00
plunky
2bafcfdd48 improve visibility of [dis]connected messages 2007-11-12 19:19:32 +00:00
plunky
7cca9485cc convert device printf() usages to aprint_xxxx() 2007-11-11 12:59:02 +00:00
plunky
8658057a5d bluetooth stack now keeps a device_t and passes it to device callbacks,
update bcsp to new reality
2007-11-11 12:54:23 +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
ad
0f8b0df960 Call ttyflush() with tty_lock held. 2007-11-10 18:29:36 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
plunky
faccfc336c 'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
2007-11-03 18:24:00 +00:00
plunky
edb74239aa switch devices to using CFATTACH_DECL_NEW()
softc no longer contains 'struct device' by default
use 'device_t' instead of 'struct device *'
use device_xxx() accessor functions
remove casting of 'xxx_softc *' & 'struct device *'
use aprint_xxx_dev() routines
2007-11-03 17:41:03 +00:00
plunky
baebd7699a remove unnecessary cast (shortens long line) 2007-10-28 18:49:52 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
kiyohara
eb89d5dad9 + Add #ifdef DPRINTF{,N} before #undef.
+ Initialize m_pkthdr.len, and increment if not escape charactor.
+ Call bcsp_start() if there is no transmitted packet.
+ Call m_adj() after debug print.
+ Reset the values of the Sequencing layer if link reset it.
2007-10-14 18:13:49 +00:00
ad
46ed8f7d77 Use the softint API. 2007-10-08 16:18:02 +00:00
kiyohara
97cc00811e Fix some bugs.
* Cast to integer the 2nd args of m_adj().
  * Move test/set flag BTF_XMIT to bcsp_start().
  * The initialization of the array was clarified.
2007-10-04 14:43:06 +00:00
junyoung
24ae586ea3 Use __packed rather than __attribute__ ((__packed__)). 2007-10-02 05:40:10 +00:00
kiyohara
09fa5a563a Add bcsp(4). However, it is debuging state. 2007-09-30 04:07:41 +00:00
kiyohara
6410e0f367 No need to check the NULL, m_gethdr() calls always with M_WAIT. 2007-09-03 12:38:27 +00:00
kiyohara
a73632e439 Remove BTUART_DEBUG. 2007-08-15 16:48:31 +00:00
kiyohara
83f023eb3d Remove printf for debugging. 2007-07-23 03:45:27 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
plunky
f5db72e7b7 Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.

    - L2CAP or RFCOMM connections can require the baseband radio link
    mode be any of:
	authenticated (devices are paired)
	encrypted (implies authentication)
	secured (encryption, plus generate new link key)

    - for sockets, the mode is set using setsockopt(2) and the socket
    connection will be aborted if the mode change fails.

    - mode settings will be applied during connection establishment, and
    for safety, we enter a wait state and will only proceed when the mode
    settings are successfuly set.

    - It is possible to change the mode on already open connections, but
    not possible to guarantee that data already queued (from either end)
    will not be delivered. (this is a feature, not a bug)

    - bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
    "secure" options

    - btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
    keyboards (which are required to support it)
2007-04-21 06:15:22 +00:00
plunky
07ed1bdaa3 remove extraneous whitespace 2007-03-13 19:26:06 +00:00
kiyohara
4ecba574db Not KAUTH_DEVICE_TTY_OPEN but KAUTH_GENERIC_ISSUSER is used. 2007-03-12 14:12:13 +00:00
plunky
fdf9144e1f fix typo 2007-03-06 19:50:28 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
briggs
d298894138 Install sys/dev/bluetooth/btuart.h.
Descend into and build/install usr.sbin/btuartd.
Install etc/rc.d/btuartd.
2007-02-20 21:29:08 +00:00
kiyohara
10abd6f2e2 Supprot Bluetooth HCI UART (H4) driver and daemon. 2007-02-20 16:53:20 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
plunky
57c0199dcf Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
2006-11-12 19:00:42 +00:00
plunky
e500250b17 enable 'Application Control Pan' in Consumer usage group as an equivalent
to the Z direction since some mice (Apple Mighty Mouse) provide horizontal
scrolling direction with that report.
2006-10-31 19:17:04 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
plunky
c1ad03adbe Internally, use the service name as the identifier for matching 2006-10-04 19:23:59 +00:00
christos
a40b878b67 fix incomplete initializer 2006-10-04 15:38:14 +00:00
plunky
4eabff54a3 utilise auconv_set_converter() to handle the filter setup, so that its
done properly.
2006-09-24 10:19:55 +00:00
plunky
75521932f7 adjust indentation 2006-09-24 10:16:21 +00:00
plunky
d197e1ae6b guard against possible race conditions when detaching SCO pcb's 2006-09-23 16:11:07 +00:00
plunky
35e1b8aa38 return ENOTCONN when not connected, rather than EINVAL 2006-09-23 16:08:43 +00:00
thorpej
6cf1ffe998 Alter the protocol impemented by prop_kern to allow for bi-directional
plist-based messages and to eliminate looping previously required to
receive a plist from the kernel:

- prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl()
  now take the cmd argument rather than the file open flag.  The
  read-ness or write-ness of an ioctl command is checked by these
  routines to ensure that information is being passed to/from the
  userland component properly.

- prop_dictionary_copyout_ioctl() now allocates the memory for the
  XML plist on behalf of the userland component by way of uvm_mmap().
  The XML plist is copied out to the newly-mapped anonymous region,
  and the pointer returned via the plistref.

- prop_dictionary_recv_ioctl() is responsible for munmap()'ing the
  region after parsing the XML plist into internal represenatation.

- A new prop_dictionary_sendrecv_ioctl() is added, allowing user space
  code to send a dictionary to the kernel and receive one back as a
  reply.


Update users of prop_kern for the API changes (Bluetooth).

This constitutes an ABI / protocol change -- but this will also be put
into NetBSD 4.0 so that the first proplib release will implement the new
scheme.
2006-09-22 04:20:23 +00:00
plunky
ad28493ad1 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.
2006-09-12 18:18:01 +00:00
plunky
4b5125cac5 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@
2006-09-11 21:59:09 +00:00
plunky
ed4d8d47a0 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)
2006-09-11 18:30:27 +00:00
plunky
4f1cbddc12 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
2006-09-10 15:45:55 +00:00
plunky
ac9c65b377 Halt the callout on detach 2006-09-05 18:14:57 +00:00
christos
f7db588ec4 add missing initializer. 2006-08-28 00:14:50 +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