summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds2011-03-1618-1438/+4081
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits) bonding: enable netpoll without checking link status xfrm: Refcount destination entry on xfrm_lookup net: introduce rx_handler results and logic around that bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag bonding: wrap slave state work net: get rid of multiple bond-related netdevice->priv_flags bonding: register slave pointer for rx_handler be2net: Bump up the version number be2net: Copyright notice change. Update to Emulex instead of ServerEngines e1000e: fix kconfig for crc32 dependency netfilter ebtables: fix xt_AUDIT to work with ebtables xen network backend driver bonding: Improve syslog message at device creation time bonding: Call netif_carrier_off after register_netdevice bonding: Incorrect TX queue offset net_sched: fix ip_tos2prio xfrm: fix __xfrm_route_forward() be2net: Fix UDP packet detected status in RX compl Phonet: fix aligned-mode pipe socket buffer header reserve netxen: support for GbE port settings ... Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c with the staging updates.
| * Merge branch 'master' of ↵John W. Linville2011-03-047-269/+585
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6
| | * Bluetooth: Fix some small code style issues in mgmt.cSzymon Janc2011-03-011-9/+5
| | | | | | | | | | | | | | | Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Use variable name instead of type in sizeof()Szymon Janc2011-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | As written in the CodingStyle doc. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Remove unused code from get_connectionsSzymon Janc2011-03-011-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Command pointer was a leftover after moving controller index to mgmt_hdr. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Log all parameters in cmd_status for easier debuggingSzymon Janc2011-03-011-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix possible NULL pointer dereference in cmd_completeSzymon Janc2011-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is now possible to create command complete event without specific reply data by passing NULL as reply with len 0. Check pointer before calling memcpy to avoid undefined behaviour. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Use ERR_PTR as return error from hci_connectVille Tervo2011-02-274-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | Use ERR_PTR mechanism to return error from hci_connect. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Validate data size before accessing mgmt commandsSzymon Janc2011-02-271-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | Crafted (too small) data buffer could result in reading data outside of buffer. Validate buffer size and return EINVAL if size is wrong. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Acked-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Move index to common header in management interfaceSzymon Janc2011-02-271-227/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most mgmt commands and event are related to hci adapter. Moving index to common header allow to easily use it in command status while reporting errors. For those not related to adapter use MGMT_INDEX_NONE (0xFFFF) as index. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Acked-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Use proper command structure in remove_uuidSzymon Janc2011-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The structure used for command was wrong (probably copy-paste mistake). Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Acked-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Remove duplicated BT_INFO() from L2CAPGustavo F. Padovan2011-02-251-2/+0
| | | | | | | | | | | | | | | | | | | | | The message for the initialization of the L2CAP layer was being printed twice. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: remove unnecessary call to hci_sock_cleanupAnand Gadiyar2011-02-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | hci_sock_cleanup is already called after the sock_err label. It appears that we can drop this call. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: fix build break on hci_sock.cAnand Gadiyar2011-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux-next as of 20110217 complains when building for OMAP1. LD vmlinux `hci_sock_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `hci_sock_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o make: *** [vmlinux] Error 1 A recent patch by Gustavo (Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko) introduced this by calling the hci_sock_cleanup function in the error path of bt_init. Fix this by dropping the __exit marking for hci_sock_cleanup. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix LE conn creationAnderson Briglia2011-02-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prevents a crash when remote host tries to create a LE link which already exists. i.e.: call l2test twice passing the same parameters. Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix unnecessary list traversal in mgmt_pending_removeJohan Hedberg2011-02-211-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of the places that need to call mgmt_pending_remove already have a pointer to the pending command, so searching for the command in the list doesn't make sense. The added benefit is that many places that previously had to call list_del + mgmt_pending_free can just call mgmt_pending_remove now. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix inititial value for remote authentication requirementsJohan Hedberg2011-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remote authentication requirements for conections need to be initialized to 0xff (unknown) since it is possible that we receive a IO Capability Request before we have received information about the remote requirements. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Add mgmt_auth_failed eventJohan Hedberg2011-02-212-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To properly track bonding completion an event to indicate authentication failure is needed. This event will be sent whenever an authentication complete HCI event with a non-zero status comes. It will also be sent when we're acting in acceptor role for SSP authentication in which case the controller will send a Simple Pairing Complete event. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix mgmt_pin_code_reply return parametersJohan Hedberg2011-02-211-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The command complete event for mgmt_pin_code_reply & mgmt_pin_code_neg_reply should have the adapter index, Bluetooth address as well as the status. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Fix mgmt_pin_code_reply command status opcodeJohan Hedberg2011-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | The opcode for the ENODEV case was wrong (probably copy-paste mistake). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Add management support for user confirmation requestJohan Hedberg2011-02-212-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the user confirmation (numeric comparison) Secure Simple Pairing authentication method. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Add mgmt_pair_device commandJohan Hedberg2011-02-211-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new mgmt_pair_device which can be used to initiate a dedicated bonding procedure. Some extra callbacks are added to the hci_conn struct so that the pairing code can get notified of the completion of the procedure. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * Bluetooth: Make pending_add return a pointer to the added entryJohan Hedberg2011-02-211-22/+40
| | | | | | | | | | | | | | | | | | | | | | | | This makes it more convenient to do manipulations on the entry (needed by later commits). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix BT_L2CAP and BT_SCO in KconfigGustavo F. Padovan2011-02-281-2/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we want something "bool" built-in in something "tristate" it can't "depend on" the tristate config option. Report by DaveM: I give it 'y' just to make it happen, for both, and afterways no matter how many times I rerun "make oldconfig" I keep seeing things like this in my build: scripts/kconfig/conf --silentoldconfig Kconfig include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville2011-02-181-0/+2
| |\ | | | | | | | | | | | | | | | Conflicts: drivers/bluetooth/ath3k.c drivers/bluetooth/btusb.c
| * | Bluetooth: fix checkpatch errors in af_bluetooth.cGustavo F. Padovan2011-02-171-1/+1
| | | | | | | | | | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix errors reported by checkpatch.plGustavo F. Padovan2011-02-171-3/+3
| | | | | | | | | | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: fix errors reported by checkpatch.plGustavo F. Padovan2011-02-172-22/+18
| | | | | | | | | | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix some code style issues in hci_event.cSzymon Janc2011-02-171-8/+10
| | | | | | | | | | | | | | | Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix some code style issues in hci_core.cSzymon Janc2011-02-171-4/+3
| | | | | | | | | | | | | | | Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Clean up hci_sniff_subrate_evt functionSzymon Janc2011-02-171-9/+0
| | | | | | | | | | | | | | | Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>Szymon Janc2011-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | As warned by checkpatch.pl, use #include <linux/uaccess.h> instead of <asm/uaccess.h>. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Send LE Connection Update CommandClaudio Takahasi2011-02-162-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the new connection update parameter are accepted, the LE master host sends the LE Connection Update Command to its controller informing the new requested parameters. Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Use proper timer for hci command timoutVille Tervo2011-02-162-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use proper timer instead of hci command flow control to timeout failed hci commands. Otherwise stack ends up sending commands when flow control is used to block new commands. 2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10 bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000 2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4 Remote Name Request (0x01|0x0019) status 0x00 ncmd 0 2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6 bdaddr 00:16:CF:E1:C7:D7 Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) failsGustavo F. Padovan2011-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If the fail happens the HCI del_timer may timeout after the the hci dev unregister. This lead to a kernel crash. Reported-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add connection parameter update responseClaudio Takahasi2011-02-161-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements L2CAP Connection Parameter Update Response defined in the Bluetooth Core Specification, Volume 3, Part A, section 4.21. Address the LE Connection Parameter Procedure initiated by the slave. Connection Interval Minimum and Maximum have the same range: 6 to 3200. Time = N * 1.25ms. Minimum shall be less or equal to Maximum. The Slave Latency field shall have a value in the range of 0 to ((connSupervisionTimeout / connIntervalMax) - 1). Latency field shall be less than 500. connSupervisionTimeout = Timeout Multiplier * 10 ms. Multiplier field shall have a value in the range of 10 to 3200. Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add LE signaling commands handlingClaudio Takahasi2011-02-161-52/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits the L2CAP command handling function in order to have a clear separation between the commands related to BR/EDR and LE. Commands and responses in the LE signaling channel are not being handled yet, command reject is sent to all received requests. Bluetooth Core Specification, Volume 3, Part A, section 4 defines the signaling packets formats and allowed commands/responses over the LE signaling channel. Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Treat LE and ACL links separately on timeoutVille Tervo2011-02-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Separate LE and ACL timeouts. Othervise ACL connections on non LE hw will time out after 45 secs. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Fix initiated LE connectionsVinicius Costa Gomes2011-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix LE connections not being marked as master. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Do not send disconn comand over LE linksVille Tervo2011-02-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | l2cap over LE links can be disconnected without sending disconnect command first. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add server socket support for LE connectionVille Tervo2011-02-163-7/+104
| | | | | | | | | | | | | | | | | | | | | | | | Add support for LE server sockets. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add LE connection support to L2CAPVille Tervo2011-02-162-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic LE connection support to L2CAP. LE connection can be created by specifying cid in struct sockaddr_l2 Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Use LE buffers for LE trafficVille Tervo2011-02-163-4/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bluetooth chips may have separate buffers for LE traffic. This patch add support to use LE buffers provided by the chip. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add LE connect supportVille Tervo2011-02-162-3/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bluetooth V4.0 adds support for Low Energy (LE) connections. Specification introduces new set of hci commands to control LE connection. This patch adds logic to create, cancel and disconnect LE connections. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Add L2CAP mode to debugfs outputGustavo F. Padovan2011-02-151-2/+3
| | | | | | | | | | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: remove l2cap_load() hackGustavo F. Padovan2011-02-155-16/+0
| | | | | | | | | | | | | | | | | | | | | l2cap_load() was added to trigger l2cap.ko module loading from the RFCOMM and BNEP modules. Now that L2CAP module is gone, we don't need it anymore. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: Merge L2CAP and SCO modules into bluetooth.koGustavo F. Padovan2011-02-145-41/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually doesn't make sense have these modules built separately. The L2CAP layer is needed by almost all Bluetooth protocols and profiles. There isn't any real use case without having L2CAP loaded. SCO is only essential for Audio transfers, but it is so small that we can have it loaded always in bluetooth.ko without problems. If you really doesn't want it you can disable SCO in the kernel config. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: sco: fix information leak to userspaceVasiliy Kulikov2011-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | struct sco_conninfo has one padding byte in the end. Local variable cinfo of type sco_conninfo is copied to userspace with this uninizialized one byte, leading to old stack contents leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: bnep: fix buffer overflowVasiliy Kulikov2011-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Struct ca is copied from userspace. It is not checked whether the "device" field is NULL terminated. This potentially leads to BUG() inside of alloc_netdev_mqs() and/or information leak by creating a device with a name made of contents of kernel stack. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | Bluetooth: l2cap: fix 1 byte infoleak to userspaceVasiliy Kulikov2011-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Structure l2cap_options has one padding byte between max_tx and txwin_size fields. This byte in "opts" is copied to userspace uninitialized. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>