30 Jul, 2018

3 commits

  • This basically sets the random address for the adv instance
    Random address can be set only if the instance is created which
    is done in Set ext adv param.

    Random address and rpa expire timer and flags have been added
    to adv instance which will be used when the respective
    instance is scheduled.

    This introduces a hci_get_random_address() which returns the
    own address type and random address (rpa or nrpa) based
    on the instance flags and hdev flags. New function is required
    since own address type should be known before setting adv params
    but address can be set only after setting params.

    < HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7
    Advertising handle: 0x00
    Advertising random address: 3C:8E:56:9B:77:84 (OUI 3C-8E-56)
    > HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertising Set Random Address (0x08|0x0035) ncmd 1
    Status: Success (0x00)

    Signed-off-by: Jaganath Kanakkassery
    Signed-off-by: Marcel Holtmann

    Jaganath Kanakkassery
     
  • This patch does extended advertising for directed advertising
    if the controller supportes. Instance 0 is used for directed
    advertising.

    Signed-off-by: Jaganath Kanakkassery
    Signed-off-by: Marcel Holtmann

    Jaganath Kanakkassery
     
  • Use the selected PHYs by Set PHY Configuration management command
    in extended create connection.

    Signed-off-by: Jaganath Kanakkassery
    Signed-off-by: Marcel Holtmann

    Jaganath Kanakkassery
     

07 Jul, 2018

1 commit

  • This implements extended LE craete connection and enhanced
    LE conn complete event if the controller supports.

    For now it is as good as legacy LE connection and event as
    no new features in the extended connection is handled.

    < HCI Command: LE Extended Create Connection (0x08|0x0043) plen 26
    Filter policy: White list is not used (0x00)
    Own address type: Public (0x00)
    Peer address type: Random (0x01)
    Peer address: DB:7E:2E:1D:85:E8 (Static)
    Initiating PHYs: 0x01
    Entry 0: LE 1M
    Scan interval: 60.000 msec (0x0060)
    Scan window: 60.000 msec (0x0060)
    Min connection interval: 50.00 msec (0x0028)
    Max connection interval: 70.00 msec (0x0038)
    Connection latency: 0 (0x0000)
    Supervision timeout: 420 msec (0x002a)
    Min connection length: 0.000 msec (0x0000)
    Max connection length: 0.000 msec (0x0000)
    > HCI Event: Command Status (0x0f) plen 4
    LE Extended Create Connection (0x08|0x0043) ncmd 2
    Status: Success (0x00)
    > HCI Event: LE Meta Event (0x3e) plen 31
    LE Enhanced Connection Complete (0x0a)
    Status: Success (0x00)
    Handle: 3585
    Role: Master (0x00)
    Peer address type: Random (0x01)
    Peer address: DB:7E:2E:1D:85:E8 (Static)
    Local resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
    Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
    Connection interval: 67.50 msec (0x0036)
    Connection latency: 0 (0x0000)
    Supervision timeout: 420 msec (0x002a)
    Master clock accuracy: 0x00
    @ MGMT Event: Device Connected (0x000b) plen 40
    LE Address: DB:7E:2E:1D:85:E8 (Static)
    Flags: 0x00000000
    Data length: 27
    Name (complete): Designer Mouse
    Appearance: Mouse (0x03c2)
    Flags: 0x05
    LE Limited Discoverable Mode
    BR/EDR Not Supported
    16-bit Service UUIDs (complete): 1 entry
    Human Interface Device (0x1812)

    Signed-off-by: Jaganath Kanakkassery
    Signed-off-by: Marcel Holtmann

    Jaganath Kanakkassery
     

03 Apr, 2018

