path: root/sys/netgraph/bluetooth/include
Commit message (Collapse)AuthorAgeFilesLines
* MFS r366395: Fix Typo in ng_hci_le_connection_complete_ep struct.Kyle Evans2020-10-041-1/+1
| | | | | | | Approved by: re (gjb) Notes: svn path=/releng/12.2/; revision=366419
* MFC r360116:Hans Petter Selasky2020-05-181-3/+3
| | | | | | | | | | | | Substitute le_read_supported_status with le_read_supported_states. Refer to bluetooth core v5.2 specifications Vol4. Part E. 7.8.27. PR: 245763 Submitted by: Marc Veldman <marc@bumblingdork.com> Sponsored by: Mellanox Technologies Notes: svn path=/stable/12/; revision=361164
* sys: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2711-0/+22
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326272
* Make cached Bluetooth LE host advertise information visible from userland.Takanori Watanabe2017-04-273-4/+8
| | | | | | | Differential Revision: https://reviews.freebsd.org/D10362 Notes: svn path=/head/; revision=317506
* sys/netgraph: spelling fixes in comments.Pedro F. Giffuni2016-04-293-7/+7
| | | | | | | No functional change. Notes: svn path=/head/; revision=298813
* Bluetooth LE Security Management channel support.Takanori Watanabe2015-10-274-5/+22
| | | | | | | | | Add a socket option to block until underlying HCI connection encrypted. Differential Revision: https://reviews.freebsd.org/D3981 Notes: svn path=/head/; revision=290038
* Forgot to add default event mask definition.Takanori Watanabe2015-04-181-0/+3
| | | | Notes: svn path=/head/; revision=281683
* Initial Bluetooth LE support.Takanori Watanabe2015-04-074-7/+380
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=281198
* Use callout(9) instead of timeout(9).John Baldwin2014-09-202-2/+2
| | | | | | | Reviewed by: emax Notes: svn path=/head/; revision=271908
* Get those pesky RFCOMM RPM data bits right. This is likely a noop.Maksim Yevmenkin2009-09-101-2/+2
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=197083
* Introduce support for Bluetooth SCO sockets. This is based on olderMaksim Yevmenkin2008-07-301-0/+130
| | | | | | | | | code that was revisted. MFC after: 3 months Notes: svn path=/head/; revision=181033
* Get in some basic infrastructure for Bluetooth SCO support.Maksim Yevmenkin2008-07-102-0/+21
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=180399
* 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
* Change semantics of socket close and detach. Add a new protocol switchRobert Watson2006-07-213-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* Add new SIOC_HCI_RAW_NODE_LIST_NAMES ioctl. User-space applications canMaksim Yevmenkin2006-05-172-0/+11
| | | | | | | | | | | | | | | | 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-013-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-013-4/+4
| | | | | | | | | | | | | | | | | 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
* Push the assignment of a new or updated so_qlimit from solisten()Robert Watson2005-10-302-2/+2
| | | | | | | | | | | | | | | | | 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
* Fix dangling callout problem in the Bluetooth L2CAP code that leads toMaksim Yevmenkin2005-08-311-0/+1
| | | | | | | | | | | | | | | 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
* Make default RFCOMM session MTU match default L2CAP MTU.Maksim Yevmenkin2005-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This is just a workaround for a know problem with Motorola E1000 phone. Something is wrong with the configuration of L2CAP/RFCOMM channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it, the phone still sends oversized L2CAP packets. It appears that the phone wants to use bigger (667 bytes) RFCOMM frames, but it does not segment them according to the configured L2CAP MTU. The 667 bytes RFCOMM frame size corresponds to the default L2CAP MTU of 672 bytes (667 + 5 bytes RFCOMM frame header). This problem only appears if connection was initiated from the phone. I'm not sure who is at fault here, so for now just put workaround in place. Quick look at the spec did not reveal any anwser. Tested by: Jes < jjess at freebsd dot polarhome dot com > MFC after: 3 days Notes: svn path=/head/; revision=140027
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-0710-10/+30
| | | | Notes: svn path=/head/; revision=139823
* Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.Maksim Yevmenkin2005-01-041-1/+1
| | | | | | | | | | class is a reserved word in C++ Submitted by: Markus Brueffer < markus AT brueffer DOT de > MFC after: 3 days Notes: svn path=/head/; revision=139686
* Align netgraph message fields ready for 64-bit (and 128 bit :-) machines.Julian Elischer2004-08-201-6/+1
| | | | | | | | | | | | | requires a recompile of netgraph users. Also change the size of a field in the bluetooth code that was waiting for the next change that needed recompiles so it could piggyback its way in. Submitted by: jdp, maksim MFC after: 2 days Notes: svn path=/head/; revision=134057
* Introduce ng_hci_inquiry_response structure and use it in the hccontrol(8)Maksim Yevmenkin2004-08-101-7/+10
| | | | Notes: svn path=/head/; revision=133415
* Mode few Bluetooth defines into system include filesMaksim Yevmenkin2004-05-103-21/+1
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=129079
* Replace deprecated NG_NODELEN with the new NG_NODESIZ. There is oneHartmut Brandt2004-01-261-1/+6
| | | | | | | | | | problem here still to be solved: the sockaddr_hci has still a 16 byte field for the node name. The code currently does not correctly use the length field in the sockaddr to handle the address length, so node names get truncated to 15 characters when put into a sockaddr_hci. Notes: svn path=/head/; revision=125037
* Change double include protection style in headers to matchMaksim Yevmenkin2003-11-147-7/+7
| | | | | | | | | | the rest of Netgraph code. Reviewed by: imp, ru Approved by: imp (mentor) Notes: svn path=/head/; revision=122634
* Part one of undating the bluetooth code to the newest versionJulian Elischer2003-05-1010-72/+434
| | | | | | | | Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com> Approved by: re@ Notes: svn path=/head/; revision=114878
* The second try a committing the bluetooth codeJulian Elischer2002-11-209-0/+3477
Has been seen to work on several cards and communicating with several mobile phones to use them as modems etc. We are still talking with 3com to try get them to allow us to include the firmware for their pccard in the driver but the driver is here.. In the mean time it can be downloaded from the 3com website and loaded using the utility bt3cfw(8) (supplied) (instructions in the man page) Not yet linked to the build Submitted by: Maksim Yevmenkin <myevmenk@exodus.net> Approved by: re Notes: svn path=/head/; revision=107120