1. 16 1月, 2020 1 次提交
  2. 04 1月, 2020 1 次提交
  3. 05 9月, 2019 1 次提交
  4. 17 8月, 2019 1 次提交
  5. 06 7月, 2019 1 次提交
  6. 25 4月, 2019 1 次提交
  7. 25 1月, 2019 1 次提交
  8. 29 9月, 2018 1 次提交
    • M
      Bluetooth: Fix debugfs NULL pointer dereference · 30d65e08
      Matias Karhumaa 提交于
      Fix crash caused by NULL pointer dereference when debugfs functions
      le_max_key_read, le_max_key_size_write, le_min_key_size_read or
      le_min_key_size_write and Bluetooth adapter was powered off.
      
      Fix is to move max_key_size and min_key_size from smp_dev to hci_dev.
      At the same time they were renamed to le_max_key_size and
      le_min_key_size.
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000002e8
      PGD 0 P4D 0
      Oops: 0000 [#24] SMP PTI
      CPU: 2 PID: 6255 Comm: cat Tainted: G      D    OE     4.18.9-200.fc28.x86_64 #1
      Hardware name: LENOVO 4286CTO/4286CTO, BIOS 8DET76WW (1.46 ) 06/21/2018
      RIP: 0010:le_max_key_size_read+0x45/0xb0 [bluetooth]
      Code: 00 00 00 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 44 24 08 31 c0 48 8b 87 c8 00 00 00 48 8d 7c 24 04 48 8b 80 48 0a 00 00 <48> 8b 80 e8 02 00 00 0f b6 48 52 e8 fb b6 b3 ed be 04 00 00 00 48
      RSP: 0018:ffffab23c3ff3df0 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: 00007f0b4ca2e000 RCX: ffffab23c3ff3f08
      RDX: ffffffffc0ddb033 RSI: 0000000000000004 RDI: ffffab23c3ff3df4
      RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
      R10: ffffab23c3ff3ed8 R11: 0000000000000000 R12: ffffab23c3ff3f08
      R13: 00007f0b4ca2e000 R14: 0000000000020000 R15: ffffab23c3ff3f08
      FS:  00007f0b4ca0f540(0000) GS:ffff91bd5e280000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000000002e8 CR3: 00000000629fa006 CR4: 00000000000606e0
      Call Trace:
       full_proxy_read+0x53/0x80
       __vfs_read+0x36/0x180
       vfs_read+0x8a/0x140
       ksys_read+0x4f/0xb0
       do_syscall_64+0x5b/0x160
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Signed-off-by: NMatias Karhumaa <matias.karhumaa@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      30d65e08
  9. 27 9月, 2018 1 次提交
  10. 30 7月, 2018 7 次提交
    • J
      Bluetooth: Implement Set ADV set random address · a73c046a
      Jaganath Kanakkassery 提交于
      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: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a73c046a
    • J
      Bluetooth: Impmlement extended adv enable · de181e88
      Jaganath Kanakkassery 提交于
      This patch basically replaces legacy adv with extended adv
      based on the controller support. Currently there is no
      design change. ie only one adv set will be enabled at a time.
      
      This also adds tx_power in instance and store whatever returns
      from Set_ext_parameter, use the same in adv data as well.
      For instance 0 tx_power is stored in hdev only.
      
      < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
              Handle: 0x00
              Properties: 0x0010
                Use legacy advertising PDUs: ADV_NONCONN_IND
              Min advertising interval: 1280.000 msec (0x0800)
              Max advertising interval: 1280.000 msec (0x0800)
              Channel map: 37, 38, 39 (0x07)
              Own address type: Random (0x01)
              Peer address type: Public (0x00)
              Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
              Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)
              TX power: 127 dbm (0x7f)
              Primary PHY: LE 1M (0x01)
              Secondary max skip: 0x00
              Secondary PHY: LE 1M (0x01)
              SID: 0x00
              Scan request notifications: Disabled (0x00)
      > HCI Event: Command Complete (0x0e) plen 5
            LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1
              Status: Success (0x00)
              TX power (selected): 7 dbm (0x07)
      < HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
              Extended advertising: Enabled (0x01)
              Number of sets: 1 (0x01)
              Entry 0
                Handle: 0x00
                Duration: 0 ms (0x00)
                Max ext adv events: 0
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Advertising Enable (0x08|0x0039) ncmd 2
              Status: Success (0x00)
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      de181e88
    • J
      Bluetooth: Read no of adv sets during init · 6b49bcb4
      Jaganath Kanakkassery 提交于
      This patch reads the number of advertising sets in the controller
      during init and save it in hdev.
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      6b49bcb4
    • J
      Bluetooth: Set Scan PHYs based on selected PHYs by user · 45bdd86e
      Jaganath Kanakkassery 提交于
      Use the PHYs selected in Set Phy Configuration management command
      while scanning.
      
      < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 13
              Own address type: Random (0x01)
              Filter policy: Accept all advertisement (0x00)
              PHYs: 0x05
              Entry 0: LE 1M
                Type: Active (0x01)
                Interval: 11.250 msec (0x0012)
                Window: 11.250 msec (0x0012)
              Entry 1: LE Coded
                Type: Active (0x01)
                Interval: 11.250 msec (0x0012)
                Window: 11.250 msec (0x0012)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6
              Extended scan: Enabled (0x01)
              Filter duplicates: Enabled (0x01)
              Duration: 0 msec (0x0000)
              Period: 0.00 sec (0x0000)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
              Status: Success (0x00)
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      45bdd86e
    • J
      Bluetooth: Implement PHY changed event · b7c23df8
      Jaganath Kanakkassery 提交于
      This defines and implement phy changed event and send it to user
      whenever selected PHYs changes using SET_PHY_CONFIGURATION.
      
      This will be also trigerred when BREDR pkt_type is changed using
      the legacy ioctl HCISETPTYPE.
      
      @ MGMT Command: Set PHY Configuration (0x0045) plen 4
      		Selected PHYs: 0x7fff
      		  BR 1M 1SLOT
      		  BR 1M 3SLOT
      		  BR 1M 5SLOT
      		  EDR 2M 1SLOT
      		  EDR 2M 3SLOT
      		  EDR 2M 5SLOT
      		  EDR 3M 1SLOT
      		  EDR 3M 3SLOT
      		  EDR 3M 5SLOT
      		  LE 1M TX
      		  LE 1M RX
      		  LE 2M TX
      		  LE 2M RX
      		  LE CODED TX
      		  LE CODED RX
      < HCI Command: LE Set Default PHY (0x08|0x0031) plen 3
      		All PHYs preference: 0x00
      		TX PHYs preference: 0x07
      		  LE 1M
      		  LE 2M
      		  LE Coded
      		RX PHYs preference: 0x07
      		  LE 1M
      		  LE 2M
      		  LE Coded
      > HCI Event: Command Complete (0x0e) plen 4
      	  LE Set Default PHY (0x08|0x0031) ncmd 1
      		Status: Success (0x00)
      @ MGMT Event: Command Complete (0x0001) plen 3
      	  Set PHY Configuration (0x0045) plen 0
      		Status: Success (0x00)
      @ MGMT Event: PHY Configuration Changed (0x0026) plen 4
      		Selected PHYs: 0x7fff
      		  BR 1M 1SLOT
      		  BR 1M 3SLOT
      		  BR 1M 5SLOT
      		  EDR 2M 1SLOT
      		  EDR 2M 3SLOT
      		  EDR 2M 5SLOT
      		  EDR 3M 1SLOT
      		  EDR 3M 3SLOT
      		  EDR 3M 5SLOT
      		  LE 1M TX
      		  LE 1M RX
      		  LE 2M TX
      		  LE 2M RX
      		  LE CODED TX
      		  LE CODED RX
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b7c23df8
    • J
      Bluetooth: Add defines for BREDR pkt_type and LE PHYs · 5075b972
      Jaganath Kanakkassery 提交于
      This also add macros for checking LMP support for different
      pkt_types
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      5075b972
    • J
      Bluetooth: Define PHY flags in hdev and set 1M as default · 6decb5b4
      Jaganath Kanakkassery 提交于
      1M is mandatory to be supported by LE controllers and the same
      would be set in power on. This patch defines hdev flags for
      LE PHYs and set 1M to default.
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      6decb5b4
  11. 07 7月, 2018 2 次提交
    • J
      Bluetooth: Use extended LE Connection if supported · 4d94f95d
      Jaganath Kanakkassery 提交于
      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: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      4d94f95d
    • J
      Bluetooth: Use extended scanning if controller supports · a2344b9e
      Jaganath Kanakkassery 提交于
      This implements Set extended scan param and set extended scan enable
      commands and use it for start LE scan based on controller support.
      
      The new features added in these commands are setting of new PHY for
      scanning and setting of scan duration. Both features are disabled
      for now, meaning only 1M PHY is set and scan duration is set to 0
      which means that scanning will be done untill scan disable is called.
      
      < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8
              Own address type: Random (0x01)
              Filter policy: Accept all advertisement (0x00)
              PHYs: 0x01
              Entry 0: LE 1M
                Type: Active (0x01)
                Interval: 11.250 msec (0x0012)
                Window: 11.250 msec (0x0012)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6
              Extended scan: Enabled (0x01)
              Filter duplicates: Enabled (0x01)
              Duration: 0 msec (0x0000)
              Period: 0.00 sec (0x0000)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
              Status: Success (0x00)
      Signed-off-by: NJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a2344b9e
  12. 06 7月, 2018 1 次提交
    • A
      Bluetooth: Store Resolv list size · cfdb0c2d
      Ankit Navik 提交于
      When the controller supports the Read LE Resolv List size feature, the
      maximum list size are read and now stored.
      
      Before patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 17.979791
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 17.980629
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 17.980786
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 17.981627
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #59 [hci0] 17.981786
      > HCI Event: Command Complete (0x0e) plen 12               #60 [hci0] 17.982636
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      
      After patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 13.338168
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 13.338842
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 13.339029
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 13.339939
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Resolving L.. (0x08|0x002a) plen 0  #59 [hci0] 13.340152
      > HCI Event: Command Complete (0x0e) plen 5                #60 [hci0] 13.340952
            LE Read Resolving List Size (0x08|0x002a) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #61 [hci0] 13.341180
      > HCI Event: Command Complete (0x0e) plen 12               #62 [hci0] 13.341898
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      Signed-off-by: NAnkit Navik <ankit.p.navik@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      cfdb0c2d
  13. 18 5月, 2018 1 次提交
  14. 03 4月, 2018 1 次提交
    • S
      Bluetooth: Fix connection if directed advertising and privacy is used · 082f2300
      Szymon Janc 提交于
      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: NSzymon Janc <szymon.janc@codecoup.pl>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org
      082f2300
  15. 02 3月, 2017 1 次提交
  16. 14 1月, 2017 1 次提交
    • P
      locking/atomic, kref: Add kref_read() · 2c935bc5
      Peter Zijlstra 提交于
      Since we need to change the implementation, stop exposing internals.
      
      Provide kref_read() to read the current reference count; typically
      used for debug messages.
      
      Kills two anti-patterns:
      
      	atomic_read(&kref->refcount)
      	kref->refcount.counter
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2c935bc5
  17. 23 11月, 2016 1 次提交
  18. 20 9月, 2016 5 次提交
  19. 18 7月, 2016 2 次提交
  20. 13 7月, 2016 1 次提交
    • S
      Bluetooth: Add Authentication Failed reason to Disconnected Mgmt event · 160b9251
      Szymon Janc 提交于
      If link is disconnected due to Authentication Failure (PIN or Key
      Missing status) userspace will be notified about this with proper error
      code. Many LE profiles define "PIN or Key Missing" status as indication
      of remote lost bond so this allows userspace to take action on this.
      
      @ Device Connected: 88:63:DF:88:0E:83 (1) flags 0x0000
              02 01 1a 05 03 0a 18 0d 18 0b 09 48 65 61 72 74  ...........Heart
              20 52 61 74 65                                    Rate
      > HCI Event: Command Status (0x0f) plen 4
            LE Read Remote Used Features (0x08|0x0016) ncmd 1
              Status: Success (0x00)
      > ACL Data RX: Handle 3585 flags 0x02 dlen 11
            ATT: Read By Group Type Request (0x10) len 6
              Handle range: 0x0001-0xffff
              Attribute group type: Primary Service (0x2800)
      > HCI Event: LE Meta Event (0x3e) plen 12
            LE Read Remote Used Features (0x04)
              Status: Success (0x00)
              Handle: 3585
              Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
                LE Encryption
      < HCI Command: LE Start Encryption (0x08|0x0019) plen 28
              Handle: 3585
              Random number: 0x0000000000000000
              Encrypted diversifier: 0x0000
              Long term key: 26201cd479a0921b6f949f0b1fa8dc82
      > HCI Event: Command Status (0x0f) plen 4
            LE Start Encryption (0x08|0x0019) ncmd 1
              Status: Success (0x00)
      > HCI Event: Encryption Change (0x08) plen 4
              Status: PIN or Key Missing (0x06)
              Handle: 3585
              Encryption: Disabled (0x00)
      < HCI Command: Disconnect (0x01|0x0006) plen 3
              Handle: 3585
              Reason: Authentication Failure (0x05)
      > HCI Event: Command Status (0x0f) plen 4
            Disconnect (0x01|0x0006) ncmd 1
              Status: Success (0x00)
      > HCI Event: Disconnect Complete (0x05) plen 4
              Status: Success (0x00)
              Handle: 3585
              Reason: Connection Terminated By Local Host (0x16)
      @ Device Disconnected: 88:63:DF:88:0E:83 (1) reason 4
      
      @ Device Connected: C4:43:8F:A3:4D:83 (0) flags 0x0000
              08 09 4e 65 78 75 73 20 35                       ..Nexus 5
      > HCI Event: Command Status (0x0f) plen 4
            Authentication Requested (0x01|0x0011) ncmd 1
              Status: Success (0x00)
      > HCI Event: Link Key Request (0x17) plen 6
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
      < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
              Link key: 080812e4aa97a863d11826f71f65a933
      > HCI Event: Command Complete (0x0e) plen 10
            Link Key Request Reply (0x01|0x000b) ncmd 1
              Status: Success (0x00)
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
      > HCI Event: Auth Complete (0x06) plen 3
              Status: PIN or Key Missing (0x06)
              Handle: 75
      @ Authentication Failed: C4:43:8F:A3:4D:83 (0) status 0x05
      < HCI Command: Disconnect (0x01|0x0006) plen 3
              Handle: 75
              Reason: Remote User Terminated Connection (0x13)
      > HCI Event: Command Status (0x0f) plen 4
            Disconnect (0x01|0x0006) ncmd 1
              Status: Success (0x00)
      > HCI Event: Disconnect Complete (0x05) plen 4
              Status: Success (0x00)
              Handle: 75
              Reason: Connection Terminated By Local Host (0x16)
      @ Device Disconnected: C4:43:8F:A3:4D:83 (0) reason 4
      Signed-off-by: NSzymon Janc <szymon.janc@codecoup.pl>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      160b9251
  21. 24 2月, 2016 1 次提交
  22. 06 1月, 2016 2 次提交
  23. 10 12月, 2015 5 次提交