1. 18 5月, 2017 4 次提交
  2. 13 4月, 2017 1 次提交
  3. 20 9月, 2016 1 次提交
    • M
      Bluetooth: Fix wrong New Settings event when closing HCI User Channel · baab7932
      Marcel Holtmann 提交于
      When closing HCI User Channel, the New Settings event was send out to
      inform about changed settings. However such event is wrong since the
      exclusive HCI User Channel access is active until the Index Added event
      has been sent.
      
      @ USER Close: test
      @ MGMT Event: New Settings (0x0006) plen 4
              Current settings: 0x00000ad0
                Bondable
                Secure Simple Pairing
                BR/EDR
                Low Energy
                Secure Connections
      = Close Index: 00:14:EF:22:04:12
      @ MGMT Event: Index Added (0x0004) plen 0
      
      Calling __mgmt_power_off from hci_dev_do_close requires an extra check
      for an active HCI User Channel.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      baab7932
  4. 18 7月, 2016 1 次提交
  5. 10 7月, 2016 1 次提交
    • M
      Bluetooth: Rename HCI_BREDR into HCI_PRIMARY · ca8bee5d
      Marcel Holtmann 提交于
      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: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      ca8bee5d
  6. 13 5月, 2016 1 次提交
    • J
      Bluetooth: fix power_on vs close race · bf389cab
      Jiri Slaby 提交于
      With all the latest fixes applied, I am still able to reproduce this
      (and other) warning(s):
      WARNING: CPU: 1 PID: 19684 at ../kernel/workqueue.c:4092 destroy_workqueue+0x70a/0x770()
      ...
      Call Trace:
       [<ffffffff819fee81>] ? dump_stack+0xb3/0x112
       [<ffffffff8117377e>] ? warn_slowpath_common+0xde/0x140
       [<ffffffff811ce68a>] ? destroy_workqueue+0x70a/0x770
       [<ffffffff811739ae>] ? warn_slowpath_null+0x2e/0x40
       [<ffffffff811ce68a>] ? destroy_workqueue+0x70a/0x770
       [<ffffffffa0c944c9>] ? hci_unregister_dev+0x2a9/0x720 [bluetooth]
       [<ffffffffa0b301db>] ? vhci_release+0x7b/0xf0 [hci_vhci]
       [<ffffffffa0b30160>] ? vhci_flush+0x50/0x50 [hci_vhci]
       [<ffffffff8117cd73>] ? do_exit+0x863/0x2b90
      
      This is due to race present in the hci_unregister_dev path.
      hdev->power_on work races with hci_dev_do_close. One tries to open,
      the other tries to close, leading to warning like the above. (Another
      example is a warning in kobject_get or kobject_put depending on who
      wins the race.)
      
      Fix this by switching those two racers to ensure hdev->power_on never
      triggers while hci_dev_do_close is in progress.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      bf389cab
  7. 24 2月, 2016 3 次提交
  8. 20 2月, 2016 1 次提交
    • D
      Bluetooth: hci_core: Avoid mixing up req_complete and req_complete_skb · 3bd7594e
      Douglas Anderson 提交于
      In commit 44d27137 ("Bluetooth: Compress the size of struct
      hci_ctrl") we squashed down the size of the structure by using a union
      with the assumption that all users would use the flag to determine
      whether we had a req_complete or a req_complete_skb.
      
      Unfortunately we had a case in hci_req_cmd_complete() where we weren't
      looking at the flag.  This can result in a situation where we might be
      storing a hci_req_complete_skb_t in a hci_req_complete_t variable, or
      vice versa.
      
      During some testing I found at least one case where the function
      hci_req_sync_complete() was called improperly because the kernel thought
      that it didn't require an SKB.  Looking through the stack in kgdb I
      found that it was called by hci_event_packet() and that
      hci_event_packet() had both of its locals "req_complete" and
      "req_complete_skb" pointing to the same place: both to
      hci_req_sync_complete().
      
      Let's make sure we always check the flag.
      
      For more details on debugging done, see <http://crbug.com/588288>.
      
      Fixes: 44d27137 ("Bluetooth: Compress the size of struct hci_ctrl")
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      3bd7594e
  9. 20 12月, 2015 1 次提交
  10. 10 12月, 2015 4 次提交
  11. 20 11月, 2015 15 次提交
  12. 05 11月, 2015 1 次提交
  13. 26 10月, 2015 2 次提交
  14. 22 10月, 2015 1 次提交
  15. 21 10月, 2015 3 次提交