11 Jan, 2012

1 commit


04 Jan, 2012

1 commit


03 Jan, 2012

5 commits

  • Remove unneeded skb_pull and correct packet length calculation
    removing magic number. Move BT_DBG after len check otherwise
    it could possibly access wrong memory.

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

    Andrei Emeltchenko
     
  • This patch queues hdev->adv_work on the system-wide workqueue
    instead of on hdev->workqueue. This way we keep only tx/rx works
    on hdev->workqueue.

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

    Andre Guedes
     
  • This patch fixes the adv_work delay. It should be set to ADV_
    CLEAR_TIMEOUT instead of (jiffies + ADV_CLEAR_TIMEOUT) since
    queue_delayed_work() receives the number of jiffies to wait
    before queueing. It also removes the unnecessary cancel_delayed_
    work_sync() call in case LE scan has been disabled.

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

    Andre Guedes
     
  • Copy the Features value according to the Page number.

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

    Andre Guedes
     
  • 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

    Andre Guedes
     

23 Dec, 2011

1 commit


21 Dec, 2011

3 commits


20 Dec, 2011

1 commit

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    (Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).

    Cc: "David S. Miller"
    Cc: netdev@vger.kernel.org
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     

19 Dec, 2011

6 commits


03 Dec, 2011

4 commits


02 Dec, 2011

3 commits

  • This patch adds the parameter struct and the command complete event
    handler to the LE Set Scan Parameter HCI command.

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

    Andre Guedes
     
  • 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
     
  • Upstream Code Aurora function with minor trivial fixes.
    Origin: git://codeaurora.org/kernel/msm.git

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

    Andrei Emeltchenko
     

01 Dec, 2011

1 commit


17 Nov, 2011

2 commits

  • 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

    Andre Guedes
     
  • 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

    Andre Guedes
     

11 Nov, 2011

2 commits


09 Nov, 2011

2 commits

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

  • 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

    Johan Hedberg
     
  • A proper mgmt_command_status should be returned to user-space if either
    discoverable or connectable enabling fails.

    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
     
  • By using periodic inquiry command we're not able to detect correctly
    when the controller has started inquiry.

    Today we have this workaround in inquiry result event handler
    to set the HCI_INQUIRY flag when it sees the first inquiry result
    event. This workaround isn't enough because the device may be
    performing an inquiry but the HCI_INQUIRY flag is not set. For
    instance, if there is no device in range, no inquiry result event
    is generated, consequently, the HCI_INQUIRY flags isn't set when
    it should so.

    We rely on HCI_INQUIRY flag to implement the discovery procedure
    properly. So, as we aren't able to clear/set the HCI_INQUIRY flag
    in a reliable manner, periodic inquiry events shouldn't change
    the HCI_INQUIRY flag.

    Thus, due to that issue and in order to keep compatibility with
    userspace, periodic inquiry events shouldn't send mgmt discovering
    events.

    In future, we might track if periodic inquiry is enabled or not.
    By tracking this state we'll be able to do some improvements in
    Discovery such as failing MGMT_OP_START_DISCOVERY command in case
    periodic inquiry is on. We can also send no mgmt_device_found
    event if periodic inquiry is on.

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

    Andre Guedes
     
  • Use HCI error reasons instead of magic numbers.

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

    Andrei Emeltchenko
     
  • This patch adds a new label to hci_cc_write_scan_enable to avoid
    unnecessary indentation. This will be convenient especially when new
    code for the discoverable timeout gets added.

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

    Johan Hedberg
     
  • This patch adds the necessary code to send proper command status or
    command complete events to the start/stop discovery management commands.
    Before this patch these events were completely missing.

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

    Johan Hedberg
     

14 Oct, 2011

1 commit