03 Jan, 2012
2 commits
-
Stop Discovery Command Status Event should use mgmt status code.
Signed-off-by: Andre Guedes
Acked-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
This patch renames hdev->extfeatures to hdev->host_features since it
holds the extended features Page 1 (aka host features).Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
23 Dec, 2011
1 commit
-
Low Energy pairing is performed through the SMP (Security Manager Protocol)
mechanism rather than HCI.Signed-off-by: Brian Gix
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
20 Dec, 2011
1 commit
19 Dec, 2011
9 commits
-
This patch fixes user_confirm_neg_reply to use the appropriate struct
for accessing the call parameters.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
We do not want the service cache to be enabled indefinitely after
mgmt_read_info is called. To solve this a timer is added which will
automatically disable the cache if mgmt_set_dev_class isn't called
within 5 seconds of calling mgmt_read_info.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Due to the upcoming addition of a service cache timer the functions to
update the EIR and CoD need to be higher up in mgmt.c in order to avoid
unnecessary forward-declarations. This patch simply moves code around
without any other changes in order to make subsequent patches more
readable.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Instead of having an explicit service cache command we can make the mgmt
API simpler by implicitly enabling the cache when mgmt_read_info is
called for the first time and disabling it when mgmt_set_dev_class is
called.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Fast connectable is logically after the connectable property so that's
where it should show up in the code as well (it's also after connectable
in the settings bitfield).Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This patch updates the mgmt_read_info and related messages to the latest
management API which uses a bitfield of settings instead of individual
boolean values.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
hdev->workqueue should be only for rx/tx, so move this one out.
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
hdev->workqueue will be only for for rx/tx/cmd processing, all other small
works should go to the system workqueue for now.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Now we run everything in HCI in process context, so it's a better idea use
mutex instead spin_lock. The macro remains hci_dev_lock() (and I got rid
of hci_dev_lock_bh()), of course.Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
07 Dec, 2011
1 commit
01 Dec, 2011
1 commit
-
For some MITM protection pairing scenarios, the user is
required to enter or accept a 6 digit passkey.Signed-off-by: Brian Gix
Signed-off-by: Gustavo F. Padovan
23 Nov, 2011
1 commit
-
Conflicts:
drivers/net/wireless/iwlegacy/iwl-debugfs.c
drivers/net/wireless/iwlegacy/iwl-rx.c
drivers/net/wireless/iwlegacy/iwl-scan.c
drivers/net/wireless/iwlegacy/iwl-tx.c
include/net/bluetooth/bluetooth.h
22 Nov, 2011
2 commits
-
Low Energy (LE) pairing responses must be recognized and handled
differently from BR/EDR pairing responses. BR/EDR responses are
handled via HCI commands by the LMP layer, and LE responses are
handled by the Host.Signed-off-by: Brian Gix
Signed-off-by: Gustavo F. Padovan -
There are 4 possible User Responses to pairing requests,
and they all share the same checks and handling. This
restructures the handling of the two Confirm responses
in preperation for the second two.Signed-off-by: Brian Gix
Signed-off-by: Gustavo F. Padovan
17 Nov, 2011
8 commits
-
The mgmt_start_discovery command contains the type of discovery that
should be started so this should be passed to the start_discovery
function. This patch doesn't yet add any action depending on the type of
the requested discovery.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
The command complete event was completely missing for this command.
Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
The management protocol uses a single byte for error codes (aka command
status). In some places this value is directly copied from HCI and in
other a POSIX error number is used. This makes it impossible for
user-space to uniquily decipher the meaning of an error.To solve this issue a new mgmt-specific set of error codes is added
along with a conversion table for HCI status values.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
When the adapter state is already what is requested it's more friendly
to user-space to simply report success than to send a EALREADY error
message.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
When possible cmd_complete should be returned instead of cmd_status
since it contains the remote address (this helps user-space track what
exactly failed).Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
The kernel needs to know whether it should connect to a device over
BR/EDR or over LE. This is particularly important in the future when
dual-mode device may be connectable also over LE. It is also important
if/when we decide to move the LE advertisement cache from the kernel
into user-space. Adding the type to the mgmt command also ensures
conformance with the latest mgmt API spec.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
This patches creates mgmt_stop_discovery_failed() which removes
pending MGMT_OP_STOP_DISCOVERY commands and sends proper command
status events.This patch also fixes the MGMT_OP_STOP_DISCOVERY command leak in
case cancel inquiry fails.Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This patch renames the function mgmt_inquiry_failed() to
mgmt_start_discovery_failed(). This function is more related
to MGMT_OP_START_DISCOVERY command handling than to inquiry.
Besides, this functions will be reused by LE based discovery
procedures in case of failure.Signed-off-by: Andre Guedes
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
11 Nov, 2011
4 commits
-
Since disconnecting may fail the status needs to be communicated to user
space. This also updates the implementation to match the latest mgmt API
specification.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
Since the command can fail we need to have a proper response with the
remote address and a failure status for it. This also updates it to
conform to the latest mgmt API spec.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
The hci_conn callbacks are called with the hci_dev lock already held so
no locking should be attempted in them.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
It's necessary to know the distinction between public and random LE
addresses so the mgmt interface also needs to distinguish between them.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan
09 Nov, 2011
6 commits
-
Now that pending commands are hci_dev specific there's no need to check
whether a command matches hci_dev when iterating through them.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
For consistency the integer type should be u16 and not __u16.
Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
The cancel_delayed_work_sync function should not be used if we hold any
locks. Luckily all places where this is the case it is also safe to use
the non-sync version.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
Now that the pending commands are within struct hci_dev we can properly
control access to them throught the hci_dev locking mechanism.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
This patch moves the pending management command list (previously global
to mgmt.c) into struct hci_dev. This makes it possible to do proper
locking when accessing it (through the existing hci_dev locks) and
thereby avoid race conditions.Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan -
The current global pending command list in mgmt.c is racy. Possibly the
simplest way to fix it is to have per-hci dev lists instead of a global
one (all commands that need a pending struct are hci_dev specific).
This way the list can be protected using the already existing per-hci
dev lock. To enable this refactoring the first thing that needs to be
done is to ensure that the mgmt functions have access to the hci_dev
struct (instead of just the dev id).Signed-off-by: Johan Hedberg
Acked-by: Marcel Holtmann
Signed-off-by: Gustavo F. Padovan
08 Nov, 2011
4 commits
-
This patch adds address type info (typically BR/EDR vs LE) to management
messages that need this. This also ensures conformance to the latest
management API specification.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
BR/EDR link keys have their own commands and events (separate from SMP)
and the remove_keys command (previously remove_key) removes keys of any
kind for the specified remote address.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
We should return a ENETDOWN status response if the adapter is powered
off (i.e. the HCI_UP flag isn't set).Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan -
There's no need to deal with mgmt_pending_cmd when blocking and
unblocking devices since these actions are synchronous.Signed-off-by: Johan Hedberg
Signed-off-by: Gustavo F. Padovan