05 Jan, 2012

1 commit


24 Dec, 2011

1 commit


23 Dec, 2011

3 commits


21 Dec, 2011

3 commits


19 Dec, 2011

14 commits


17 Dec, 2011

1 commit


02 Dec, 2011

2 commits

  • Remove old code not touched for several years.

    Signed-off-by: Andrei Emeltchenko
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Andrei Emeltchenko
     
  • This patch adds the dev_flags field to struct hci_dev. This new
    flags variable should be used to define flags related to BR/EDR
    and/or LE controller itself. It should be used to define flags
    which represents states from the controller. The dev_flags is
    cleared in case the controller sends a Reset Command Complete
    Event to the host.

    Also, this patch adds the HCI_LE_SCAN flag which was created to
    track if the controller is performing LE scan or not. The flag
    is set/cleared when the controller starts/stops scanning.

    This is an initial effort to stop using hdev->flags to define
    internal flags since it is exported to userspace by an ioctl.

    Signed-off-by: Andre Guedes
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Andre Guedes
     

22 Nov, 2011

2 commits

  • Use queue instead of stack discipline for device list. When processing
    dev_list with list_for_each* devices will be prosessed in order they
    were added (Usually BR/EDR first and AMP later).

    Also output from hciconfig looks nicer :-)

    Signed-off-by: Andrei Emeltchenko
    Signed-off-by: Gustavo F. Padovan

    Andrei Emeltchenko
     
  • Fixes bluetooth compiling when CONFIG_BT_L2CAP is not enabled

    net/built-in.o: In function `hci_dev_open':
    (.text+0xdce9a): undefined reference to `enable_hs'

    Reported-by: Randy Dunlap
    Signed-off-by: Andrei Emeltchenko
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Andrei Emeltchenko
     

17 Nov, 2011

2 commits


09 Nov, 2011

4 commits

  • 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

    Johan Hedberg
     
  • 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

    Johan Hedberg
     
  • 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

    Johan Hedberg
     
  • 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

    Johan Hedberg
     

08 Nov, 2011

7 commits

  • 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

    Johan Hedberg
     
  • The power off code doesn't need to use its own custom timer since the
    delayed_work API provides the exact same functionality.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Gustavo F. Padovan

    Johan Hedberg
     
  • Based on the revised mgmt API set_discoverable has a timeout parameter
    to specify how long the adapter will remain discoverable. A value of 0
    means "indefinitively".

    Signed-off-by: Johan Hedberg
    Signed-off-by: Gustavo F. Padovan

    Johan Hedberg
     
  • This patch adds a function to hci_core to cancel an ongoing inquiry.

    According to the Bluetooth spec, the inquiry cancel command should
    only be issued after the inquiry command has been issued, a command
    status event has been received for the inquiry command, and before
    the inquiry complete event occurs.

    As HCI_INQUIRY flag is only set just after an inquiry command status
    event occurs and it is cleared just after an inquiry complete event
    occurs, the inquiry cancel command should be issued only if HCI_INQUIRY
    flag is set.

    Additionally, cancel inquiry related code from stop_discovery() were
    replaced by a hci_cancel_inquiry() call.

    Signed-off-by: Andre Guedes
    Signed-off-by: Gustavo F. Padovan

    Andre Guedes
     
  • This patch adds a function to hci_core to carry out inquiry.

    All inquiry code from start_discovery() were replaced by a
    hci_do_inquiry() call.

    Signed-off-by: Andre Guedes
    Signed-off-by: Gustavo F. Padovan

    Andre Guedes
     
  • It's convenient to use the HCI device index the AMP controller id, but
    the spec requires that an AMP controller never has id 0.

    Signed-off-by: Mat Martineau
    Acked-by: Marcel Holtmann
    Acked-by: Andrei Emeltchenko
    Signed-off-by: Gustavo F. Padovan

    Mat Martineau
     
  • To avoid starvation the priority is recalculated so that the starving
    channels are promoted to HCI_PRIO_MAX - 1 (6).

    HCI_PRIO_MAX (7) is considered special, because it requires CAP_NET_ADMIN
    capability which can be used to provide more guaranties, so it is not used
    when promoting.

    Signed-off-by: Luiz Augusto von Dentz
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Luiz Augusto von Dentz