aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
...
* Several changes breaking netgraph module ABI collected together:Alexander Motin2008-04-151-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | - reorder structures fields (XX_refs) a bit to group fields modified same time together. According to my tests it gives up to 10% SMP performance benefit on real workload due to reduced inter-CPU cache trashing. - change q_flags from long to int as long is not really needed there and it's usage with atomics is argued by some people. - move NGF_WORKQ flag into the separate field q_flags2 as it protected by queue mutex instead of node writer protection used by the rest of flags. - move nd_work queue entry to ng_queue structure to which it is more related and make it STAILQ instead of TAILQ as now it is a classic FIFO. - remove q_node pointer from ng_queue structure as it is not really needed. - reimplement item queue using STAILQ instead of own equal implementation. As soon as BT subsystem has own item queues using ng_item.el_next update it also. - change depth field in ng_item from uintptr_t to u_int. It was made uintptr_t to keep ABI compatibility. Reviewed by: julian, emax Tested with: Netperf cluster Notes: svn path=/head/; revision=178228
* Fix locking issue in ng_btsocket_l2cap_ctloutput()Maksim Yevmenkin2007-10-311-2/+4
| | | | | | | | Submitted by: Heiko Wundram (Beenic) < wundram at beenic dot net > MFC after: 3 days Notes: svn path=/head/; revision=173231
* Allow RFCOMM servers to bind to a ''wildcard'' RFCOMM channelMaksim Yevmenkin2007-10-291-31/+53
| | | | | | | | | | | | | | zero (0). Actual RFCOMM channel will be assigned after listen(2) call is done on a RFCOMM socket bound to a ''wildcard'' RFCOMM channel zero (0). Address locking issues in ng_btsocket_rfcomm_bind() Submitted by: Heiko Wundram (Beenic) < wundram at beenic dot net > MFC after: 1 week Notes: svn path=/head/; revision=173151
* Return EADDRNOTAVAIL instead of EDESTADDRREQ error whenMaksim Yevmenkin2007-08-232-2/+2
| | | | | | | | | | | listen(2) is called on improperly bound socket. Suggested by: Iain Hibbert Approved by: re (kensmith) MFC after: 3 days Notes: svn path=/head/; revision=171937
* Make ng_h4(4) MPSAFE. Use similar to ng_tty(4) locking strategy.Maksim Yevmenkin2007-08-134-188/+174
| | | | | | | | | | | Reconnect ng_h(4) back to the build. Reviewed by: kensmith Approved by: re (kensmith) MFC after: 1 month Notes: svn path=/head/; revision=171818
* Mark ng_h4(4) as not MPSAFE and disconnect it from the build for now.Maksim Yevmenkin2007-07-101-1/+1
| | | | | | | Approved by: re (rwatson) Notes: svn path=/head/; revision=171345
* These modules depend on usb, make that explicitWarner Losh2007-06-232-0/+4
| | | | | | | Approved by: re@ Notes: svn path=/head/; revision=170999
* Replace sosend() with direct call to .pru_send method on theMaksim Yevmenkin2007-06-211-2/+2
| | | | | | | | | | | L2CAP socket. This is to avoid LOR with sx(9) lock in sblock() called from sosend_generic(). Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=170972
* Fix build problem caused by a set of typos.Xin LI2007-06-191-6/+6
| | | | | | | | Reported by: tinderbox Approved by: re (mux) Notes: svn path=/head/; revision=170952
* Finish removing usb_port.h compat macros.Warner Losh2007-06-182-26/+71
| | | | Notes: svn path=/head/; revision=170933
* Remove two more instances of the USBDEV() macro.Ruslan Ermilov2007-06-131-2/+2
| | | | Notes: svn path=/head/; revision=170662
* Catch up with USB cleanups and fix the worldMaksim Yevmenkin2007-06-131-21/+15
| | | | Notes: svn path=/head/; revision=170641
* Eliminate usb_thread_t.Warner Losh2007-06-121-4/+5
| | | | Notes: svn path=/head/; revision=170617
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromWarner Losh2007-06-122-6/+4
| | | | | | | usb_port.h. They aren't needed, and are a legacy of this code's past. Notes: svn path=/head/; revision=170612
* Expand USB_ATTACH_SETUP inline.Warner Losh2007-06-092-8/+2
| | | | | | | Kill devinfo stuff. Notes: svn path=/head/; revision=170456
* Despite several examples in the kernel, the third argument ofDavid Malone2007-06-041-4/+4
| | | | | | | | | | | | | | | | sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int. Remove the instances where a sizeof(variable) is passed to stop people accidently cut and pasting these examples. In a few places this was sysctl_handle_int was being used on 64 bit types, which would truncate the value to be exported. In these cases use sysctl_handle_quad to export them and change the format to Q so that sysctl(1) can still print them. Notes: svn path=/head/; revision=170289
* Universally adopt most conventional spelling of acquire.Robert Watson2007-05-271-1/+1
| | | | Notes: svn path=/head/; revision=170035
* Try to silence Coverity by adding (void) in front of function call.Maksim Yevmenkin2007-03-281-1/+11
| | | | | | | | | | Also add a comment, explaining why return value is not being checked. Requested by: netchild MFC after: 1 week Notes: svn path=/head/; revision=168009
* o Update a comment: sonewconn() lives in uipc_socket.c now.Maxim Konovalov2007-03-261-1/+1
| | | | Notes: svn path=/head/; revision=167907
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-063-3/+6
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* s/USBDEVNAME/device_get_nameunit/gMaksim Yevmenkin2006-09-072-110/+105
| | | | | | | s/USBBASEDEVICE/device_t/g Notes: svn path=/head/; revision=162134
* more usb fallout changesMatt Jacob2006-09-073-75/+86
| | | | Notes: svn path=/head/; revision=162103
* - Catch up with ongoing rwatson's socket work;Maksim Yevmenkin2006-08-252-184/+68
| | | | | | | | | | | | | - Fix a couple of LORs and panics; - Temporarily remove the code that tries to cleanup sockets that stuck on accepting queues (both complete and incomplete). I'm taking an ostrich approach here until I find a better way to deal with sockets that were disconnected before accepting (i.e. while socket was on complete or incomplete accept queue). Notes: svn path=/head/; revision=161623
* Define mtu as u_int16_t not as int. This should fix problem with rfcommMaksim Yevmenkin2006-08-241-1/+2
| | | | | | | | | | | on sparc64. Reported by: Andrew Belashov <bel at orel dot ru> Tested by: Andrew Belashov <bel at orel dot ru> MFC after: 3 days Notes: svn path=/head/; revision=161579
* soreceive_generic(), and sopoll_generic(). Add new functions sosend(),Robert Watson2006-07-241-5/+4
| | | | | | | | | | | | | | | | | | | soreceive(), and sopoll(), which are wrappers for pru_sosend, pru_soreceive, and pru_sopoll, and are now used univerally by socket consumers rather than either directly invoking the old so*() functions or directly invoking the protocol switch method (about an even split prior to this commit). This completes an architectural change that was begun in 1996 to permit protocols to provide substitute implementations, as now used by UDP. Consumers now uniformly invoke sosend(), soreceive(), and sopoll() to perform these operations on sockets -- in particular, distributed file systems and socket system calls. Architectural head nod: sam, gnn, wollman Notes: svn path=/head/; revision=160619
* Change semantics of socket close and detach. Add a new protocol switchRobert Watson2006-07-218-5/+39
| | | | | | | | | | | | | | | | | | | | | | function, pru_close, to notify protocols that the file descriptor or other consumer of a socket is closing the socket. pru_abort is now a notification of close also, and no longer detaches. pru_detach is no longer used to notify of close, and will be called during socket tear-down by sofree() when all references to a socket evaporate after an earlier call to abort or close the socket. This means detach is now an unconditional teardown of a socket, whereas previously sockets could persist after detach of the protocol retained a reference. This faciliates sharing mutexes between layers of the network stack as the mutex is required during the checking and removal of references at the head of sofree(). With this change, pru_detach can now assume that the mutex will no longer be required by the socket layer after completion, whereas before this was not necessarily true. Reviewed by: gnn Notes: svn path=/head/; revision=160549
* Replace inb() and outb() with bus_space_read_1() and bus_space_write_1()Maksim Yevmenkin2006-07-052-8/+12
| | | | | | | | Submitted by: marius MFC after: 1 week Notes: svn path=/head/; revision=160114
* Add new SIOC_HCI_RAW_NODE_LIST_NAMES ioctl. User-space applications canMaksim Yevmenkin2006-05-173-1/+75
| | | | | | | | | | | | | | | | use this ioctl to obtain the list of HCI nodes. User-space application is expected to preallocate 'ng_btsocket_hci_raw_node_list_names' structure and set limit in 'num_nodes' field. The 'nodes' field should be allocated as well and it should have space for at least 'num_nodes' elements. The SIOC_HCI_RAW_NODE_LIST_NAMES should be issued on bound raw HCI socket. It does not really really matter what HCI name the socket is bound to, as long as it is not empty. MFC after: 1 week Notes: svn path=/head/; revision=158672
* Chance protocol switch method pru_detach() so that it returns voidRobert Watson2006-04-017-39/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than an error. Detaches do not "fail", they other occur or the protocol flags SS_PROTOREF to take ownership of the socket. soclose() no longer looks at so_pcb to see if it's NULL, relying entirely on the protocol to decide whether it's time to free the socket or not using SS_PROTOREF. so_pcb is now entirely owned and managed by the protocol code. Likewise, no longer test so_pcb in other socket functions, such as soreceive(), which have no business digging into protocol internals. Protocol detach routines no longer try to free the socket on detach, this is performed in the socket code if the protocol permits it. In rts_detach(), no longer test for rp != NULL in detach, and likewise in other protocols that don't permit a NULL so_pcb, reduce the incidence of testing for it during detach. netinet and netinet6 are not fully updated to this change, which will be in an upcoming commit. In their current state they may leak memory or panic. MFC after: 3 months Notes: svn path=/head/; revision=157370
* Change protocol switch pru_abort() API so that it returns void ratherRobert Watson2006-04-017-12/+12
| | | | | | | | | | | | | | | | | than an int, as an error here is not meaningful. Modify soabort() to unconditionally free the socket on the return of pru_abort(), and modify most protocols to no longer conditionally free the socket, since the caller will do this. This commit likely leaves parts of netinet and netinet6 in a situation where they may panic or leak memory, as they have not are not fully updated by this commit. This will be corrected shortly in followup commits to these components. MFC after: 3 months Notes: svn path=/head/; revision=157366
* Fix -Wundef from compiling the amd64 LINT.Ruslan Ermilov2005-12-041-6/+6
| | | | Notes: svn path=/head/; revision=153084
* Use sparse initializers for "struct domain" and "struct protosw",Ruslan Ermilov2005-11-091-55/+31
| | | | | | | so they are easier to follow for the human being. Notes: svn path=/head/; revision=152242
* Push the assignment of a new or updated so_qlimit from solisten()Robert Watson2005-10-304-6/+6
| | | | | | | | | | | | | | | | | following the protocol pru_listen() call to solisten_proto(), so that it occurs under the socket lock acquisition that also sets SO_ACCEPTCONN. This requires passing the new backlog parameter to the protocol, which also allows the protocol to be aware of changes in queue limit should it wish to do something about the new queue limit. This continues a move towards the socket layer acting as a library for the protocol. Bump __FreeBSD_version due to a change in the in-kernel protocol interface. This change has been tested with IPv4 and UNIX domain sockets, but not other protocols. Notes: svn path=/head/; revision=151888
* Do not manually allocate/free device's softc structure.Maksim Yevmenkin2005-10-261-14/+2
| | | | | | | | Pointed by: jhb Reviewed by: imp, jhb Notes: svn path=/head/; revision=151726
* - Use swi_remove() to teardown swi handlers rather thanJohn Baldwin2005-10-261-2/+2
| | | | | | | | intr_event_remove_handler(). - Remove tty: prefix from a couple of swi handler names. Notes: svn path=/head/; revision=151700
* Catch up with new interrupt handling code.Ruslan Ermilov2005-10-261-3/+3
| | | | Notes: svn path=/head/; revision=151689
* Use new (inline) functions for calls into driver.Poul-Henning Kamp2005-10-161-2/+1
| | | | Notes: svn path=/head/; revision=151387
* Fix commentMaksim Yevmenkin2005-09-221-1/+1
| | | | Notes: svn path=/head/; revision=150482
* Finish last commit: actually remove compat methods from bt3c_pccard_methodsWarner Losh2005-09-221-7/+3
| | | | Notes: svn path=/head/; revision=150457
* Remove broken OLDCARD compat shims.Warner Losh2005-09-221-16/+4
| | | | | | | | "PC Card" is the correct spelling. "PC-Card" isn't, per the PCMCIA standard. Notes: svn path=/head/; revision=150456
* Fix dangling callout problem in the Bluetooth L2CAP code that leads toMaksim Yevmenkin2005-08-313-5/+14
| | | | | | | | | | | | | | | panic. The panic happens when outgoing L2CAP connection descriptor is deleted with the L2CAP command(s) pending in the queue. In this case when the last L2CAP command is deleted (due to cleanup) and reference counter for the L2CAP connection goes down to zero the auto disconnect timeout is incorrectly set. pjd gets credit for tracking this down and committing bandaid. Reported by: Jonatan B <onatan at gmail dot com> MFC after: 3 days Notes: svn path=/head/; revision=149679
* Fix multiple typos in the mutex names. This fixes false positive (and prettyMaksim Yevmenkin2005-08-231-4/+4
| | | | | | | | | strange looking too) LORs I have seen on my system. Pointy hat to goes to me. MFC after: 1 day Notes: svn path=/head/; revision=149382
* Stop callout before freeing memory, so it won't panic from softclock.Pawel Jakub Dawidek2005-08-211-0/+4
| | | | | | | | Reported by: Jonatan B <onatan@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=149356
* Before freeing memory, assert that there is no pending callout.Pawel Jakub Dawidek2005-08-211-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=149355
* Fix typo and check correct (rsp) pointer against the NULL value.Maksim Yevmenkin2005-07-291-1/+1
| | | | | | | | Submitted by: Oliver < urnenfel at tiscali dot es > MFC after: 1 day Notes: svn path=/head/; revision=148518
* Address minor locking issues. Use taskqueue_swi instead of taskqueue_swi_giant.Maksim Yevmenkin2005-07-282-74/+74
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=148487
* Ignore AVM BlueFRITZ! USB Bluetooth Adapter v1.0 (product ID 0x2200).Maksim Yevmenkin2005-07-191-0/+1
| | | | | | | | | | | It does not work with ng_ubt(4) and require special driver and firmware. Obtained from: Marcel Holtmann < marcel at holtmann dot org > Submitted by: Rainer Goellner < rainer at jabbe dot de > MFC after: 3 days Notes: svn path=/head/; revision=148146
* Add support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears thatMaksim Yevmenkin2005-07-181-1/+1
| | | | | | | | | | | | | | | there are at least two versions of the adapter. Version 1 (product ID 0x2200) of the adapter does not work with ng_ubt(4) and require special driver and firmware. Version 2 (product ID 0x3800) seems to work just fine, except it does not have bDeviceClass, bDeviceSubClass and bDeviceProtocol set to required (by specification) values. This change forces ng_ubt(4) to attach to the version 2 adapter. Obtained from: Marcel Holtmann <marcel at holtmann dot org> Submitted by: Rainer Goellner <rainer at jabbe dot de> Notes: svn path=/head/; revision=148124
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-1/+1
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580