summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵John W. Linville2011-03-043-33/+78
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6
| * Bluetooth: Move index to common header in management interfaceSzymon Janc2011-02-271-40/+3Star
| | | | | | | | | | | | | | | | | | | | 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: Add mgmt_auth_failed eventJohan Hedberg2011-02-212-0/+8
| | | | | | | | | | | | | | | | | | | | | | 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-0/+5
| | | | | | | | | | | | | | | | | | 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: Add management support for user confirmation requestJohan Hedberg2011-02-213-0/+41
| | | | | | | | | | | | | | | | 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-212-0/+28
| | | | | | | | | | | | | | | | | | | | 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>
* | cfg80211: add a field for the bitrate of the last rx data packet from a stationFelix Fietkau2011-03-012-1/+7
| | | | | | | | | | | | | | Also fix a typo in the STATION_INFO_TX_BITRATE description Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: support direct offchannel TX offloadJohannes Berg2011-02-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | For devices supported by iwlwifi sometimes off-channel transmissions need to be handled by the device completely. To support this mac80211 needs to pass the frame directly to the driver and not through the TX path as the driver needs the frame and channel information at the same time. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: make tx() operation return voidJohannes Berg2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: rename RX_FLAG_TSFTJohannes Berg2011-02-231-4/+5
|/ | | | | | | | | | The flag isn't very descriptive -- the intention is that the driver provides a TSF timestamp at the beginning of the MPDU -- make that clearer by renaming the flag to RX_FLAG_MACTIME_MPDU. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: when needed, reject IM input while disabling deviceRafał Miłecki2011-02-181-0/+2
| | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: remove invalid define SSB_TMSLOW_PHYCLKRafał Miłecki2011-02-181-1/+0Star
| | | | | | | | | It was incorrectly introduced in d2730b2a6a019d14455556019d744ab051e6554b. We have already fixed function to use correct define, but forgot remove old one. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Bluetooth: Fix some code style issues in hci_core.hSzymon Janc2011-02-171-29/+29
| | | | | 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-172-0/+13
| | | | | | | | | 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-1/+4
| | | | | | | | | | | | | | | | 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: Add connection parameter update responseClaudio Takahasi2011-02-161-0/+15
| | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | | 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: Add SMP command structuresVille Tervo2011-02-161-0/+76
| | | | | | | | Add command structures for security manager protocol. 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-161-0/+1
| | | | | | | | 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-161-0/+3
| | | | | | | | | | 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-161-0/+5
| | | | | | | | | 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-4/+23
| | | | | | | | | | | 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 low energy commands and eventsVille Tervo2011-02-161-0/+49
| | | | | | | | | Add needed HCI command and event structs to create 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: remove l2cap_load() hackGustavo F. Padovan2011-02-151-2/+0Star
| | | | | | | 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-141-0/+28
| | | | | | | | | | | 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>
* ssb: extract boardflags2 for SPROMs rev 4 and 5Rafał Miłecki2011-02-091-0/+4
| | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Bluetooth: move __l2cap_sock_close() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+2
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_sendmsg() to l2cap_sock.cGustavo F. Padovan2011-02-081-3/+8
| | | | | | Also moves some L2CAP sending functions declaration to l2cap.h Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_shutdown() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+2
| | | | | | Declare __l2cap_wait_ack() and l2cap_sock_clear_timer() in l2cap.h Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_recvmsg() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+4
| | | | | | | It causes the move of the declaration of 3 functions to l2cap.h: l2cap_get_ident(), l2cap_send_cmd(), l2cap_build_conf_req() Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_connect() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+1
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_getsockopt() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_setsockopt() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_getname() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_accept() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_bind()/listen() to l2cap_sock.cGustavo F. Padovan2011-02-081-2/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_release() to l2cap_sock.cGustavo F. Padovan2011-02-081-1/+0Star
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_ops to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+12
| | | | | | First step to move all l2cap_sock_ops function to l2cap_sock.c Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Initial work for L2CAP split.Gustavo F. Padovan2011-02-081-0/+15
| | | | | | | | | This patch tries to do the minimal to move l2cap_sock_create() and its dependencies to l2cap_sock.c. It create a API to initialize and cleanup the L2CAP sockets from l2cap_core.c through l2cap_init_sockets() and l2cap_cleanup_sockets(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add set_io_capability management commandJohan Hedberg2011-02-083-0/+16
| | | | | | | | | | This patch adds a new set_io_capability management command which is used to set the IO capability for Secure Simple Pairing (SSP) as well as the Security Manager Protocol (SMP). The value is per hci_dev and each hci_conn object inherits it upon creation. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add support for PIN code handling in the management interfaceJohan Hedberg2011-02-083-0/+32
| | | | | | | | | | This patch adds the necessary commands and events needed to communicate PIN code related actions between the kernel and userspace. This includes a pin_code_request event as well as pin_code_reply and pin_code_negative_reply commands. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add get_connections managment interface commandJohan Hedberg2011-02-081-0/+10
| | | | | | | | | | | This patch adds a get_connections command to the management interface. With this command userspace can get the current list of connected devices. Typically this command would only be used once when enumerating existing adapters. After that the connected and disconnected events are used to track connections. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add support for connect failed management eventJohan Hedberg2011-02-082-0/+8
| | | | | | | | | | This patch add a new connect failed management event to track failures in connecting to remote devices. It is particularly useful for security mode 3 scenarios when we don't have a connected state while pairing but still need to detect when the connect attempt failed. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add disconnect managment commandJohan Hedberg2011-02-082-0/+11
| | | | | | | | | This patch adds a disconnect command to the managment interface. Using this command user space is able to force the disconnection of connected devices. The command maps directly to the Disconnect HCI command. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add connected/disconnected management eventsJohan Hedberg2011-02-082-0/+14
| | | | | | | | | | This patch adds connected and disconnected managment events to track the connection status to remote devices. The events map directly to successful connection complete and disconnection complete HCI events for ACL links. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Implement link key handling for the management interfaceJohan Hedberg2011-02-083-0/+48
| | | | | | | | | | | This patch adds a management commands to feed the kernel with all stored link keys as well as remove specific ones or all of them. Once the load_keys command has been called the kernel takes over link key replies. A new_key event is also added to inform userspace of newly created link keys that should be stored permanently. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add class of device control to the management interfaceJohan Hedberg2011-02-083-0/+18
| | | | | | | | | | | | | | This patch adds the possibility for user space to fully control the Class of Device value of local adapters. To control the service class bits each UUID that's added comes with a service class "hint" which acts as a mask of bits that the UUID needs to have enabled. The set_service_cache management command is used to make sure we queue up all UUID changes as user space initializes its drivers and then send a single HCI_Write_Class_of_Device command when initialization is complete. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Implement a more complete adapter initialization sequenceJohan Hedberg2011-02-082-0/+13
| | | | | | | | | | | | | Using the managment interface means that user space doesn't need to do any HCI command sending at all. This patch moves the remaining initialization commands from user space to the kernel side. The patch makes use of the new feature of __hci_request which allows the request to be dynamically modified while it is ongoing (something that is needed to react appropriately to the local features and the version of the adapter). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add controller side link key clearing to hci_init_reqJohan Hedberg2011-02-081-0/+6
| | | | | | | | | | | | The controller may have link keys in its own memory and these keys could be used for secure connections. However, since the interface to access these keys doesn't provide information about the key types (which would be needed to infer the level of security each key provides) using these keys is rather useless. Therefore, simply clear the controller side list in the initialization procedure. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add special handling with __hci_request and HCI_INITJohan Hedberg2011-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | To support a more dynamic HCI initialization sequence the __hci_request behavior requires some more changes. Particularly, the init sequence should be able to have conditionals in it (sending some HCI commands depending on the outcome of a previous command) instead of being a fixed list as it is right now. The reasons for these additional requirements are the moving all previously user space driven initialization commands to the kernel side as well as the support the Low Energy controllers. To fulfull these requirements the init sequence is made the only special case for multi-command requests and req_last_cmd is renamed to init_last_cmd. The hci_send_cmd function is changed to update init_last_cmd as long as the HCI_INIT flag is set. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>