1 commit

  • Local random address needs to be updated before creating connection if
    RPA from LE Direct Advertising Report was resolved in host. Otherwise
    remote device might ignore connection request due to address mismatch.

    This was affecting following qualification test cases:
    GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C

    Before patch:
    < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #11350 [hci0] 84680.231216
    Address: 56:BC:E8:24:11:68 (Resolvable)
    Identity type: Random (0x01)
    Identity: F2:F1:06:3D:9C:42 (Static)
    > HCI Event: Command Complete (0x0e) plen 4 #11351 [hci0] 84680.246022
    LE Set Random Address (0x08|0x0005) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #11352 [hci0] 84680.246417
    Type: Passive (0x00)
    Interval: 60.000 msec (0x0060)
    Window: 30.000 msec (0x0030)
    Own address type: Random (0x01)
    Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
    > HCI Event: Command Complete (0x0e) plen 4 #11353 [hci0] 84680.248854
    LE Set Scan Parameters (0x08|0x000b) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11354 [hci0] 84680.249466
    Scanning: Enabled (0x01)
    Filter duplicates: Enabled (0x01)
    > HCI Event: Command Complete (0x0e) plen 4 #11355 [hci0] 84680.253222
    LE Set Scan Enable (0x08|0x000c) ncmd 1
    Status: Success (0x00)
    > HCI Event: LE Meta Event (0x3e) plen 18 #11356 [hci0] 84680.458387
    LE Direct Advertising Report (0x0b)
    Num reports: 1
    Event type: Connectable directed - ADV_DIRECT_IND (0x01)
    Address type: Random (0x01)
    Address: 53:38:DA:46:8C:45 (Resolvable)
    Identity type: Public (0x00)
    Identity: 11:22:33:44:55:66 (OUI 11-22-33)
    Direct address type: Random (0x01)
    Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
    Identity type: Random (0x01)
    Identity: F2:F1:06:3D:9C:42 (Static)
    RSSI: -74 dBm (0xb6)
    < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11357 [hci0] 84680.458737
    Scanning: Disabled (0x00)
    Filter duplicates: Disabled (0x00)
    > HCI Event: Command Complete (0x0e) plen 4 #11358 [hci0] 84680.469982
    LE Set Scan Enable (0x08|0x000c) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Create Connection (0x08|0x000d) plen 25 #11359 [hci0] 84680.470444
    Scan interval: 60.000 msec (0x0060)
    Scan window: 60.000 msec (0x0060)
    Filter policy: White list is not used (0x00)
    Peer address type: Random (0x01)
    Peer address: 53:38:DA:46:8C:45 (Resolvable)
    Identity type: Public (0x00)
    Identity: 11:22:33:44:55:66 (OUI 11-22-33)
    Own address type: Random (0x01)
    Min connection interval: 30.00 msec (0x0018)
    Max connection interval: 50.00 msec (0x0028)
    Connection latency: 0 (0x0000)
    Supervision timeout: 420 msec (0x002a)
    Min connection length: 0.000 msec (0x0000)
    Max connection length: 0.000 msec (0x0000)
    > HCI Event: Command Status (0x0f) plen 4 #11360 [hci0] 84680.474971
    LE Create Connection (0x08|0x000d) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0 #11361 [hci0] 84682.545385
    > HCI Event: Command Complete (0x0e) plen 4 #11362 [hci0] 84682.551014
    LE Create Connection Cancel (0x08|0x000e) ncmd 1
    Status: Success (0x00)
    > HCI Event: LE Meta Event (0x3e) plen 19 #11363 [hci0] 84682.551074
    LE Connection Complete (0x01)
    Status: Unknown Connection Identifier (0x02)
    Handle: 0
    Role: Master (0x00)
    Peer address type: Public (0x00)
    Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
    Connection interval: 0.00 msec (0x0000)
    Connection latency: 0 (0x0000)
    Supervision timeout: 0 msec (0x0000)
    Master clock accuracy: 0x00

    After patch:
    < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #210 [hci0] 667.152459
    Type: Passive (0x00)
    Interval: 60.000 msec (0x0060)
    Window: 30.000 msec (0x0030)
    Own address type: Random (0x01)
    Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
    > HCI Event: Command Complete (0x0e) plen 4 #211 [hci0] 667.153613
    LE Set Scan Parameters (0x08|0x000b) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #212 [hci0] 667.153704
    Scanning: Enabled (0x01)
    Filter duplicates: Enabled (0x01)
    > HCI Event: Command Complete (0x0e) plen 4 #213 [hci0] 667.154584
    LE Set Scan Enable (0x08|0x000c) ncmd 1
    Status: Success (0x00)
    > HCI Event: LE Meta Event (0x3e) plen 18 #214 [hci0] 667.182619
    LE Direct Advertising Report (0x0b)
    Num reports: 1
    Event type: Connectable directed - ADV_DIRECT_IND (0x01)
    Address type: Random (0x01)
    Address: 50:52:D9:A6:48:A0 (Resolvable)
    Identity type: Public (0x00)
    Identity: 11:22:33:44:55:66 (OUI 11-22-33)
    Direct address type: Random (0x01)
    Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
    Identity type: Random (0x01)
    Identity: F4:28:73:5D:38:B0 (Static)
    RSSI: -70 dBm (0xba)
    < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #215 [hci0] 667.182704
    Scanning: Disabled (0x00)
    Filter duplicates: Disabled (0x00)
    > HCI Event: Command Complete (0x0e) plen 4 #216 [hci0] 667.183599
    LE Set Scan Enable (0x08|0x000c) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #217 [hci0] 667.183645
    Address: 7C:C1:57:A5:B7:A8 (Resolvable)
    Identity type: Random (0x01)
    Identity: F4:28:73:5D:38:B0 (Static)
    > HCI Event: Command Complete (0x0e) plen 4 #218 [hci0] 667.184590
    LE Set Random Address (0x08|0x0005) ncmd 1
    Status: Success (0x00)
    < HCI Command: LE Create Connection (0x08|0x000d) plen 25 #219 [hci0] 667.184613
    Scan interval: 60.000 msec (0x0060)
    Scan window: 60.000 msec (0x0060)
    Filter policy: White list is not used (0x00)
    Peer address type: Random (0x01)
    Peer address: 50:52:D9:A6:48:A0 (Resolvable)
    Identity type: Public (0x00)
    Identity: 11:22:33:44:55:66 (OUI 11-22-33)
    Own address type: Random (0x01)
    Min connection interval: 30.00 msec (0x0018)
    Max connection interval: 50.00 msec (0x0028)
    Connection latency: 0 (0x0000)
    Supervision timeout: 420 msec (0x002a)
    Min connection length: 0.000 msec (0x0000)
    Max connection length: 0.000 msec (0x0000)
    > HCI Event: Command Status (0x0f) plen 4 #220 [hci0] 667.186558
    LE Create Connection (0x08|0x000d) ncmd 1
    Status: Success (0x00)
    > HCI Event: LE Meta Event (0x3e) plen 19 #221 [hci0] 667.485824
    LE Connection Complete (0x01)
    Status: Success (0x00)
    Handle: 0
    Role: Master (0x00)
    Peer address type: Random (0x01)
    Peer address: 50:52:D9:A6:48:A0 (Resolvable)
    Identity type: Public (0x00)
    Identity: 11:22:33:44:55:66 (OUI 11-22-33)
    Connection interval: 50.00 msec (0x0028)
    Connection latency: 0 (0x0000)
    Supervision timeout: 420 msec (0x002a)
    Master clock accuracy: 0x07
    @ MGMT Event: Device Connected (0x000b) plen 13 {0x0002} [hci0] 667.485996
    LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
    Flags: 0x00000000
    Data length: 0

    Signed-off-by: Szymon Janc
    Signed-off-by: Marcel Holtmann
    Cc: stable@vger.kernel.org

    Szymon Janc
     

