summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* Disconnect LE socket when the HCI connection associated is disconnected.takawata2016-06-073-3/+10
|
* sys/netgraph: spelling fixes in comments.pfg2016-04-2911-21/+21
| | | | No functional change.
* Remove slightly used const values that can be replaced with nitems().pfg2016-04-211-3/+2
| | | | Suggested by: jhb
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().jhibbits2016-02-271-2/+2
| | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
* Make it possible for sbappend() to preserve M_NOTREADY on mbufs, just likeglebius2016-01-081-2/+2
| | | | | | | | | | sbappendstream() does. Although, M_NOTREADY may appear only on SOCK_STREAM sockets, due to sendfile(2) supporting only the latter, there is a corner case of AF_UNIX/SOCK_STREAM socket, that still uses records for the sake of control data, albeit being stream socket. Provide private version of m_clrprotoflags(), which understands PRUS_NOTREADY, similar to m_demote().
* - grab ng_btsocket_l2cap_sockets_mtx lock inemax2015-12-231-0/+8
| | | | | | | | | | | ng_btsocket_l2cap_process_l2ca_enc_change() before calling ng_btsocket_l2cap_pcb_by_cid(); - handle possible NULL value returned from ng_btsocket_l2cap_pcb_by_cid(); Submitted by: Hans Petter Selasky; hps at selasky dot org MFC after: 1 week
* Create a USB_PNP_INFO and use it to export the existing PNPimp2015-12-112-7/+9
| | | | | | | | | | | tables. Some drivers needed some slight re-arrangement of declarations to accommodate this. Change the USB pnp tables slightly to allow better compatibility with the system by moving linux driver info from start of each entry to the end. All other PNP tables in the system have the per-device flags and such at the end of the elements rather that at the beginning. Differential Review: https://reviews.freebsd.org/D3458
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingimp2015-12-111-6/+6
| | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461
* Fix encryption error handling.takawata2015-11-072-4/+10
| | | | Close l2cap connection on encryption error.
* Bluetooth LE Security Management channel support.takawata2015-10-2716-52/+320
| | | | | | Add a socket option to block until underlying HCI connection encrypted. Differential Revision: https://reviews.freebsd.org/D3981
* Fix rfcomm_sppd regression I could reproduced.takawata2015-07-072-1/+5
| | | | | | | | To reproduce it, Two machine running FreeBSD and run rfcomm_sppd -c 3 -S rfcomm_sppd -a ${PEER} -c 3 on each side.
* Forgot to add default event mask definition.takawata2015-04-181-0/+3
|
* Initial Bluetooth LE support.takawata2015-04-0723-172/+1503
| | | | | | | | | Note that sockaddr_l2cap structure is changed , check socket address to initialize new structure member and define L2CAP_SOCKET_CHECKED before including ng_btsocket.h Differential Revision: https://reviews.freebsd.org/D2021 Reviewed by:emax
* In order to reduce use of M_EXT outside of the mbuf allocator andrwatson2015-01-062-8/+4
| | | | | | | | | | | | | | | | | | | | | socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division
* In preparation of merging projects/sendfile, transform bare access toglebius2014-11-123-6/+5
| | | | | | | | | | | | sb_cc member of struct sockbuf to a couple of inline functions: sbavail() and sbused() Right now they are equal, but once notion of "not ready socket buffer data", will be checked in, they are going to be different. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Fix multiple incorrect SYSCTL arguments in the kernel:hselasky2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Wrong integer type was specified. - Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes. - Logical OR where binary OR was expected. - Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs. - Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function. - Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement. - Updated "EXAMPLES" section in SYSCTL manual page. MFC after: 3 days Sponsored by: Mellanox Technologies
* Use callout(9) instead of timeout(9).jhb2014-09-204-17/+12
| | | | Reviewed by: emax
* Remove ifq_drops from struct ifqueue. Now queue drops are accounted inglebius2014-09-192-3/+0
| | | | | | | | | | struct ifnet if_oqdrops. Some netgraph modules used ifqueue w/o ifnet. Accounting of queue drops is simply removed from them. There were no API to read this statistic. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* PF_BLUETOOTH protocols: skip initialization of non-virtualized globalstrociny2014-06-105-0/+27
| | | | | | | | for non-default VNET instances. This fixes panic on a vnet initialization when ng_btsocket is loaded. MFC after: 1 week
* Be much more specific (and correct) about the device id matching.adrian2014-01-091-16/+16
| | | | | | | | | | These device IDs have an AR3012 bluetooth device that shows up with bcdDevice=1 when it doesn't have the firmware loaded, and bcdDevice=2 when it's ready to speak full HCI. Tested: * AR5B225 PCIe - AR9485 + AR3012
* Add support for the BCM20702A0 chipset, ASUS USB-BT400.eadler2013-09-011-0/+1
| | | | | PR: kern/181728 Submitted by: rakuco
* Sync USB bluetooth product list with Linux.hselasky2013-08-311-0/+60
| | | | MFC after: 1 week
* PR: kern/168520rodrigc2013-07-151-9/+1
| | | | Revert GRN 253255. It is not needed now that GRN 253346 is committed.
* PR: 168520 170096rodrigc2013-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | Submitted by: adrian, zec Fix multiple kernel panics when VIMAGE is enabled in the kernel. These fixes are based on patches submitted by Adrian Chadd and Marko Zec. (1) Set curthread->td_vnet to vnet0 in device_probe_and_attach() just before calling device_attach(). This fixes multiple VIMAGE related kernel panics when trying to attach Bluetooth or USB Ethernet devices because curthread->td_vnet is NULL. (2) Set curthread->td_vnet in if_detach(). This fixes kernel panics when detaching networking interfaces, especially USB Ethernet devices. (3) Use VNET_DOMAIN_SET() in ng_btsocket.c (4) In ng_unref_node() set curthread->td_vnet. This fixes kernel panics when detaching Netgraph nodes.
* PR: kern/168520rodrigc2013-07-121-1/+9
| | | | | | | | | | | | | | | Submitted by: "YAMAMOTO, Shigeru" <shigeru@iij.ad.jp> Reviewed by: adrian In PC-BSD 9.1, VIMAGE is enabled in the kernel config. For laptops with Bluetooth capability, such as the HP Elitebook 8460p, the kernel will panic upon bootup, because curthread->td_vnet is not initialized. Properly initialize curthread->td_vnet when initializing the Bluetooth stack. This allows laptops such as the HP Elitebook 8460p laptop to properly boot with VIMAGE kernels.
* Fix several typoseadler2013-05-121-1/+1
| | | | | | PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* Add blacklist entries for Atheros bluetooth device IDs that are known toadrian2013-04-051-0/+33
| | | | | | | | need firmware before they will re-attach as correctly functioning bluetooth devices. Reviewed by: maksim Obtained from: Linux ath3k device driver
* Use DEVMETHOD_END, as suggested by hselasky@.rakuco2012-12-261-1/+1
| | | | Approved by: glebius
* Use the correct USB interface macros instead of USB_IF_CSI.rakuco2012-12-261-1/+3
| | | | | | | | | | | | As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want to declare the device's interface class, subclass and protocol, not class, subclass and driver info. Follow-up to r244704. PR: kern/174707 Approved by: glebius MFC after: 1 week
* Add vendor IDs for Broadcom USB dongles (BCM20702).glebius2012-12-261-0/+4
| | | | | PR: kern/174707 Submitted by: rakuco
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-0515-46/+46
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* The USB Bluetooth driver should only grab its own interfaces. This allows thehselasky2012-09-301-4/+16
| | | | | | | USB bluetooth driver to co-exist with other USB device classes and drivers. Reported by: Geoffrey Levand MFC after: 1 week
* Fix compiler warnings, mostly signed issues,hselasky2012-04-021-6/+6
| | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-075-5/+5
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-075-6/+6
| | | | This means that their use is restricted to a single C file.
* - Move all USB device ID arrays into so-called sections,hselasky2011-06-242-3/+3
| | | | | | | | | | | | sorted according to the mode which they support: host, device or dual mode - Add generic tool to extract these data: tools/bus_autoconf Discussed with: imp Suggested by: Robert Millan <rmh@debian.org> PR: misc/157903 MFC after: 14 days
* usb: fix a missed use of use_generic in r222051avg2011-05-181-4/+5
| | | | | | | Submitted by: gcooper Pointyhat to: avg MFC after: 1 month X-MFC with: r222051
* Node constructor methods are supposed to be called in syscallglebius2011-04-182-8/+2
| | | | | | | context always. Convert nodes to consistently use M_WAITOK flag for memory allocation. Reviewed by: julian
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Mfp4 CH=177274,177280,177284-177285,177297,177324-177325bz2011-02-163-3/+21
| | | | | | | | | | | | | | | | | | | | | | VNET socket push back: try to minimize the number of places where we have to switch vnets and narrow down the time we stay switched. Add assertions to the socket code to catch possibly unset vnets as seen in r204147. While this reduces the number of vnet recursion in some places like NFS, POSIX local sockets and some netgraph, .. recursions are impossible to fix. The current expectations are documented at the beginning of uipc_socket.c along with the other information there. Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Reviewed by: jhb Tested by: zec Tested by: Mikolaj Golub (to.my.trociny gmail.com) MFC after: 2 weeks
* sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.mdf2011-01-126-21/+21
| | | | Commit the netgraph piece.
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-112-2/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* Fix typoemax2010-08-021-1/+1
| | | | | PR: kern/140590 MFC after: 3 days
* Get those pesky RFCOMM RPM data bits right. This is likely a noop.emax2009-09-101-2/+2
| | | | MFC after: 1 month
* Introduce and use a sysinit-based initialization scheme for virtualrwatson2009-07-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | network stacks, VNET_SYSINIT: - Add VNET_SYSINIT and VNET_SYSUNINIT macros to declare events that will occur each time a network stack is instantiated and destroyed. In the !VIMAGE case, these are simply mapped into regular SYSINIT/SYSUNINIT. For the VIMAGE case, we instead use SYSINIT's to track their order and properties on registration, using them for each vnet when created/ destroyed, or immediately on module load for already-started vnets. - Remove vnet_modinfo mechanism that existed to serve this purpose previously, as well as its dependency scheme: we now just use the SYSINIT ordering scheme. - Implement VNET_DOMAIN_SET() to allow protocol domains to declare that they want init functions to be called for each virtual network stack rather than just once at boot, compiling down to DOMAIN_SET() in the non-VIMAGE case. - Walk all virtualized kernel subsystems and make use of these instead of modinfo or DOMAIN_SET() for init/uninit events. In some cases, convert modular components from using modevent to using sysinit (where appropriate). In some cases, do minor rejuggling of SYSINIT ordering to make room for or better manage events. Portions submitted by: jhb (VNET_SYSINIT), bz (cleanup) Discussed with: jhb, bz, julian, zec Reviewed by: bz Approved by: re (VIMAGE blanket)
* Fix a typeo in the frame len function to unbreak the build, make it shorterthompsa2009-06-231-2/+2
| | | | while I am here.
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-232-106/+172
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-152-52/+52
|
* Rework socket upcalls to close some races with setup/teardown of upcalls.jhb2009-06-011-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Each socket upcall is now invoked with the appropriate socket buffer locked. It is not permissible to call soisconnected() with this lock held; however, so socket upcalls now return an integer value. The two possible values are SU_OK and SU_ISCONNECTED. If an upcall returns SU_ISCONNECTED, then the soisconnected() will be invoked on the socket after the socket buffer lock is dropped. - A new API is provided for setting and clearing socket upcalls. The API consists of soupcall_set() and soupcall_clear(). - To simplify locking, each socket buffer now has a separate upcall. - When a socket upcall returns SU_ISCONNECTED, the upcall is cleared from the receive socket buffer automatically. Note that a SO_SND upcall should never return SU_ISCONNECTED. - All this means that accept filters should now return SU_ISCONNECTED instead of calling soisconnected() directly. They also no longer need to explicitly clear the upcall on the new socket. - The HTTP accept filter still uses soupcall_set() to manage its internal state machine, but other accept filters no longer have any explicit knowlege of socket upcall internals aside from their return value. - The various RPC client upcalls currently drop the socket buffer lock while invoking soreceive() as a temporary band-aid. The plan for the future is to add a new flag to allow soreceive() to be called with the socket buffer locked. - The AIO callback for socket I/O is now also invoked with the socket buffer locked. Previously sowakeup() would drop the socket buffer lock only to call aio_swake() which immediately re-acquired the socket buffer lock for the duration of the function call. Discussed with: rwatson, rmacklem
OpenPOWER on IntegriCloud