30 Oct, 2017

1 commit


29 Oct, 2017

1 commit

  • If command is added to req then it should be freed in case if
    hdev is down or HCI_ADVERTISING flag is set.

    This introduces a helper in hci_request to purge the cmd_q
    to make cmd_q internal to hci_request which is used to fix
    the leak.

    This also replace accessing of cmd_q in hci_conn with the
    new helper.

    Signed-off-by: Jaganath Kanakkassery
    Signed-off-by: Marcel Holtmann

    Jaganath Kanakkassery
     

23 Nov, 2016

1 commit

  • The hci_get_route() API is used to look up local HCI devices, however
    so far it has been incapable of dealing with anything else than the
    public address of HCI devices. This completely breaks with LE-only HCI
    devices that do not come with a public address, but use a static
    random address instead.

    This patch exteds the hci_get_route() API with a src_type parameter
    that's used for comparing with the right address of each HCI device.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     

10 Jul, 2016

1 commit

  • The HCI_BREDR naming is confusing since it actually stands for Primary
    Bluetooth Controller. Which is a term that has been used in the latest
    standard. However from a legacy point of view there only really have
    been Basic Rate (BR) and Enhanced Data Rate (EDR). Recent versions of
    Bluetooth introduced Low Energy (LE) and made this terminology a little
    bit confused since Dual Mode Controllers include BR/EDR and LE. To
    simplify this the name HCI_PRIMARY stands for the Primary Controller
    which can be a single mode or dual mode controller.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

11 Mar, 2016

2 commits


10 Dec, 2015

3 commits

  • When we're doing background scanning and connection attempts it's
    possible we timeout trying to connect and go back to scanning again.
    The timeout triggers a HCI_LE_Create_Connection_Cancel which will
    trigger a Connection Complete with "Unknown Connection Identifier"
    error status. Since we go back to scanning this isn't really a failure
    and shouldn't be presented as such to user space through mgmt.

    The exception to this is if the connection attempt was due to an
    explicit request on an L2CAP socket (indicated by
    params->explicit_connect being true). Since the socket will get an
    error it's consistent to also notify the failure on mgmt in this case.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • All LE connections are now triggered through a preceding passive scan
    and waiting for a connectable advertising report. This means we've got
    the best possible guarantee that the device is within range and should
    be able to request the controller to perform continuous scanning. This
    way we minimize the risk that we miss out on any advertising packets.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann
    Cc: stable@vger.kernel.org # 4.3+

    Johan Hedberg
     
  • This paves the way for eventually performing advertising changes
    through the hdev->req_workqueue. Some new APIs need to be exposed from
    mgmt.c to hci_request.c and vice-versa, but many of them will go away
    once hdev->req_workqueue gets used.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     

20 Nov, 2015

5 commits


22 Oct, 2015

5 commits


21 Oct, 2015

1 commit

  • The hci_conn objects don't have a dedicated lock themselves but rely
    on the caller to hold the hci_dev lock for most types of access. The
    hci_conn_timeout() function has so far sent certain HCI commands based
    on the hci_conn state which has been possible without holding the
    hci_dev lock.

    The recent changes to do LE scanning before connect attempts added
    even more operations to hci_conn and hci_dev from hci_conn_timeout,
    thereby exposing potential race conditions with the hci_dev and
    hci_conn states.

    As an example of such a race, here there's a timeout but an
    l2cap_sock_connect() call manages to race with the cleanup routine:

    [Oct21 08:14] l2cap_chan_timeout: chan ee4b12c0 state BT_CONNECT
    [ +0.000004] l2cap_chan_close: chan ee4b12c0 state BT_CONNECT
    [ +0.000002] l2cap_chan_del: chan ee4b12c0, conn f3141580, err 111, state BT_CONNECT
    [ +0.000002] l2cap_sock_teardown_cb: chan ee4b12c0 state BT_CONNECT
    [ +0.000005] l2cap_chan_put: chan ee4b12c0 orig refcnt 4
    [ +0.000010] hci_conn_drop: hcon f53d56e0 orig refcnt 1
    [ +0.000013] l2cap_chan_put: chan ee4b12c0 orig refcnt 3
    [ +0.000063] hci_conn_timeout: hcon f53d56e0 state BT_CONNECT
    [ +0.000049] hci_conn_params_del: addr ee:0d:30:09:53:1f (type 1)
    [ +0.000002] hci_chan_list_flush: hcon f53d56e0
    [ +0.000001] hci_chan_del: hci0 hcon f53d56e0 chan f4e7ccc0
    [ +0.004528] l2cap_sock_create: sock e708fc00
    [ +0.000023] l2cap_chan_create: chan ee4b1770
    [ +0.000001] l2cap_chan_hold: chan ee4b1770 orig refcnt 1
    [ +0.000002] l2cap_sock_init: sk ee4b3390
    [ +0.000029] l2cap_sock_bind: sk ee4b3390
    [ +0.000010] l2cap_sock_setsockopt: sk ee4b3390
    [ +0.000037] l2cap_sock_connect: sk ee4b3390
    [ +0.000002] l2cap_chan_connect: 00:02:72:d9:e5:8b -> ee:0d:30:09:53:1f (type 2) psm 0x00
    [ +0.000002] hci_get_route: 00:02:72:d9:e5:8b -> ee:0d:30:09:53:1f
    [ +0.000001] hci_dev_hold: hci0 orig refcnt 8
    [ +0.000003] hci_conn_hold: hcon f53d56e0 orig refcnt 0

    Above the l2cap_chan_connect() shouldn't have been able to reach the
    hci_conn f53d56e0 anymore but since hci_conn_timeout didn't do proper
    locking that's not the case. The end result is a reference to hci_conn
    that's not in the conn_hash list, resulting in list corruption when
    trying to remove it later:

    [Oct21 08:15] l2cap_chan_timeout: chan ee4b1770 state BT_CONNECT
    [ +0.000004] l2cap_chan_close: chan ee4b1770 state BT_CONNECT
    [ +0.000003] l2cap_chan_del: chan ee4b1770, conn f3141580, err 111, state BT_CONNECT
    [ +0.000001] l2cap_sock_teardown_cb: chan ee4b1770 state BT_CONNECT
    [ +0.000005] l2cap_chan_put: chan ee4b1770 orig refcnt 4
    [ +0.000002] hci_conn_drop: hcon f53d56e0 orig refcnt 1
    [ +0.000015] l2cap_chan_put: chan ee4b1770 orig refcnt 3
    [ +0.000038] hci_conn_timeout: hcon f53d56e0 state BT_CONNECT
    [ +0.000003] hci_chan_list_flush: hcon f53d56e0
    [ +0.000002] hci_conn_hash_del: hci0 hcon f53d56e0
    [ +0.000001] ------------[ cut here ]------------
    [ +0.000461] WARNING: CPU: 0 PID: 1782 at lib/list_debug.c:56 __list_del_entry+0x3f/0x71()
    [ +0.000839] list_del corruption, f53d56e0->prev is LIST_POISON2 (00000200)

    The necessary fix is unfortunately more complicated than just adding
    hci_dev_lock/unlock calls to the hci_conn_timeout() call path.
    Particularly, the hci_conn_del() API, which expects the hci_dev lock to
    be held, performs a cancel_delayed_work_sync(&hcon->disc_work) which
    would lead to a deadlock if the hci_conn_timeout() call path tries to
    acquire the same lock.

    This patch solves the problem by deferring the cleanup work to a
    separate work callback. To protect against the hci_dev or hci_conn
    going away meanwhile temporary references are taken with the help of
    hci_dev_hold() and hci_conn_get().

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann
    Cc: stable@vger.kernel.org # 4.3

    Johan Hedberg
     

16 Oct, 2015

5 commits

  • This patch makes sure that conn_params that were created just for
    explicit_connect, will get properly deleted during cleanup.

    Signed-off-by: Jakub Pawlowski
    Acked-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     
  • After clearing the params->explicit_connect variable the parameters
    may need to be either added back to the right list or potentially left
    absent from both the le_reports and the le_conns lists.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • We can't use hci_explicit_connect_lookup() since that would only cover
    explicit connections, leaving normal reconnections completely
    untouched. Not using it in turn means leaving out entries in
    pend_le_reports.

    To fix this and simplify the logic move conn params from the reports
    list to the pend_le_conns list for the duration of an explicit
    connect. Once the connect is complete move the params back to the
    pend_le_reports list. This also means that the explicit connect lookup
    function only needs to look into the pend_le_conns list.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • The code should never directly call hci_conn_hash_del since many
    cleanup & reference counting updates would be lost. Normally
    hci_conn_del is the right thing to do, but in the case of a connection
    doing LE scanning this could cause a deadlock due to doing a
    cancel_delayed_work_sync() on the same work callback that we were
    called from.

    Connections in the LE scanning state actually need very little cleanup
    - just a small subset of hci_conn_del. To solve the issue, refactor
    out these essential pieces into a new hci_conn_cleanup() function and
    call that from the two necessary places.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • When disable/enable scan command is issued twice, some controllers
    will return an error for the second request, i.e. requests with this
    command will fail on some controllers, and succeed on others.

    This patch makes sure that unnecessary scan disable/enable commands
    are not issued.

    When adding device to the auto connect whitelist when there is pending
    connect attempt, there is no need to update scan.

    hci_connect_le_scan_cleanup is conditionally executing
    hci_conn_params_del, that is calling hci_update_background_scan. Make
    the other case also update scan, and remove reduntand call from
    hci_connect_le_scan_remove.

    When stopping interleaved discovery the state should be set to stopped
    only when both LE scanning and discovery has stopped.

    Signed-off-by: Jakub Pawlowski
    Acked-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     

11 Aug, 2015

4 commits

  • Currently, when trying to connect to already paired device that just
    rotated its RPA MAC address, old address would be used and connection
    would fail. In order to fix that, kernel must scan and receive
    advertisement with fresh RPA before connecting.

    This patch makes sure that when new procedure is in use, and we're stuck
    in scan phase because no advertisement was received and timeout happened,
    or app decided to close socket, scan whitelist gets properly cleaned up.

    Signed-off-by: Jakub Pawlowski
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     
  • Currently, when trying to connect to already paired device that just
    rotated its RPA MAC address, old address would be used and connection
    would fail. In order to fix that, kernel must scan and receive
    advertisement with fresh RPA before connecting.

    This path makes sure that after advertisement is received from device that
    we try to connect to, it is properly handled in check_pending_le_conn and
    trigger connect attempt.

    It also modifies hci_le_connect to make sure that connect attempt will be
    properly continued.

    Signed-off-by: Jakub Pawlowski
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     
  • Currently, when trying to connect to already paired device that just
    rotated its RPA MAC address, old address would be used and connection
    would fail. In order to fix that, kernel must scan and receive
    advertisement with fresh RPA before connecting.

    This patch adds hci_connect_le_scan with dependencies, new method that
    will be used to connect to remote LE devices. Instead of just sending
    connect request, it adds a device to whitelist. Later patches will make
    use of this whitelist to send conenct request when advertisement is
    received, and properly handle timeouts.

    Signed-off-by: Jakub Pawlowski
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     
  • This patch adds hci_lookup_le_connect method, that will be used to check
    wether outgoing le connection attempt is in progress.

    Signed-off-by: Jakub Pawlowski
    Signed-off-by: Marcel Holtmann

    Jakub Pawlowski
     

09 Jun, 2015

1 commit

  • The encryption key size for LTKs is supposed to be applied only at the
    moment of encryption. When generating a Link Key (using LE SC) from
    the LTK the full non-shortened value should be used. This patch
    modifies the code to always keep the full value around and only apply
    the key size when passing the value to HCI.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     

13 Mar, 2015

3 commits


19 Feb, 2015

2 commits

  • This patch moves all the disconn_cfm callbacks to be based on the hci_cb
    list. This means making l2cap_disconn_cfm private to l2cap_core.c and
    sco_conn_cb private to sco.c respectively. Since the hci_conn type
    filtering isn't done any more on the wrapper level the callbacks
    themselves need to check that they were passed a relevant type of
    connection.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • This patch moves all the connect_cfm callbacks to be based on the hci_cb
    list. This means making l2cap_connect_cfm private to l2cap_core.c and
    sco_connect_cb private to sco.c respectively. Since the hci_conn type
    filtering isn't done any more on the wrapper level the callbacks
    themselves need to check that they were passed a relevant type of
    connection.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg